diff --git a/lib/grpc.dart b/lib/grpc.dart index f927483a..09ececc4 100644 --- a/lib/grpc.dart +++ b/lib/grpc.dart @@ -13,21 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -export 'src/auth/auth.dart' - show - BaseAuthenticator, - HttpBasedAuthenticator, - JwtServiceAccountAuthenticator; +export 'src/auth/auth.dart' show BaseAuthenticator; export 'src/auth/auth_io.dart' show applicationDefaultCredentialsAuthenticator, ComputeEngineAuthenticator, ServiceAccountAuthenticator; -export 'src/client/call.dart' show CallOptions, ClientCall, MetadataProvider; +export 'src/client/call.dart' show ClientCall; export 'src/client/client.dart' show Client; export 'src/client/client_transport_connector.dart' show ClientTransportConnector; -export 'src/client/common.dart' show Response, ResponseStream, ResponseFuture; export 'src/client/connection.dart' show ConnectionState; export 'src/client/http2_channel.dart' show ClientChannel, ClientTransportConnectorChannel; @@ -55,13 +50,12 @@ export 'src/server/server.dart' ConnectionServer, Server; export 'src/server/service.dart' show ServiceMethod, Service; +export 'src/shared/api.dart'; export 'src/shared/codec.dart' show Codec, IdentityCodec, GzipCodec; export 'src/shared/codec_registry.dart'; export 'src/shared/message.dart' show GrpcMessage, GrpcMetadata, GrpcData, grpcDecompressor; -export 'src/shared/profiler.dart' show isTimelineLoggingEnabled; export 'src/shared/security.dart' show supportedAlpnProtocols, createSecurityContext; -export 'src/shared/status.dart' show StatusCode, GrpcError; export 'src/shared/streams.dart' show GrpcHttpEncoder, GrpcHttpDecoder; export 'src/shared/timeout.dart' show toTimeoutString, fromTimeoutString; diff --git a/lib/grpc_or_grpcweb.dart b/lib/grpc_or_grpcweb.dart index 3ba0b0c3..a3eabceb 100644 --- a/lib/grpc_or_grpcweb.dart +++ b/lib/grpc_or_grpcweb.dart @@ -18,6 +18,8 @@ import 'src/client/grpc_or_grpcweb_channel_grpc.dart' import 'src/client/http2_channel.dart'; import 'src/client/options.dart'; +export 'src/shared/api.dart'; + /// A client channel that underneath uses gRPC [ClientChannel] on all platforms /// except web, on which it uses [GrpcWebClientChannel]. /// diff --git a/lib/grpc_web.dart b/lib/grpc_web.dart index fa834391..db0a34d9 100644 --- a/lib/grpc_web.dart +++ b/lib/grpc_web.dart @@ -13,16 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -export 'src/auth/auth.dart' - show HttpBasedAuthenticator, JwtServiceAccountAuthenticator; - -export 'src/client/call.dart' - show MetadataProvider, CallOptions, WebCallOptions; - -export 'src/client/common.dart' show Response, ResponseStream, ResponseFuture; +export 'src/client/call.dart' show WebCallOptions; export 'src/client/web_channel.dart' show GrpcWebClientChannel; -export 'src/shared/profiler.dart' show isTimelineLoggingEnabled; - -export 'src/shared/status.dart' show StatusCode, GrpcError; +export 'src/shared/api.dart'; diff --git a/lib/src/shared/api.dart b/lib/src/shared/api.dart new file mode 100644 index 00000000..5a509f12 --- /dev/null +++ b/lib/src/shared/api.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2021, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export '../auth/auth.dart' + show HttpBasedAuthenticator, JwtServiceAccountAuthenticator; +export '../client/call.dart' show MetadataProvider, CallOptions; +export '../client/common.dart' show Response, ResponseStream, ResponseFuture; +export 'profiler.dart' show isTimelineLoggingEnabled; +export 'status.dart' show StatusCode, GrpcError;