Skip to content

Commit

Permalink
grpc_or_grpcweb.dart: exporting shared types #486 (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
gawmanarnar authored Jun 13, 2021
1 parent d4504da commit f23070e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
12 changes: 3 additions & 9 deletions lib/grpc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
2 changes: 2 additions & 0 deletions lib/grpc_or_grpcweb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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].
///
Expand Down
12 changes: 2 additions & 10 deletions lib/grpc_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
21 changes: 21 additions & 0 deletions lib/src/shared/api.dart
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit f23070e

Please sign in to comment.