Skip to content

Commit cba40da

Browse files
authored
Fix imports in http2_connection.dart (#662)
* Fix imports in `http2_connection.dart` * Export `Proxy` * dart fix * Add documentation comment * Add licenses
1 parent 3f05c37 commit cba40da

15 files changed

+110
-6
lines changed

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ linter:
1818
- prefer_single_quotes
1919
- test_types_in_equals
2020
- use_super_parameters
21+
- prefer_relative_imports

example/grpc-web/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:async';
22
import 'dart:html';
33

4-
import 'package:grpc_web/src/generated/echo.pbgrpc.dart';
4+
import 'src/generated/echo.pbgrpc.dart';
55

66
class EchoApp {
77
final EchoServiceClient _service;

lib/grpc.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export 'src/client/options.dart'
3636
BackoffStrategy,
3737
defaultBackoffStrategy,
3838
ChannelOptions;
39+
export 'src/client/proxy.dart' show Proxy;
3940
export 'src/client/transport/http2_credentials.dart'
4041
show BadCertificateHandler, allowBadCertificates, ChannelCredentials;
4142

lib/src/auth/auth_io.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
116
import 'dart:convert';
217
import 'dart:io';
318

lib/src/client/client_keepalive.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
116
import 'dart:async';
217

318
import 'package:clock/clock.dart';

lib/src/client/client_transport_connector.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
116
import 'dart:async';
217

318
import 'package:http2/transport.dart';

lib/src/client/http2_connection.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import 'dart:convert';
1818
import 'dart:io';
1919
import 'dart:typed_data';
2020

21-
import 'package:grpc/src/client/proxy.dart';
2221
import 'package:http2/transport.dart';
2322

2423
import '../shared/codec.dart';
@@ -29,6 +28,7 @@ import 'client_transport_connector.dart';
2928
import 'connection.dart' hide ClientConnection;
3029
import 'connection.dart' as connection;
3130
import 'options.dart';
31+
import 'proxy.dart';
3232
import 'transport/http2_credentials.dart';
3333
import 'transport/http2_transport.dart';
3434
import 'transport/transport.dart';

lib/src/client/interceptor.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
116
import 'call.dart';
217
import 'common.dart';
318
import 'method.dart';

lib/src/client/proxy.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
/// Proxy data class with optional authentication.
117
class Proxy {
218
final String host;
319
final int port;

lib/src/server/interceptor.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright (c) 2023, the gRPC project authors. Please see the AUTHORS file
2+
// for details. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
116
import 'dart:async';
217

318
import '../shared/status.dart';

0 commit comments

Comments
 (0)