-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove unused header content type && add protobuf message in co…
…ntent type for proxy tools (#626) Co-authored-by: jiechic <[email protected]>
- Loading branch information
Showing
14 changed files
with
159 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: proto/params.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
import 'dart:core' as $core; | ||
|
||
import 'package:protobuf/protobuf.dart' as $pb; | ||
|
||
class Params extends $pb.GeneratedMessage { | ||
factory Params({ | ||
$core.String? key, | ||
}) { | ||
final $result = create(); | ||
if (key != null) { | ||
$result.key = key; | ||
} | ||
return $result; | ||
} | ||
Params._() : super(); | ||
factory Params.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | ||
factory Params.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | ||
|
||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Params', package: const $pb.PackageName(_omitMessageNames ? '' : 'examples.enumerations'), createEmptyInstance: create) | ||
..aOS(1, _omitFieldNames ? '' : 'key') | ||
..hasRequiredFields = false | ||
; | ||
|
||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' | ||
'Will be removed in next major version') | ||
Params clone() => Params()..mergeFromMessage(this); | ||
@$core.Deprecated( | ||
'Using this can add significant overhead to your binary. ' | ||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' | ||
'Will be removed in next major version') | ||
Params copyWith(void Function(Params) updates) => super.copyWith((message) => updates(message as Params)) as Params; | ||
|
||
$pb.BuilderInfo get info_ => _i; | ||
|
||
@$core.pragma('dart2js:noInline') | ||
static Params create() => Params._(); | ||
Params createEmptyInstance() => create(); | ||
static $pb.PbList<Params> createRepeated() => $pb.PbList<Params>(); | ||
@$core.pragma('dart2js:noInline') | ||
static Params getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Params>(create); | ||
static Params? _defaultInstance; | ||
|
||
@$pb.TagNumber(1) | ||
$core.String get key => $_getSZ(0); | ||
@$pb.TagNumber(1) | ||
set key($core.String v) { $_setString(0, v); } | ||
@$pb.TagNumber(1) | ||
$core.bool hasKey() => $_has(0); | ||
@$pb.TagNumber(1) | ||
void clearKey() => clearField(1); | ||
} | ||
|
||
|
||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); | ||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); |
2 changes: 1 addition & 1 deletion
2
example_protobuf/lib/proto/query.pbenum.dart → ...ple_protobuf/lib/proto/params.pbenum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: proto/params.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
import 'dart:convert' as $convert; | ||
import 'dart:core' as $core; | ||
import 'dart:typed_data' as $typed_data; | ||
|
||
@$core.Deprecated('Use paramsDescriptor instead') | ||
const Params$json = { | ||
'1': 'Params', | ||
'2': [ | ||
{'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, | ||
], | ||
}; | ||
|
||
/// Descriptor for `Params`. Decode as a `google.protobuf.DescriptorProto`. | ||
final $typed_data.Uint8List paramsDescriptor = $convert.base64Decode( | ||
'CgZQYXJhbXMSEAoDa2V5GAEgASgJUgNrZXk='); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: proto/result.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// Generated code. Do not modify. | ||
// source: proto/result.proto | ||
// | ||
// @dart = 2.12 | ||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references | ||
// ignore_for_file: constant_identifier_names | ||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes | ||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields | ||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import | ||
|
||
export 'result.pb.dart'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto3"; | ||
|
||
package examples.enumerations; | ||
|
||
message Params { | ||
string key = 1; | ||
} |
4 changes: 0 additions & 4 deletions
4
example_protobuf/proto/query.proto → example_protobuf/proto/result.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
syntax = "proto3"; | ||
|
||
message Params { | ||
string key = 1; | ||
} | ||
|
||
message Result { | ||
string value = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters