diff --git a/api/buf.yaml b/api/buf.yaml deleted file mode 100644 index e98a791..0000000 --- a/api/buf.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: v1 - -breaking: - use: - - FILE - -lint: - use: - - DEFAULT diff --git a/api/gen/go/conf/v1/kratos_conf_client.pb.go b/api/gen/go/conf/v1/kratos_conf_client.pb.go index 7b63865..67166a9 100644 --- a/api/gen/go/conf/v1/kratos_conf_client.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_client.pb.go @@ -27,8 +27,8 @@ type Client struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Rest *Client_REST `protobuf:"bytes,1,opt,name=rest,proto3" json:"rest,omitempty"` // REST服务 - Grpc *Client_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"` // gRPC服务 + Rest *Client_REST `protobuf:"bytes,1,opt,name=rest,proto3,oneof" json:"rest,omitempty"` // REST服务 + Grpc *Client_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"` // gRPC服务 } func (x *Client) Reset() { @@ -83,8 +83,9 @@ type Client_REST struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 - Middleware *Middleware `protobuf:"bytes,2,opt,name=middleware,proto3" json:"middleware,omitempty"` + Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + Middleware *Middleware `protobuf:"bytes,2,opt,name=middleware,proto3" json:"middleware,omitempty"` // 中间件 + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Client_REST) Reset() { @@ -133,14 +134,22 @@ func (x *Client_REST) GetMiddleware() *Middleware { return nil } +func (x *Client_REST) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // gPRC type Client_GRPC struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 - Middleware *Middleware `protobuf:"bytes,2,opt,name=middleware,proto3" json:"middleware,omitempty"` + Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + Middleware *Middleware `protobuf:"bytes,2,opt,name=middleware,proto3" json:"middleware,omitempty"` // 中间件 + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Client_GRPC) Reset() { @@ -189,6 +198,13 @@ func (x *Client_GRPC) GetMiddleware() *Middleware { return nil } +func (x *Client_GRPC) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + var File_conf_v1_kratos_conf_client_proto protoreflect.FileDescriptor var file_conf_v1_kratos_conf_client_proto_rawDesc = []byte{ @@ -198,36 +214,43 @@ var file_conf_v1_kratos_conf_client_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, - 0x02, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x65, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x52, 0x50, - 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x6d, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x12, - 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, - 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, - 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x1a, 0x6d, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12, 0x33, - 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, - 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x77, 0x61, 0x72, 0x65, 0x42, 0x87, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, - 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, - 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x03, + 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x47, 0x52, 0x50, 0x43, 0x48, 0x01, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x88, 0x01, 0x01, + 0x1a, 0x8a, 0x01, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x30, + 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, + 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, + 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x8a, 0x01, + 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x6d, + 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, + 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x1b, 0x0a, + 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, + 0x65, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x42, 0x87, 0x01, 0x0a, + 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, + 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, + 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, + 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -249,19 +272,22 @@ var file_conf_v1_kratos_conf_client_proto_goTypes = []interface{}{ (*Client_GRPC)(nil), // 2: conf.Client.GRPC (*durationpb.Duration)(nil), // 3: google.protobuf.Duration (*Middleware)(nil), // 4: conf.Middleware + (*TLS)(nil), // 5: conf.TLS } var file_conf_v1_kratos_conf_client_proto_depIdxs = []int32{ 1, // 0: conf.Client.rest:type_name -> conf.Client.REST 2, // 1: conf.Client.grpc:type_name -> conf.Client.GRPC 3, // 2: conf.Client.REST.timeout:type_name -> google.protobuf.Duration 4, // 3: conf.Client.REST.middleware:type_name -> conf.Middleware - 3, // 4: conf.Client.GRPC.timeout:type_name -> google.protobuf.Duration - 4, // 5: conf.Client.GRPC.middleware:type_name -> conf.Middleware - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 5, // 4: conf.Client.REST.tls:type_name -> conf.TLS + 3, // 5: conf.Client.GRPC.timeout:type_name -> google.protobuf.Duration + 4, // 6: conf.Client.GRPC.middleware:type_name -> conf.Middleware + 5, // 7: conf.Client.GRPC.tls:type_name -> conf.TLS + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_conf_v1_kratos_conf_client_proto_init() } @@ -270,6 +296,7 @@ func file_conf_v1_kratos_conf_client_proto_init() { return } file_conf_v1_kratos_conf_middleware_proto_init() + file_conf_v1_kratos_conf_tls_proto_init() if !protoimpl.UnsafeEnabled { file_conf_v1_kratos_conf_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Client); i { @@ -308,6 +335,7 @@ func file_conf_v1_kratos_conf_client_proto_init() { } } } + file_conf_v1_kratos_conf_client_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/gen/go/conf/v1/kratos_conf_config.pb.go b/api/gen/go/conf/v1/kratos_conf_config.pb.go index 11cd26b..65e7150 100644 --- a/api/gen/go/conf/v1/kratos_conf_config.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_config.pb.go @@ -27,13 +27,13 @@ type RemoteConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Etcd *RemoteConfig_Etcd `protobuf:"bytes,2,opt,name=etcd,proto3" json:"etcd,omitempty"` - Consul *RemoteConfig_Consul `protobuf:"bytes,3,opt,name=consul,proto3" json:"consul,omitempty"` - Nacos *RemoteConfig_Nacos `protobuf:"bytes,4,opt,name=nacos,proto3" json:"nacos,omitempty"` - Apollo *RemoteConfig_Apollo `protobuf:"bytes,6,opt,name=apollo,proto3" json:"apollo,omitempty"` - Kubernetes *RemoteConfig_Kubernetes `protobuf:"bytes,7,opt,name=kubernetes,proto3" json:"kubernetes,omitempty"` - Polaris *RemoteConfig_Polaris `protobuf:"bytes,8,opt,name=polaris,proto3" json:"polaris,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // 配置类型 + Etcd *RemoteConfig_Etcd `protobuf:"bytes,2,opt,name=etcd,proto3,oneof" json:"etcd,omitempty"` + Consul *RemoteConfig_Consul `protobuf:"bytes,3,opt,name=consul,proto3,oneof" json:"consul,omitempty"` + Nacos *RemoteConfig_Nacos `protobuf:"bytes,4,opt,name=nacos,proto3,oneof" json:"nacos,omitempty"` + Apollo *RemoteConfig_Apollo `protobuf:"bytes,6,opt,name=apollo,proto3,oneof" json:"apollo,omitempty"` + Kubernetes *RemoteConfig_Kubernetes `protobuf:"bytes,7,opt,name=kubernetes,proto3,oneof" json:"kubernetes,omitempty"` + Polaris *RemoteConfig_Polaris `protobuf:"bytes,8,opt,name=polaris,proto3,oneof" json:"polaris,omitempty"` } func (x *RemoteConfig) Reset() { @@ -124,7 +124,7 @@ type RemoteConfig_Nacos struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 服务端地址 Port uint64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // 服务端端口 - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 配置键 } func (x *RemoteConfig_Nacos) Reset() { @@ -185,9 +185,9 @@ type RemoteConfig_Etcd struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // + Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // 服务端地址 + Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 配置键 } func (x *RemoteConfig_Etcd) Reset() { @@ -250,7 +250,7 @@ type RemoteConfig_Consul struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` // 网络样式 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // 服务端地址 - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 配置键 } func (x *RemoteConfig_Consul) Reset() { @@ -311,11 +311,11 @@ type RemoteConfig_Apollo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` - Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` - Secret string `protobuf:"bytes,5,opt,name=secret,proto3" json:"secret,omitempty"` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 服务端地址 + AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 应用ID + Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` // 集群 + Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` // 命名空间 + Secret string `protobuf:"bytes,5,opt,name=secret,proto3" json:"secret,omitempty"` // 密钥 } func (x *RemoteConfig_Apollo) Reset() { @@ -390,7 +390,7 @@ type RemoteConfig_Kubernetes struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // 命名空间 } func (x *RemoteConfig_Kubernetes) Reset() { @@ -477,66 +477,73 @@ var file_conf_v1_kratos_conf_config_proto_rawDesc = []byte{ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x06, 0x0a, 0x0c, 0x52, 0x65, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x07, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x65, 0x74, 0x63, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x45, 0x74, 0x63, 0x64, 0x52, 0x04, 0x65, 0x74, 0x63, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x12, 0x2e, 0x0a, - 0x05, 0x6e, 0x61, 0x63, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, + 0x45, 0x74, 0x63, 0x64, 0x48, 0x00, 0x52, 0x04, 0x65, 0x74, 0x63, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x36, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x48, 0x01, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x61, 0x63, 0x6f, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, 0x61, 0x63, 0x6f, 0x73, + 0x48, 0x02, 0x52, 0x05, 0x6e, 0x61, 0x63, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x06, + 0x61, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4e, 0x61, 0x63, 0x6f, 0x73, 0x52, 0x05, 0x6e, 0x61, 0x63, 0x6f, 0x73, 0x12, 0x31, 0x0a, - 0x06, 0x61, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x41, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x52, 0x06, 0x61, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, - 0x12, 0x3d, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x12, - 0x34, 0x0a, 0x07, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x52, 0x07, 0x70, 0x6f, - 0x6c, 0x61, 0x72, 0x69, 0x73, 0x1a, 0x47, 0x0a, 0x05, 0x4e, 0x61, 0x63, 0x6f, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x6b, - 0x0a, 0x04, 0x45, 0x74, 0x63, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x4c, 0x0a, 0x06, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x8b, 0x01, 0x0a, 0x06, 0x41, 0x70, - 0x6f, 0x6c, 0x6c, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x2a, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x1a, 0x09, 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x42, 0x87, - 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, 0x61, - 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, - 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, - 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x41, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x48, 0x03, 0x52, 0x06, 0x61, 0x70, 0x6f, 0x6c, 0x6c, + 0x6f, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x48, 0x04, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x6f, 0x6c, 0x61, + 0x72, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, + 0x6c, 0x61, 0x72, 0x69, 0x73, 0x48, 0x05, 0x52, 0x07, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, + 0x88, 0x01, 0x01, 0x1a, 0x47, 0x0a, 0x05, 0x4e, 0x61, 0x63, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x6b, 0x0a, 0x04, + 0x45, 0x74, 0x63, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x4c, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x8b, 0x01, 0x0a, 0x06, 0x41, 0x70, 0x6f, 0x6c, + 0x6c, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x2a, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x1a, 0x09, 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x65, 0x74, 0x63, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6e, 0x61, 0x63, 0x6f, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, + 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x6f, 0x6c, 0x61, 0x72, 0x69, 0x73, + 0x42, 0x87, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, + 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, + 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, + 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -668,6 +675,7 @@ func file_conf_v1_kratos_conf_config_proto_init() { } } } + file_conf_v1_kratos_conf_config_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/gen/go/conf/v1/kratos_conf_data.pb.go b/api/gen/go/conf/v1/kratos_conf_data.pb.go index 50b5aa6..3b195a2 100644 --- a/api/gen/go/conf/v1/kratos_conf_data.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_data.pb.go @@ -27,22 +27,22 @@ type Data struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Database *Data_Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` // 数据库DSN - Redis *Data_Redis `protobuf:"bytes,10,opt,name=redis,proto3" json:"redis,omitempty"` // Redis - Mongodb *Data_MongoDB `protobuf:"bytes,11,opt,name=mongodb,proto3" json:"mongodb,omitempty"` // MongoDB数据库 - ElasticSearch *Data_ElasticSearch `protobuf:"bytes,12,opt,name=elastic_search,json=elasticSearch,proto3" json:"elastic_search,omitempty"` // ElasticSearch数据库 - Cassandra *Data_Cassandra `protobuf:"bytes,13,opt,name=cassandra,proto3" json:"cassandra,omitempty"` // Cassandra数据库 - Clickhouse *Data_ClickHouse `protobuf:"bytes,20,opt,name=clickhouse,proto3" json:"clickhouse,omitempty"` // ClickHouse数据库 - Influxdb *Data_InfluxDB `protobuf:"bytes,21,opt,name=influxdb,proto3" json:"influxdb,omitempty"` // InfluxDB数据库 - Doris *Data_Doris `protobuf:"bytes,22,opt,name=doris,proto3" json:"doris,omitempty"` // Doris数据库 - Kafka *Data_Kafka `protobuf:"bytes,30,opt,name=kafka,proto3" json:"kafka,omitempty"` // Kafka服务 - Rabbitmq *Data_RabbitMQ `protobuf:"bytes,31,opt,name=rabbitmq,proto3" json:"rabbitmq,omitempty"` // RabbitMQ服务 - Mqtt *Data_Mqtt `protobuf:"bytes,32,opt,name=mqtt,proto3" json:"mqtt,omitempty"` // MQTT服务 - Activemq *Data_ActiveMQ `protobuf:"bytes,33,opt,name=activemq,proto3" json:"activemq,omitempty"` // ActiveMQ - Nats *Data_NATS `protobuf:"bytes,34,opt,name=nats,proto3" json:"nats,omitempty"` // NATS - Nsq *Data_NSQ `protobuf:"bytes,35,opt,name=nsq,proto3" json:"nsq,omitempty"` // NATS - Pulsar *Data_Pulsar `protobuf:"bytes,36,opt,name=pulsar,proto3" json:"pulsar,omitempty"` // Pulsar - Rocketmq *Data_RocketMQ `protobuf:"bytes,38,opt,name=rocketmq,proto3" json:"rocketmq,omitempty"` // RocketMQ + Database *Data_Database `protobuf:"bytes,1,opt,name=database,proto3,oneof" json:"database,omitempty"` // 数据库DSN + Redis *Data_Redis `protobuf:"bytes,10,opt,name=redis,proto3,oneof" json:"redis,omitempty"` // Redis + Mongodb *Data_MongoDB `protobuf:"bytes,11,opt,name=mongodb,proto3,oneof" json:"mongodb,omitempty"` // MongoDB数据库 + ElasticSearch *Data_ElasticSearch `protobuf:"bytes,12,opt,name=elastic_search,json=elasticSearch,proto3,oneof" json:"elastic_search,omitempty"` // ElasticSearch数据库 + Cassandra *Data_Cassandra `protobuf:"bytes,13,opt,name=cassandra,proto3,oneof" json:"cassandra,omitempty"` // Cassandra数据库 + Clickhouse *Data_ClickHouse `protobuf:"bytes,20,opt,name=clickhouse,proto3,oneof" json:"clickhouse,omitempty"` // ClickHouse数据库 + Influxdb *Data_InfluxDB `protobuf:"bytes,21,opt,name=influxdb,proto3,oneof" json:"influxdb,omitempty"` // InfluxDB数据库 + Doris *Data_Doris `protobuf:"bytes,22,opt,name=doris,proto3,oneof" json:"doris,omitempty"` // Doris数据库 + Kafka *Data_Kafka `protobuf:"bytes,30,opt,name=kafka,proto3,oneof" json:"kafka,omitempty"` // Kafka服务 + Rabbitmq *Data_RabbitMQ `protobuf:"bytes,31,opt,name=rabbitmq,proto3,oneof" json:"rabbitmq,omitempty"` // RabbitMQ服务 + Mqtt *Data_Mqtt `protobuf:"bytes,32,opt,name=mqtt,proto3,oneof" json:"mqtt,omitempty"` // MQTT服务 + Activemq *Data_ActiveMQ `protobuf:"bytes,33,opt,name=activemq,proto3,oneof" json:"activemq,omitempty"` // ActiveMQ + Nats *Data_NATS `protobuf:"bytes,34,opt,name=nats,proto3,oneof" json:"nats,omitempty"` // NATS + Nsq *Data_NSQ `protobuf:"bytes,35,opt,name=nsq,proto3,oneof" json:"nsq,omitempty"` // NATS + Pulsar *Data_Pulsar `protobuf:"bytes,36,opt,name=pulsar,proto3,oneof" json:"pulsar,omitempty"` // Pulsar + Rocketmq *Data_RocketMQ `protobuf:"bytes,38,opt,name=rocketmq,proto3,oneof" json:"rocketmq,omitempty"` // RocketMQ } func (x *Data) Reset() { @@ -1586,53 +1586,58 @@ var file_conf_v1_kratos_conf_data_proto_rawDesc = []byte{ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x21, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x2f, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x23, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x34, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x12, 0x26, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, - 0x73, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x67, - 0x6f, 0x64, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, 0x07, 0x6d, - 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x12, 0x3f, 0x0a, 0x0e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, - 0x63, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x6c, 0x61, 0x73, 0x74, - 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x0d, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, - 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x09, 0x63, 0x61, 0x73, 0x73, 0x61, - 0x6e, 0x64, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x72, 0x61, - 0x52, 0x09, 0x63, 0x61, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x72, 0x61, 0x12, 0x35, 0x0a, 0x0a, 0x63, - 0x6c, 0x69, 0x63, 0x6b, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x63, - 0x6b, 0x48, 0x6f, 0x75, 0x73, 0x65, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x68, 0x6f, 0x75, - 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x52, 0x08, 0x69, 0x6e, 0x66, 0x6c, 0x75, - 0x78, 0x64, 0x62, 0x12, 0x26, 0x0a, 0x05, 0x64, 0x6f, 0x72, 0x69, 0x73, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, - 0x6f, 0x72, 0x69, 0x73, 0x52, 0x05, 0x64, 0x6f, 0x72, 0x69, 0x73, 0x12, 0x26, 0x0a, 0x05, 0x6b, - 0x61, 0x66, 0x6b, 0x61, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x52, 0x05, 0x6b, 0x61, - 0x66, 0x6b, 0x61, 0x12, 0x2f, 0x0a, 0x08, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x18, - 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x52, 0x08, 0x72, 0x61, 0x62, 0x62, - 0x69, 0x74, 0x6d, 0x71, 0x12, 0x23, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x18, 0x20, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4d, - 0x71, 0x74, 0x74, 0x52, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x6d, 0x71, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x51, - 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x12, 0x23, 0x0a, 0x04, 0x6e, 0x61, - 0x74, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x41, 0x54, 0x53, 0x52, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x12, - 0x20, 0x0a, 0x03, 0x6e, 0x73, 0x71, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x53, 0x51, 0x52, 0x03, 0x6e, 0x73, - 0x71, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x18, 0x24, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, - 0x6c, 0x73, 0x61, 0x72, 0x52, 0x06, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x12, 0x2f, 0x0a, 0x08, - 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x4d, 0x51, 0x52, 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x1a, 0xeb, 0x02, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x48, 0x02, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, + 0x64, 0x62, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x0e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, + 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x6c, 0x61, 0x73, 0x74, 0x69, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x03, 0x52, 0x0d, 0x65, 0x6c, 0x61, 0x73, 0x74, + 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x09, 0x63, + 0x61, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x73, 0x73, 0x61, + 0x6e, 0x64, 0x72, 0x61, 0x48, 0x04, 0x52, 0x09, 0x63, 0x61, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x72, + 0x61, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x68, 0x6f, 0x75, + 0x73, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x48, 0x6f, 0x75, 0x73, 0x65, 0x48, + 0x05, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x34, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x18, 0x15, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x49, + 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x48, 0x06, 0x52, 0x08, 0x69, 0x6e, 0x66, 0x6c, 0x75, + 0x78, 0x64, 0x62, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x05, 0x64, 0x6f, 0x72, 0x69, 0x73, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x44, 0x6f, 0x72, 0x69, 0x73, 0x48, 0x07, 0x52, 0x05, 0x64, 0x6f, 0x72, 0x69, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x18, 0x1e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, + 0x61, 0x66, 0x6b, 0x61, 0x48, 0x08, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x88, 0x01, 0x01, + 0x12, 0x34, 0x0a, 0x08, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x18, 0x1f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, + 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x48, 0x09, 0x52, 0x08, 0x72, 0x61, 0x62, 0x62, 0x69, + 0x74, 0x6d, 0x71, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x18, 0x20, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x4d, 0x71, 0x74, 0x74, 0x48, 0x0a, 0x52, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x34, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x51, 0x48, 0x0b, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x6d, 0x71, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x4e, 0x41, 0x54, 0x53, 0x48, 0x0c, 0x52, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x25, 0x0a, 0x03, 0x6e, 0x73, 0x71, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x53, 0x51, 0x48, 0x0d, 0x52, + 0x03, 0x6e, 0x73, 0x71, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x75, 0x6c, 0x73, 0x61, + 0x72, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x48, 0x0e, 0x52, 0x06, 0x70, 0x75, + 0x6c, 0x73, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x6d, 0x71, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x51, 0x48, 0x0f, + 0x52, 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x88, 0x01, 0x01, 0x1a, 0xeb, 0x02, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, @@ -1854,7 +1859,19 @@ var file_conf_v1_kratos_conf_data_proto_rawDesc = []byte{ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x85, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, + 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x42, 0x11, 0x0a, 0x0f, 0x5f, + 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x63, 0x61, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x72, 0x61, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x64, 0x6f, 0x72, + 0x69, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x71, + 0x74, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6e, 0x73, 0x71, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x42, 0x85, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x13, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, @@ -2160,6 +2177,7 @@ func file_conf_v1_kratos_conf_data_proto_init() { } } } + file_conf_v1_kratos_conf_data_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/gen/go/conf/v1/kratos_conf_logger.pb.go b/api/gen/go/conf/v1/kratos_conf_logger.pb.go index dff7884..37f458e 100644 --- a/api/gen/go/conf/v1/kratos_conf_logger.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_logger.pb.go @@ -27,11 +27,11 @@ type Logger struct { unknownFields protoimpl.UnknownFields Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Zap *Logger_Zap `protobuf:"bytes,2,opt,name=zap,proto3" json:"zap,omitempty"` - Logrus *Logger_Logrus `protobuf:"bytes,3,opt,name=logrus,proto3" json:"logrus,omitempty"` - Fluent *Logger_Fluent `protobuf:"bytes,4,opt,name=fluent,proto3" json:"fluent,omitempty"` - Aliyun *Logger_Aliyun `protobuf:"bytes,5,opt,name=aliyun,proto3" json:"aliyun,omitempty"` - Tencent *Logger_Tencent `protobuf:"bytes,6,opt,name=tencent,proto3" json:"tencent,omitempty"` + Zap *Logger_Zap `protobuf:"bytes,2,opt,name=zap,proto3,oneof" json:"zap,omitempty"` + Logrus *Logger_Logrus `protobuf:"bytes,3,opt,name=logrus,proto3,oneof" json:"logrus,omitempty"` + Fluent *Logger_Fluent `protobuf:"bytes,4,opt,name=fluent,proto3,oneof" json:"fluent,omitempty"` + Aliyun *Logger_Aliyun `protobuf:"bytes,5,opt,name=aliyun,proto3,oneof" json:"aliyun,omitempty"` + Tencent *Logger_Tencent `protobuf:"bytes,6,opt,name=tencent,proto3,oneof" json:"tencent,omitempty"` } func (x *Logger) Reset() { @@ -465,72 +465,77 @@ var File_conf_v1_kratos_conf_logger_proto protoreflect.FileDescriptor var file_conf_v1_kratos_conf_logger_proto_rawDesc = []byte{ 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0xf6, 0x06, 0x0a, 0x06, 0x4c, 0x6f, 0x67, + 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0xc4, 0x07, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x03, 0x7a, 0x61, 0x70, 0x18, 0x02, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x7a, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, - 0x65, 0x72, 0x2e, 0x5a, 0x61, 0x70, 0x52, 0x03, 0x7a, 0x61, 0x70, 0x12, 0x2b, 0x0a, 0x06, 0x6c, - 0x6f, 0x67, 0x72, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x72, 0x75, 0x73, - 0x52, 0x06, 0x6c, 0x6f, 0x67, 0x72, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x06, 0x66, 0x6c, 0x75, 0x65, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, - 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x66, - 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x6c, 0x69, 0x79, 0x75, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, - 0x67, 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x69, 0x79, 0x75, 0x6e, 0x52, 0x06, 0x61, 0x6c, 0x69, 0x79, - 0x75, 0x6e, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, - 0x72, 0x2e, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, - 0x6e, 0x74, 0x1a, 0x8c, 0x01, 0x0a, 0x03, 0x5a, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, - 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x72, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, - 0x24, 0x0a, 0x06, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x2e, 0x5a, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x7a, 0x61, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x30, 0x0a, 0x06, 0x6c, 0x6f, 0x67, 0x72, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x4c, + 0x6f, 0x67, 0x72, 0x75, 0x73, 0x48, 0x01, 0x52, 0x06, 0x6c, 0x6f, 0x67, 0x72, 0x75, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x30, 0x0a, 0x06, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x2e, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x48, 0x02, 0x52, 0x06, 0x66, 0x6c, 0x75, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x6c, 0x69, 0x79, 0x75, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, 0x6f, 0x67, 0x67, + 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x69, 0x79, 0x75, 0x6e, 0x48, 0x03, 0x52, 0x06, 0x61, 0x6c, 0x69, + 0x79, 0x75, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x04, 0x52, + 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x8c, 0x01, 0x0a, 0x03, + 0x5a, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x06, 0x4c, + 0x6f, 0x67, 0x72, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x24, 0x0a, 0x06, 0x46, 0x6c, 0x75, 0x65, + 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x82, + 0x01, 0x0a, 0x06, 0x41, 0x6c, 0x69, 0x79, 0x75, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x82, 0x01, 0x0a, 0x06, 0x41, 0x6c, 0x69, 0x79, 0x75, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x23, + 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x1a, 0x84, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x84, 0x01, 0x0a, 0x07, 0x54, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x42, 0x87, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, - 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, - 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, - 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, + 0x61, 0x70, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x6f, 0x67, 0x72, 0x75, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x6c, 0x69, + 0x79, 0x75, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, + 0x87, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, + 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, + 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, + 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -646,6 +651,7 @@ func file_conf_v1_kratos_conf_logger_proto_init() { } } } + file_conf_v1_kratos_conf_logger_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/gen/go/conf/v1/kratos_conf_oss.pb.go b/api/gen/go/conf/v1/kratos_conf_oss.pb.go index 0dfa8b2..00ea499 100644 --- a/api/gen/go/conf/v1/kratos_conf_oss.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_oss.pb.go @@ -73,13 +73,14 @@ type OSS_MinIO struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端端口 - AccessKey string `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` // 访问密钥 - SecretKey string `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` // 密钥 - Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // 令牌 - UseSsl bool `protobuf:"varint,5,opt,name=use_ssl,json=useSsl,proto3" json:"use_ssl,omitempty"` // 使用SSL - UploadHost string `protobuf:"bytes,6,opt,name=upload_host,json=uploadHost,proto3" json:"upload_host,omitempty"` // 上传链接的主机名 - DownloadHost string `protobuf:"bytes,7,opt,name=download_host,json=downloadHost,proto3" json:"download_host,omitempty"` // 下载链接的主机名 + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端端口 + AccessKey string `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` // 访问密钥 + SecretKey string `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` // 密钥 + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // 令牌 + UseSsl bool `protobuf:"varint,10,opt,name=use_ssl,json=useSsl,proto3" json:"use_ssl,omitempty"` // 使用SSL + Tls *TLS `protobuf:"bytes,11,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 + UploadHost string `protobuf:"bytes,20,opt,name=upload_host,json=uploadHost,proto3" json:"upload_host,omitempty"` // 上传链接的主机名 + DownloadHost string `protobuf:"bytes,21,opt,name=download_host,json=downloadHost,proto3" json:"download_host,omitempty"` // 下载链接的主机名 } func (x *OSS_MinIO) Reset() { @@ -149,6 +150,13 @@ func (x *OSS_MinIO) GetUseSsl() bool { return false } +func (x *OSS_MinIO) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + func (x *OSS_MinIO) GetUploadHost() string { if x != nil { return x.UploadHost @@ -168,32 +176,36 @@ var File_conf_v1_kratos_conf_oss_proto protoreflect.FileDescriptor var file_conf_v1_kratos_conf_oss_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6f, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0x85, 0x02, 0x0a, 0x03, 0x4f, 0x53, 0x53, 0x12, 0x25, 0x0a, - 0x05, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x2e, 0x4f, 0x53, 0x53, 0x2e, 0x4d, 0x69, 0x6e, 0x49, 0x4f, 0x52, 0x05, 0x6d, - 0x69, 0x6e, 0x69, 0x6f, 0x1a, 0xd6, 0x01, 0x0a, 0x05, 0x4d, 0x69, 0x6e, 0x49, 0x4f, 0x12, 0x1a, - 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, - 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x73, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x53, 0x73, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x84, 0x01, - 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x12, 0x4b, 0x72, 0x61, 0x74, - 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x4f, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, - 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, - 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, - 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, - 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x6c, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x02, 0x0a, 0x03, 0x4f, 0x53, 0x53, 0x12, 0x25, 0x0a, 0x05, + 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x2e, 0x4f, 0x53, 0x53, 0x2e, 0x4d, 0x69, 0x6e, 0x49, 0x4f, 0x52, 0x05, 0x6d, 0x69, + 0x6e, 0x69, 0x6f, 0x1a, 0xf3, 0x01, 0x0a, 0x05, 0x4d, 0x69, 0x6e, 0x49, 0x4f, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x73, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x53, 0x73, 0x6c, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, + 0x74, 0x6c, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x48, 0x6f, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x84, 0x01, 0x0a, 0x08, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x12, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x4f, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, + 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, + 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -212,14 +224,16 @@ var file_conf_v1_kratos_conf_oss_proto_msgTypes = make([]protoimpl.MessageInfo, var file_conf_v1_kratos_conf_oss_proto_goTypes = []interface{}{ (*OSS)(nil), // 0: conf.OSS (*OSS_MinIO)(nil), // 1: conf.OSS.MinIO + (*TLS)(nil), // 2: conf.TLS } var file_conf_v1_kratos_conf_oss_proto_depIdxs = []int32{ 1, // 0: conf.OSS.minio:type_name -> conf.OSS.MinIO - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 1: conf.OSS.MinIO.tls:type_name -> conf.TLS + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_conf_v1_kratos_conf_oss_proto_init() } @@ -227,6 +241,7 @@ func file_conf_v1_kratos_conf_oss_proto_init() { if File_conf_v1_kratos_conf_oss_proto != nil { return } + file_conf_v1_kratos_conf_tls_proto_init() if !protoimpl.UnsafeEnabled { file_conf_v1_kratos_conf_oss_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OSS); i { diff --git a/api/gen/go/conf/v1/kratos_conf_server.pb.go b/api/gen/go/conf/v1/kratos_conf_server.pb.go index bc82210..f665ce1 100644 --- a/api/gen/go/conf/v1/kratos_conf_server.pb.go +++ b/api/gen/go/conf/v1/kratos_conf_server.pb.go @@ -27,25 +27,25 @@ type Server struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Rest *Server_REST `protobuf:"bytes,1,opt,name=rest,proto3" json:"rest,omitempty"` // REST服务 - Grpc *Server_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"` // gRPC服务 - Graphql *Server_GraphQL `protobuf:"bytes,3,opt,name=graphql,proto3" json:"graphql,omitempty"` // GraphQL服务 - Thrift *Server_Thrift `protobuf:"bytes,4,opt,name=thrift,proto3" json:"thrift,omitempty"` // Thrift服务 - Mqtt *Server_Mqtt `protobuf:"bytes,10,opt,name=mqtt,proto3" json:"mqtt,omitempty"` // MQTT服务 - Kafka *Server_Kafka `protobuf:"bytes,11,opt,name=kafka,proto3" json:"kafka,omitempty"` // Kafka服务 - Rabbitmq *Server_RabbitMQ `protobuf:"bytes,12,opt,name=rabbitmq,proto3" json:"rabbitmq,omitempty"` // RabbitMQ服务 - Activemq *Server_ActiveMQ `protobuf:"bytes,13,opt,name=activemq,proto3" json:"activemq,omitempty"` // ActiveMQ - Nats *Server_NATS `protobuf:"bytes,14,opt,name=nats,proto3" json:"nats,omitempty"` // NATS - Nsq *Server_NSQ `protobuf:"bytes,15,opt,name=nsq,proto3" json:"nsq,omitempty"` // NATS - Pulsar *Server_Pulsar `protobuf:"bytes,16,opt,name=pulsar,proto3" json:"pulsar,omitempty"` // Pulsar - Redis *Server_Redis `protobuf:"bytes,17,opt,name=redis,proto3" json:"redis,omitempty"` // Redis - Rocketmq *Server_RocketMQ `protobuf:"bytes,18,opt,name=rocketmq,proto3" json:"rocketmq,omitempty"` // RocketMQ - Websocket *Server_Websocket `protobuf:"bytes,20,opt,name=websocket,proto3" json:"websocket,omitempty"` // Websocket服务 - Sse *Server_SSE `protobuf:"bytes,21,opt,name=sse,proto3" json:"sse,omitempty"` // SSE服务 - Socketio *Server_SocketIO `protobuf:"bytes,22,opt,name=socketio,proto3" json:"socketio,omitempty"` // SocketIO服务 - Signalr *Server_SignalR `protobuf:"bytes,23,opt,name=signalr,proto3" json:"signalr,omitempty"` // SignalR服务 - Asynq *Server_Asynq `protobuf:"bytes,30,opt,name=asynq,proto3" json:"asynq,omitempty"` // Asynq服务 - Machinery *Server_Machinery `protobuf:"bytes,31,opt,name=machinery,proto3" json:"machinery,omitempty"` // Machinery服务 + Rest *Server_REST `protobuf:"bytes,1,opt,name=rest,proto3,oneof" json:"rest,omitempty"` // REST服务 + Grpc *Server_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"` // gRPC服务 + Graphql *Server_GraphQL `protobuf:"bytes,3,opt,name=graphql,proto3,oneof" json:"graphql,omitempty"` // GraphQL服务 + Thrift *Server_Thrift `protobuf:"bytes,4,opt,name=thrift,proto3,oneof" json:"thrift,omitempty"` // Thrift服务 + Mqtt *Server_Mqtt `protobuf:"bytes,10,opt,name=mqtt,proto3,oneof" json:"mqtt,omitempty"` // MQTT服务 + Kafka *Server_Kafka `protobuf:"bytes,11,opt,name=kafka,proto3,oneof" json:"kafka,omitempty"` // Kafka服务 + Rabbitmq *Server_RabbitMQ `protobuf:"bytes,12,opt,name=rabbitmq,proto3,oneof" json:"rabbitmq,omitempty"` // RabbitMQ服务 + Activemq *Server_ActiveMQ `protobuf:"bytes,13,opt,name=activemq,proto3,oneof" json:"activemq,omitempty"` // ActiveMQ + Nats *Server_NATS `protobuf:"bytes,14,opt,name=nats,proto3,oneof" json:"nats,omitempty"` // NATS + Nsq *Server_NSQ `protobuf:"bytes,15,opt,name=nsq,proto3,oneof" json:"nsq,omitempty"` // NATS + Pulsar *Server_Pulsar `protobuf:"bytes,16,opt,name=pulsar,proto3,oneof" json:"pulsar,omitempty"` // Pulsar + Redis *Server_Redis `protobuf:"bytes,17,opt,name=redis,proto3,oneof" json:"redis,omitempty"` // Redis + Rocketmq *Server_RocketMQ `protobuf:"bytes,18,opt,name=rocketmq,proto3,oneof" json:"rocketmq,omitempty"` // RocketMQ + Websocket *Server_Websocket `protobuf:"bytes,20,opt,name=websocket,proto3,oneof" json:"websocket,omitempty"` // Websocket服务 + Sse *Server_SSE `protobuf:"bytes,21,opt,name=sse,proto3,oneof" json:"sse,omitempty"` // SSE服务 + Socketio *Server_SocketIO `protobuf:"bytes,22,opt,name=socketio,proto3,oneof" json:"socketio,omitempty"` // SocketIO服务 + Signalr *Server_SignalR `protobuf:"bytes,23,opt,name=signalr,proto3,oneof" json:"signalr,omitempty"` // SignalR服务 + Asynq *Server_Asynq `protobuf:"bytes,30,opt,name=asynq,proto3,oneof" json:"asynq,omitempty"` // Asynq服务 + Machinery *Server_Machinery `protobuf:"bytes,31,opt,name=machinery,proto3,oneof" json:"machinery,omitempty"` // Machinery服务 } func (x *Server) Reset() { @@ -219,13 +219,14 @@ type Server_REST struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // 网络 - Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 - Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 - Cors *Server_REST_CORS `protobuf:"bytes,4,opt,name=cors,proto3" json:"cors,omitempty"` // 服务监听地址 - Middleware *Middleware `protobuf:"bytes,5,opt,name=middleware,proto3" json:"middleware,omitempty"` // 中间件 - EnableSwagger bool `protobuf:"varint,6,opt,name=enable_swagger,json=enableSwagger,proto3" json:"enable_swagger,omitempty"` // 启用SwaggerUI - EnablePprof bool `protobuf:"varint,7,opt,name=enable_pprof,json=enablePprof,proto3" json:"enable_pprof,omitempty"` // 启用pprof + Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // 网络 + Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 + Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + Cors *Server_REST_CORS `protobuf:"bytes,10,opt,name=cors,proto3" json:"cors,omitempty"` // 服务监听地址 + Middleware *Middleware `protobuf:"bytes,11,opt,name=middleware,proto3" json:"middleware,omitempty"` // 中间件 + Tls *TLS `protobuf:"bytes,12,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 + EnableSwagger bool `protobuf:"varint,20,opt,name=enable_swagger,json=enableSwagger,proto3" json:"enable_swagger,omitempty"` // 启用SwaggerUI + EnablePprof bool `protobuf:"varint,21,opt,name=enable_pprof,json=enablePprof,proto3" json:"enable_pprof,omitempty"` // 启用pprof } func (x *Server_REST) Reset() { @@ -295,6 +296,13 @@ func (x *Server_REST) GetMiddleware() *Middleware { return nil } +func (x *Server_REST) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + func (x *Server_REST) GetEnableSwagger() bool { if x != nil { return x.EnableSwagger @@ -319,6 +327,7 @@ type Server_GRPC struct { Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 Middleware *Middleware `protobuf:"bytes,4,opt,name=middleware,proto3" json:"middleware,omitempty"` + Tls *TLS `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_GRPC) Reset() { @@ -381,6 +390,13 @@ func (x *Server_GRPC) GetMiddleware() *Middleware { return nil } +func (x *Server_GRPC) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // Websocket type Server_Websocket struct { state protoimpl.MessageState @@ -392,6 +408,7 @@ type Server_Websocket struct { Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // 路径 Codec string `protobuf:"bytes,4,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + Tls *TLS `protobuf:"bytes,6,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Websocket) Reset() { @@ -461,6 +478,13 @@ func (x *Server_Websocket) GetTimeout() *durationpb.Duration { return nil } +func (x *Server_Websocket) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // MQTT type Server_Mqtt struct { state protoimpl.MessageState @@ -469,6 +493,7 @@ type Server_Mqtt struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Mqtt) Reset() { @@ -517,6 +542,13 @@ func (x *Server_Mqtt) GetCodec() string { return "" } +func (x *Server_Mqtt) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // Kafka type Server_Kafka struct { state protoimpl.MessageState @@ -525,6 +557,7 @@ type Server_Kafka struct { Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Kafka) Reset() { @@ -573,6 +606,13 @@ func (x *Server_Kafka) GetCodec() string { return "" } +func (x *Server_Kafka) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // RabbitMQ type Server_RabbitMQ struct { state protoimpl.MessageState @@ -581,6 +621,7 @@ type Server_RabbitMQ struct { Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_RabbitMQ) Reset() { @@ -629,6 +670,13 @@ func (x *Server_RabbitMQ) GetCodec() string { return "" } +func (x *Server_RabbitMQ) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_ActiveMQ struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -636,6 +684,7 @@ type Server_ActiveMQ struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_ActiveMQ) Reset() { @@ -684,6 +733,13 @@ func (x *Server_ActiveMQ) GetCodec() string { return "" } +func (x *Server_ActiveMQ) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_NATS struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -691,6 +747,7 @@ type Server_NATS struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_NATS) Reset() { @@ -739,6 +796,13 @@ func (x *Server_NATS) GetCodec() string { return "" } +func (x *Server_NATS) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_NSQ struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -746,6 +810,7 @@ type Server_NSQ struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_NSQ) Reset() { @@ -794,6 +859,13 @@ func (x *Server_NSQ) GetCodec() string { return "" } +func (x *Server_NSQ) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_Pulsar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -801,6 +873,7 @@ type Server_Pulsar struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Pulsar) Reset() { @@ -849,6 +922,13 @@ func (x *Server_Pulsar) GetCodec() string { return "" } +func (x *Server_Pulsar) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_Redis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -856,6 +936,7 @@ type Server_Redis struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 对端网络地址 Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器: json,xml,yaml... + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Redis) Reset() { @@ -904,6 +985,13 @@ func (x *Server_Redis) GetCodec() string { return "" } +func (x *Server_Redis) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_RocketMQ struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -920,6 +1008,7 @@ type Server_RocketMQ struct { Namespace string `protobuf:"bytes,9,opt,name=namespace,proto3" json:"namespace,omitempty"` InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` GroupName string `protobuf:"bytes,11,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` + Tls *TLS `protobuf:"bytes,12,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_RocketMQ) Reset() { @@ -1031,6 +1120,13 @@ func (x *Server_RocketMQ) GetGroupName() string { return "" } +func (x *Server_RocketMQ) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // Asynq type Server_Asynq struct { state protoimpl.MessageState @@ -1041,6 +1137,7 @@ type Server_Asynq struct { Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // redis登录密码 Db int32 `protobuf:"varint,3,opt,name=db,proto3" json:"db,omitempty"` // 数据库索引 Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` // 时区 + Tls *TLS `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Asynq) Reset() { @@ -1103,6 +1200,13 @@ func (x *Server_Asynq) GetLocation() string { return "" } +func (x *Server_Asynq) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // Machinery type Server_Machinery struct { state protoimpl.MessageState @@ -1111,6 +1215,7 @@ type Server_Machinery struct { Brokers []string `protobuf:"bytes,1,rep,name=brokers,proto3" json:"brokers,omitempty"` // broker的地址,可以根据实际使用的存储介质,分别指定Redis、AMQP或AWS SQS; Backends []string `protobuf:"bytes,2,rep,name=backends,proto3" json:"backends,omitempty"` // backend配置,用来指定存放结果的介质的配置。可以根据需求,分别指定为:Redis、memcached或mongodb等; + Tls *TLS `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Machinery) Reset() { @@ -1159,6 +1264,13 @@ func (x *Server_Machinery) GetBackends() []string { return nil } +func (x *Server_Machinery) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // SSE type Server_SSE struct { state protoimpl.MessageState @@ -1169,12 +1281,13 @@ type Server_SSE struct { Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // 路径 Codec string `protobuf:"bytes,4,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器 - Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 - EventTtl *durationpb.Duration `protobuf:"bytes,6,opt,name=event_ttl,json=eventTtl,proto3" json:"event_ttl,omitempty"` // 超时时间 - AutoStream bool `protobuf:"varint,7,opt,name=auto_stream,json=autoStream,proto3" json:"auto_stream,omitempty"` // - AutoReply bool `protobuf:"varint,8,opt,name=auto_reply,json=autoReply,proto3" json:"auto_reply,omitempty"` // - SplitData bool `protobuf:"varint,9,opt,name=split_data,json=splitData,proto3" json:"split_data,omitempty"` // - EncodeBase64 bool `protobuf:"varint,10,opt,name=encode_base64,json=encodeBase64,proto3" json:"encode_base64,omitempty"` // 进行BASE64编码 + Tls *TLS `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 + Timeout *durationpb.Duration `protobuf:"bytes,10,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 + EventTtl *durationpb.Duration `protobuf:"bytes,11,opt,name=event_ttl,json=eventTtl,proto3" json:"event_ttl,omitempty"` // + AutoStream bool `protobuf:"varint,20,opt,name=auto_stream,json=autoStream,proto3" json:"auto_stream,omitempty"` // + AutoReply bool `protobuf:"varint,21,opt,name=auto_reply,json=autoReply,proto3" json:"auto_reply,omitempty"` // + SplitData bool `protobuf:"varint,22,opt,name=split_data,json=splitData,proto3" json:"split_data,omitempty"` // + EncodeBase64 bool `protobuf:"varint,23,opt,name=encode_base64,json=encodeBase64,proto3" json:"encode_base64,omitempty"` // 进行BASE64编码 } func (x *Server_SSE) Reset() { @@ -1237,6 +1350,13 @@ func (x *Server_SSE) GetCodec() string { return "" } +func (x *Server_SSE) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + func (x *Server_SSE) GetTimeout() *durationpb.Duration { if x != nil { return x.Timeout @@ -1289,6 +1409,7 @@ type Server_SocketIO struct { Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // 路径 Codec string `protobuf:"bytes,4,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器 + Tls *TLS `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_SocketIO) Reset() { @@ -1351,6 +1472,13 @@ func (x *Server_SocketIO) GetCodec() string { return "" } +func (x *Server_SocketIO) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // SignalR type Server_SignalR struct { state protoimpl.MessageState @@ -1360,8 +1488,9 @@ type Server_SignalR struct { Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // 网络 Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务监听地址 Codec string `protobuf:"bytes,3,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器 - KeepAliveInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=keep_alive_interval,json=keepAliveInterval,proto3" json:"keep_alive_interval,omitempty"` // 超时时间 - ChanReceiveTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=chan_receive_timeout,json=chanReceiveTimeout,proto3" json:"chan_receive_timeout,omitempty"` // 超时时间 + Tls *TLS `protobuf:"bytes,4,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 + KeepAliveInterval *durationpb.Duration `protobuf:"bytes,10,opt,name=keep_alive_interval,json=keepAliveInterval,proto3" json:"keep_alive_interval,omitempty"` // 超时时间 + ChanReceiveTimeout *durationpb.Duration `protobuf:"bytes,11,opt,name=chan_receive_timeout,json=chanReceiveTimeout,proto3" json:"chan_receive_timeout,omitempty"` // 超时时间 Debug bool `protobuf:"varint,6,opt,name=debug,proto3" json:"debug,omitempty"` // 调试开关 StreamBufferCapacity uint32 `protobuf:"varint,7,opt,name=stream_buffer_capacity,json=streamBufferCapacity,proto3" json:"stream_buffer_capacity,omitempty"` // } @@ -1419,6 +1548,13 @@ func (x *Server_SignalR) GetCodec() string { return "" } +func (x *Server_SignalR) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + func (x *Server_SignalR) GetKeepAliveInterval() *durationpb.Duration { if x != nil { return x.KeepAliveInterval @@ -1459,6 +1595,7 @@ type Server_GraphQL struct { Codec string `protobuf:"bytes,4,opt,name=codec,proto3" json:"codec,omitempty"` // 编解码器 Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间 StrictSlash bool `protobuf:"varint,6,opt,name=strict_slash,json=strictSlash,proto3" json:"strict_slash,omitempty"` + Tls *TLS `protobuf:"bytes,7,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_GraphQL) Reset() { @@ -1535,6 +1672,13 @@ func (x *Server_GraphQL) GetStrictSlash() bool { return false } +func (x *Server_GraphQL) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + // Thrift type Server_Thrift struct { state protoimpl.MessageState @@ -1547,6 +1691,7 @@ type Server_Thrift struct { Buffered bool `protobuf:"varint,4,opt,name=buffered,proto3" json:"buffered,omitempty"` Framed bool `protobuf:"varint,5,opt,name=framed,proto3" json:"framed,omitempty"` BufferSize bool `protobuf:"varint,6,opt,name=buffer_size,json=bufferSize,proto3" json:"buffer_size,omitempty"` + Tls *TLS `protobuf:"bytes,7,opt,name=tls,proto3" json:"tls,omitempty"` // TLS配置 } func (x *Server_Thrift) Reset() { @@ -1623,6 +1768,13 @@ func (x *Server_Thrift) GetBufferSize() bool { return false } +func (x *Server_Thrift) GetTls() *TLS { + if x != nil { + return x.Tls + } + return nil +} + type Server_REST_CORS struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1695,246 +1847,301 @@ var file_conf_v1_kratos_conf_server_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, - 0x1c, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x65, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x52, 0x50, - 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x2e, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x52, 0x07, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x12, 0x2b, 0x0a, 0x06, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x52, 0x06, 0x74, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x23, + 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x4d, 0x71, 0x74, 0x74, 0x52, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x6b, - 0x61, 0x66, 0x6b, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x52, 0x05, - 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, - 0x71, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x52, 0x08, - 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x6d, 0x71, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, - 0x51, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x12, 0x25, 0x0a, 0x04, 0x6e, - 0x61, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4e, 0x41, 0x54, 0x53, 0x52, 0x04, 0x6e, 0x61, - 0x74, 0x73, 0x12, 0x22, 0x0a, 0x03, 0x6e, 0x73, 0x71, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4e, 0x53, - 0x51, 0x52, 0x03, 0x6e, 0x73, 0x71, 0x12, 0x2b, 0x0a, 0x06, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x52, 0x06, 0x70, 0x75, 0x6c, - 0x73, 0x61, 0x72, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x11, 0x20, 0x01, + 0x2e, 0x47, 0x52, 0x50, 0x43, 0x48, 0x01, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x88, 0x01, 0x01, + 0x12, 0x33, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x48, 0x02, 0x52, 0x07, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x71, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x06, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x48, 0x03, 0x52, 0x06, 0x74, 0x68, + 0x72, 0x69, 0x66, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x4d, 0x71, 0x74, 0x74, 0x48, 0x04, 0x52, 0x04, 0x6d, 0x71, 0x74, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x31, 0x0a, - 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x51, 0x52, 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x12, 0x34, 0x0a, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x14, 0x20, + 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x48, 0x05, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x88, + 0x01, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4d, 0x51, 0x48, 0x06, 0x52, 0x08, 0x72, + 0x61, 0x62, 0x62, 0x69, 0x74, 0x6d, 0x71, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x4d, 0x51, 0x48, 0x07, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x71, 0x88, + 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4e, + 0x41, 0x54, 0x53, 0x48, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x27, + 0x0a, 0x03, 0x6e, 0x73, 0x71, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4e, 0x53, 0x51, 0x48, 0x09, 0x52, + 0x03, 0x6e, 0x73, 0x71, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x75, 0x6c, 0x73, 0x61, + 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x48, 0x0a, 0x52, 0x06, + 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x0b, 0x52, 0x05, + 0x72, 0x65, 0x64, 0x69, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x6d, 0x71, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, + 0x51, 0x48, 0x0c, 0x52, 0x08, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x88, 0x01, 0x01, + 0x12, 0x39, 0x0a, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x09, 0x77, 0x65, 0x62, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x73, 0x73, 0x65, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x53, 0x53, 0x45, 0x52, 0x03, 0x73, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x69, 0x6f, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x49, 0x4f, 0x52, 0x08, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x6f, 0x12, 0x2e, 0x0a, - 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x52, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x12, 0x28, 0x0a, - 0x05, 0x61, 0x73, 0x79, 0x6e, 0x71, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x71, - 0x52, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x71, 0x12, 0x34, 0x0a, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x72, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x1a, 0xe7, 0x02, - 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x63, 0x6f, 0x72, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x2e, 0x43, 0x4f, 0x52, 0x53, 0x52, - 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, - 0x61, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, - 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, - 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x70, 0x72, 0x6f, - 0x66, 0x1a, 0x54, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x1a, 0x9b, 0x01, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, - 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, - 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, - 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, + 0x72, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x0d, 0x52, 0x09, 0x77, + 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x03, 0x73, + 0x73, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x53, 0x45, 0x48, 0x0e, 0x52, 0x03, 0x73, 0x73, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x6f, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x4f, 0x48, 0x0f, 0x52, + 0x08, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x07, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x48, 0x10, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x72, 0x88, 0x01, + 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x71, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, + 0x73, 0x79, 0x6e, 0x71, 0x48, 0x11, 0x52, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x71, 0x88, 0x01, 0x01, + 0x12, 0x39, 0x0a, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x48, 0x12, 0x52, 0x09, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01, 0x1a, 0x84, 0x03, 0x0a, 0x04, + 0x52, 0x45, 0x53, 0x54, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, + 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, + 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x2e, 0x43, 0x4f, 0x52, 0x53, 0x52, 0x04, 0x63, + 0x6f, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x77, 0x61, 0x72, 0x65, 0x1a, 0x98, 0x01, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x1a, 0x38, 0x0a, 0x04, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x3b, 0x0a, 0x05, 0x4b, 0x61, - 0x66, 0x6b, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x3e, 0x0a, 0x08, 0x52, 0x61, 0x62, 0x62, 0x69, - 0x74, 0x4d, 0x51, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x3c, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x4d, 0x51, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x38, 0x0a, 0x04, 0x4e, 0x41, 0x54, 0x53, 0x12, 0x1a, 0x0a, + 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, + 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x77, 0x61, + 0x67, 0x67, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x1a, 0x54, 0x0a, 0x04, + 0x43, 0x4f, 0x52, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x73, 0x1a, 0xb8, 0x01, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12, 0x18, 0x0a, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x30, + 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, + 0x77, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, + 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0xb5, 0x01, + 0x0a, 0x09, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, + 0x64, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, + 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x04, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, - 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, - 0x37, 0x0a, 0x03, 0x4e, 0x53, 0x51, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, + 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x58, 0x0a, 0x05, + 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, + 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x5b, 0x0a, 0x08, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, + 0x4d, 0x51, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, + 0x74, 0x6c, 0x73, 0x1a, 0x59, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x51, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x55, + 0x0a, 0x04, 0x4e, 0x41, 0x54, 0x53, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x3a, 0x0a, 0x06, 0x50, 0x75, 0x6c, 0x73, - 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x6f, 0x64, 0x65, 0x63, 0x1a, 0x39, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x1a, 0x0a, + 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, + 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x54, 0x0a, 0x03, 0x4e, 0x53, 0x51, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, + 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x57, 0x0a, 0x06, 0x50, + 0x75, 0x6c, 0x73, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, + 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x56, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, - 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, - 0xf5, 0x02, 0x0a, 0x08, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x51, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x6b, 0x0a, 0x05, 0x41, 0x73, 0x79, 0x6e, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x41, 0x0a, 0x09, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, - 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x1a, 0xce, 0x02, 0x0a, 0x03, 0x53, 0x53, 0x45, 0x12, - 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x09, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x54, 0x74, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, - 0x70, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x62, 0x61, - 0x73, 0x65, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x42, 0x61, 0x73, 0x65, 0x36, 0x34, 0x1a, 0x62, 0x0a, 0x08, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x49, 0x4f, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, + 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x92, 0x03, 0x0a, + 0x08, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x51, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, + 0x2c, 0x0a, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, + 0x73, 0x1a, 0x88, 0x01, 0x0a, 0x05, 0x41, 0x73, 0x79, 0x6e, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x5e, 0x0a, 0x09, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x72, 0x6f, + 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x6b, + 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x12, + 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0xeb, 0x02, 0x0a, + 0x03, 0x53, 0x53, 0x45, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x1a, 0xb1, 0x02, 0x0a, - 0x07, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x49, 0x0a, 0x13, - 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x5f, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x12, 0x63, 0x68, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, - 0x63, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, - 0x1a, 0xb9, 0x01, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x12, 0x18, 0x0a, 0x07, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x6f, 0x64, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, - 0x69, 0x63, 0x74, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x1a, 0xa7, 0x01, 0x0a, - 0x06, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, + 0x74, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, + 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x54, 0x74, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, + 0x6f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, + 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, + 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x70, 0x6c, 0x69, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x42, 0x61, 0x73, 0x65, 0x36, 0x34, 0x1a, 0x7f, 0x0a, 0x08, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x49, 0x4f, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, + 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0xce, 0x02, 0x0a, 0x07, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x87, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, - 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, - 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x03, 0x74, + 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, + 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, + 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x11, 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x63, 0x68, + 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x1a, 0xd6, 0x01, 0x0a, + 0x07, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x64, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, + 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x74, 0x72, + 0x69, 0x63, 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, + 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0xc4, 0x01, 0x0a, 0x06, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1b, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x72, 0x65, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x71, 0x74, 0x74, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x61, 0x62, + 0x62, 0x69, 0x74, 0x6d, 0x71, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x6d, 0x71, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, + 0x6e, 0x73, 0x71, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x73, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x73, 0x79, 0x6e, 0x71, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x42, 0x87, 0x01, 0x0a, + 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x42, 0x15, 0x4b, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, + 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, + 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xe2, 0x02, 0x10, 0x43, + 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1974,6 +2181,7 @@ var file_conf_v1_kratos_conf_server_proto_goTypes = []interface{}{ (*Server_REST_CORS)(nil), // 20: conf.Server.REST.CORS (*durationpb.Duration)(nil), // 21: google.protobuf.Duration (*Middleware)(nil), // 22: conf.Middleware + (*TLS)(nil), // 23: conf.TLS } var file_conf_v1_kratos_conf_server_proto_depIdxs = []int32{ 1, // 0: conf.Server.rest:type_name -> conf.Server.REST @@ -1998,19 +2206,38 @@ var file_conf_v1_kratos_conf_server_proto_depIdxs = []int32{ 21, // 19: conf.Server.REST.timeout:type_name -> google.protobuf.Duration 20, // 20: conf.Server.REST.cors:type_name -> conf.Server.REST.CORS 22, // 21: conf.Server.REST.middleware:type_name -> conf.Middleware - 21, // 22: conf.Server.GRPC.timeout:type_name -> google.protobuf.Duration - 22, // 23: conf.Server.GRPC.middleware:type_name -> conf.Middleware - 21, // 24: conf.Server.Websocket.timeout:type_name -> google.protobuf.Duration - 21, // 25: conf.Server.SSE.timeout:type_name -> google.protobuf.Duration - 21, // 26: conf.Server.SSE.event_ttl:type_name -> google.protobuf.Duration - 21, // 27: conf.Server.SignalR.keep_alive_interval:type_name -> google.protobuf.Duration - 21, // 28: conf.Server.SignalR.chan_receive_timeout:type_name -> google.protobuf.Duration - 21, // 29: conf.Server.GraphQL.timeout:type_name -> google.protobuf.Duration - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 23, // 22: conf.Server.REST.tls:type_name -> conf.TLS + 21, // 23: conf.Server.GRPC.timeout:type_name -> google.protobuf.Duration + 22, // 24: conf.Server.GRPC.middleware:type_name -> conf.Middleware + 23, // 25: conf.Server.GRPC.tls:type_name -> conf.TLS + 21, // 26: conf.Server.Websocket.timeout:type_name -> google.protobuf.Duration + 23, // 27: conf.Server.Websocket.tls:type_name -> conf.TLS + 23, // 28: conf.Server.Mqtt.tls:type_name -> conf.TLS + 23, // 29: conf.Server.Kafka.tls:type_name -> conf.TLS + 23, // 30: conf.Server.RabbitMQ.tls:type_name -> conf.TLS + 23, // 31: conf.Server.ActiveMQ.tls:type_name -> conf.TLS + 23, // 32: conf.Server.NATS.tls:type_name -> conf.TLS + 23, // 33: conf.Server.NSQ.tls:type_name -> conf.TLS + 23, // 34: conf.Server.Pulsar.tls:type_name -> conf.TLS + 23, // 35: conf.Server.Redis.tls:type_name -> conf.TLS + 23, // 36: conf.Server.RocketMQ.tls:type_name -> conf.TLS + 23, // 37: conf.Server.Asynq.tls:type_name -> conf.TLS + 23, // 38: conf.Server.Machinery.tls:type_name -> conf.TLS + 23, // 39: conf.Server.SSE.tls:type_name -> conf.TLS + 21, // 40: conf.Server.SSE.timeout:type_name -> google.protobuf.Duration + 21, // 41: conf.Server.SSE.event_ttl:type_name -> google.protobuf.Duration + 23, // 42: conf.Server.SocketIO.tls:type_name -> conf.TLS + 23, // 43: conf.Server.SignalR.tls:type_name -> conf.TLS + 21, // 44: conf.Server.SignalR.keep_alive_interval:type_name -> google.protobuf.Duration + 21, // 45: conf.Server.SignalR.chan_receive_timeout:type_name -> google.protobuf.Duration + 21, // 46: conf.Server.GraphQL.timeout:type_name -> google.protobuf.Duration + 23, // 47: conf.Server.GraphQL.tls:type_name -> conf.TLS + 23, // 48: conf.Server.Thrift.tls:type_name -> conf.TLS + 49, // [49:49] is the sub-list for method output_type + 49, // [49:49] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_conf_v1_kratos_conf_server_proto_init() } @@ -2019,6 +2246,7 @@ func file_conf_v1_kratos_conf_server_proto_init() { return } file_conf_v1_kratos_conf_middleware_proto_init() + file_conf_v1_kratos_conf_tls_proto_init() if !protoimpl.UnsafeEnabled { file_conf_v1_kratos_conf_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Server); i { @@ -2273,6 +2501,7 @@ func file_conf_v1_kratos_conf_server_proto_init() { } } } + file_conf_v1_kratos_conf_server_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/gen/go/conf/v1/kratos_conf_tls.pb.go b/api/gen/go/conf/v1/kratos_conf_tls.pb.go new file mode 100644 index 0000000..59166e6 --- /dev/null +++ b/api/gen/go/conf/v1/kratos_conf_tls.pb.go @@ -0,0 +1,349 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: conf/v1/kratos_conf_tls.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TLS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + File *TLS_File `protobuf:"bytes,1,opt,name=file,proto3,oneof" json:"file,omitempty"` + Config *TLS_Config `protobuf:"bytes,2,opt,name=config,proto3,oneof" json:"config,omitempty"` + InsecureSkipVerify bool `protobuf:"varint,3,opt,name=insecure_skip_verify,json=insecureSkipVerify,proto3" json:"insecure_skip_verify,omitempty"` +} + +func (x *TLS) Reset() { + *x = TLS{} + if protoimpl.UnsafeEnabled { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLS) ProtoMessage() {} + +func (x *TLS) ProtoReflect() protoreflect.Message { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLS.ProtoReflect.Descriptor instead. +func (*TLS) Descriptor() ([]byte, []int) { + return file_conf_v1_kratos_conf_tls_proto_rawDescGZIP(), []int{0} +} + +func (x *TLS) GetFile() *TLS_File { + if x != nil { + return x.File + } + return nil +} + +func (x *TLS) GetConfig() *TLS_Config { + if x != nil { + return x.Config + } + return nil +} + +func (x *TLS) GetInsecureSkipVerify() bool { + if x != nil { + return x.InsecureSkipVerify + } + return false +} + +type TLS_File struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CertPath *string `protobuf:"bytes,1,opt,name=cert_path,json=certPath,proto3,oneof" json:"cert_path,omitempty"` + KeyPath *string `protobuf:"bytes,2,opt,name=key_path,json=keyPath,proto3,oneof" json:"key_path,omitempty"` + CaPath *string `protobuf:"bytes,3,opt,name=ca_path,json=caPath,proto3,oneof" json:"ca_path,omitempty"` +} + +func (x *TLS_File) Reset() { + *x = TLS_File{} + if protoimpl.UnsafeEnabled { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLS_File) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLS_File) ProtoMessage() {} + +func (x *TLS_File) ProtoReflect() protoreflect.Message { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLS_File.ProtoReflect.Descriptor instead. +func (*TLS_File) Descriptor() ([]byte, []int) { + return file_conf_v1_kratos_conf_tls_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *TLS_File) GetCertPath() string { + if x != nil && x.CertPath != nil { + return *x.CertPath + } + return "" +} + +func (x *TLS_File) GetKeyPath() string { + if x != nil && x.KeyPath != nil { + return *x.KeyPath + } + return "" +} + +func (x *TLS_File) GetCaPath() string { + if x != nil && x.CaPath != nil { + return *x.CaPath + } + return "" +} + +type TLS_Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CertPem []byte `protobuf:"bytes,1,opt,name=cert_pem,json=certPem,proto3,oneof" json:"cert_pem,omitempty"` + KeyPem []byte `protobuf:"bytes,2,opt,name=key_pem,json=keyPem,proto3,oneof" json:"key_pem,omitempty"` + CaPem []byte `protobuf:"bytes,3,opt,name=ca_pem,json=caPem,proto3,oneof" json:"ca_pem,omitempty"` +} + +func (x *TLS_Config) Reset() { + *x = TLS_Config{} + if protoimpl.UnsafeEnabled { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLS_Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLS_Config) ProtoMessage() {} + +func (x *TLS_Config) ProtoReflect() protoreflect.Message { + mi := &file_conf_v1_kratos_conf_tls_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLS_Config.ProtoReflect.Descriptor instead. +func (*TLS_Config) Descriptor() ([]byte, []int) { + return file_conf_v1_kratos_conf_tls_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *TLS_Config) GetCertPem() []byte { + if x != nil { + return x.CertPem + } + return nil +} + +func (x *TLS_Config) GetKeyPem() []byte { + if x != nil { + return x.KeyPem + } + return nil +} + +func (x *TLS_Config) GetCaPem() []byte { + if x != nil { + return x.CaPem + } + return nil +} + +var File_conf_v1_kratos_conf_tls_proto protoreflect.FileDescriptor + +var file_conf_v1_kratos_conf_tls_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0xbc, 0x03, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x12, 0x27, 0x0a, + 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x2e, 0x54, 0x4c, 0x53, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, + 0x69, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x4c, + 0x53, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x65, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, 0x69, + 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x1a, 0x8d, 0x01, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, + 0x12, 0x20, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x63, 0x61, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x63, 0x61, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x86, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x08, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x65, 0x72, 0x74, 0x50, 0x65, 0x6d, 0x88, + 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x48, 0x01, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x88, 0x01, 0x01, + 0x12, 0x1a, 0x0a, 0x06, 0x63, 0x61, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x61, 0x50, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x65, 0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x61, 0x5f, 0x70, 0x65, 0x6d, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x84, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x42, 0x12, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x54, 0x6c, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x78, 0x37, 0x64, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x2d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x6e, + 0x66, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_conf_v1_kratos_conf_tls_proto_rawDescOnce sync.Once + file_conf_v1_kratos_conf_tls_proto_rawDescData = file_conf_v1_kratos_conf_tls_proto_rawDesc +) + +func file_conf_v1_kratos_conf_tls_proto_rawDescGZIP() []byte { + file_conf_v1_kratos_conf_tls_proto_rawDescOnce.Do(func() { + file_conf_v1_kratos_conf_tls_proto_rawDescData = protoimpl.X.CompressGZIP(file_conf_v1_kratos_conf_tls_proto_rawDescData) + }) + return file_conf_v1_kratos_conf_tls_proto_rawDescData +} + +var file_conf_v1_kratos_conf_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_conf_v1_kratos_conf_tls_proto_goTypes = []interface{}{ + (*TLS)(nil), // 0: conf.TLS + (*TLS_File)(nil), // 1: conf.TLS.File + (*TLS_Config)(nil), // 2: conf.TLS.Config +} +var file_conf_v1_kratos_conf_tls_proto_depIdxs = []int32{ + 1, // 0: conf.TLS.file:type_name -> conf.TLS.File + 2, // 1: conf.TLS.config:type_name -> conf.TLS.Config + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_conf_v1_kratos_conf_tls_proto_init() } +func file_conf_v1_kratos_conf_tls_proto_init() { + if File_conf_v1_kratos_conf_tls_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_conf_v1_kratos_conf_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conf_v1_kratos_conf_tls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLS_File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conf_v1_kratos_conf_tls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLS_Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_conf_v1_kratos_conf_tls_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_conf_v1_kratos_conf_tls_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_conf_v1_kratos_conf_tls_proto_msgTypes[2].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_conf_v1_kratos_conf_tls_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_conf_v1_kratos_conf_tls_proto_goTypes, + DependencyIndexes: file_conf_v1_kratos_conf_tls_proto_depIdxs, + MessageInfos: file_conf_v1_kratos_conf_tls_proto_msgTypes, + }.Build() + File_conf_v1_kratos_conf_tls_proto = out.File + file_conf_v1_kratos_conf_tls_proto_rawDesc = nil + file_conf_v1_kratos_conf_tls_proto_goTypes = nil + file_conf_v1_kratos_conf_tls_proto_depIdxs = nil +} diff --git a/api/protos/conf/v1/kratos_conf_client.proto b/api/protos/conf/v1/kratos_conf_client.proto index a93950e..c7f52b6 100644 --- a/api/protos/conf/v1/kratos_conf_client.proto +++ b/api/protos/conf/v1/kratos_conf_client.proto @@ -5,22 +5,26 @@ package conf; option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf"; import "google/protobuf/duration.proto"; + import "conf/v1/kratos_conf_middleware.proto"; +import "conf/v1/kratos_conf_tls.proto"; // 客户端 message Client { // REST message REST { google.protobuf.Duration timeout = 1; // 超时时间 - Middleware middleware = 2; + Middleware middleware = 2; // 中间件 + TLS tls = 3; // TLS配置 } // gPRC message GRPC { google.protobuf.Duration timeout = 1; // 超时时间 - Middleware middleware = 2; + Middleware middleware = 2; // 中间件 + TLS tls = 3; // TLS配置 } - REST rest = 1; // REST服务 - GRPC grpc = 2; // gRPC服务 + optional REST rest = 1; // REST服务 + optional GRPC grpc = 2; // gRPC服务 } diff --git a/api/protos/conf/v1/kratos_conf_config.proto b/api/protos/conf/v1/kratos_conf_config.proto index 8ce6f00..553c01d 100644 --- a/api/protos/conf/v1/kratos_conf_config.proto +++ b/api/protos/conf/v1/kratos_conf_config.proto @@ -11,43 +11,43 @@ message RemoteConfig { message Nacos { string address = 1; // 服务端地址 uint64 port = 2; // 服务端端口 - string key = 3; // + string key = 3; // 配置键 } message Etcd { - repeated string endpoints = 1; - google.protobuf.Duration timeout = 2; - string key = 3; // + repeated string endpoints = 1; // 服务端地址 + google.protobuf.Duration timeout = 2; // 超时时间 + string key = 3; // 配置键 } message Consul { string scheme = 1; // 网络样式 string address = 2; // 服务端地址 - string key = 3; // + string key = 3; // 配置键 } message Apollo { - string endpoint = 1; - string app_id = 2; - string cluster = 3; - string namespace = 4; - string secret = 5; + string endpoint = 1; // 服务端地址 + string app_id = 2; // 应用ID + string cluster = 3; // 集群 + string namespace = 4; // 命名空间 + string secret = 5; // 密钥 } message Kubernetes { - string namespace = 1; + string namespace = 1; // 命名空间 } message Polaris { } - string type = 1; + string type = 1; // 配置类型 - Etcd etcd = 2; - Consul consul = 3; - Nacos nacos = 4; - Apollo apollo = 6; - Kubernetes kubernetes = 7; - Polaris polaris = 8; + optional Etcd etcd = 2; + optional Consul consul = 3; + optional Nacos nacos = 4; + optional Apollo apollo = 6; + optional Kubernetes kubernetes = 7; + optional Polaris polaris = 8; } diff --git a/api/protos/conf/v1/kratos_conf_data.proto b/api/protos/conf/v1/kratos_conf_data.proto index 48dcd62..2ae2da5 100644 --- a/api/protos/conf/v1/kratos_conf_data.proto +++ b/api/protos/conf/v1/kratos_conf_data.proto @@ -169,25 +169,25 @@ message Data { string group_name = 11; } - Database database = 1; // 数据库DSN + optional Database database = 1; // 数据库DSN - Redis redis = 10; // Redis - MongoDB mongodb = 11; // MongoDB数据库 - ElasticSearch elastic_search = 12; // ElasticSearch数据库 - Cassandra cassandra = 13; // Cassandra数据库 + optional Redis redis = 10; // Redis + optional MongoDB mongodb = 11; // MongoDB数据库 + optional ElasticSearch elastic_search = 12; // ElasticSearch数据库 + optional Cassandra cassandra = 13; // Cassandra数据库 - ClickHouse clickhouse = 20; // ClickHouse数据库 - InfluxDB influxdb = 21; // InfluxDB数据库 - Doris doris = 22; // Doris数据库 + optional ClickHouse clickhouse = 20; // ClickHouse数据库 + optional InfluxDB influxdb = 21; // InfluxDB数据库 + optional Doris doris = 22; // Doris数据库 // Message Queue - Kafka kafka = 30; // Kafka服务 - RabbitMQ rabbitmq = 31; // RabbitMQ服务 - Mqtt mqtt = 32; // MQTT服务 - ActiveMQ activemq = 33; // ActiveMQ - NATS nats = 34; // NATS - NSQ nsq = 35; // NATS - Pulsar pulsar = 36; // Pulsar - RocketMQ rocketmq = 38; // RocketMQ + optional Kafka kafka = 30; // Kafka服务 + optional RabbitMQ rabbitmq = 31; // RabbitMQ服务 + optional Mqtt mqtt = 32; // MQTT服务 + optional ActiveMQ activemq = 33; // ActiveMQ + optional NATS nats = 34; // NATS + optional NSQ nsq = 35; // NATS + optional Pulsar pulsar = 36; // Pulsar + optional RocketMQ rocketmq = 38; // RocketMQ } diff --git a/api/protos/conf/v1/kratos_conf_logger.proto b/api/protos/conf/v1/kratos_conf_logger.proto index bd6dd70..d8f7cea 100644 --- a/api/protos/conf/v1/kratos_conf_logger.proto +++ b/api/protos/conf/v1/kratos_conf_logger.proto @@ -47,9 +47,9 @@ message Logger { string type = 1; - Zap zap = 2; - Logrus logrus = 3; - Fluent fluent = 4; - Aliyun aliyun = 5; - Tencent tencent = 6; + optional Zap zap = 2; + optional Logrus logrus = 3; + optional Fluent fluent = 4; + optional Aliyun aliyun = 5; + optional Tencent tencent = 6; } diff --git a/api/protos/conf/v1/kratos_conf_oss.proto b/api/protos/conf/v1/kratos_conf_oss.proto index 38aea57..f5fd21f 100644 --- a/api/protos/conf/v1/kratos_conf_oss.proto +++ b/api/protos/conf/v1/kratos_conf_oss.proto @@ -4,6 +4,8 @@ package conf; option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf"; +import "conf/v1/kratos_conf_tls.proto"; + message OSS { // MinIO message MinIO { @@ -11,9 +13,12 @@ message OSS { string access_key = 2; // 访问密钥 string secret_key = 3; // 密钥 string token = 4; // 令牌 - bool use_ssl = 5; // 使用SSL - string upload_host = 6; // 上传链接的主机名 - string download_host = 7; // 下载链接的主机名 + + bool use_ssl = 10; // 使用SSL + TLS tls = 11; // TLS配置 + + string upload_host = 20; // 上传链接的主机名 + string download_host = 21; // 下载链接的主机名 } MinIO minio = 1; diff --git a/api/protos/conf/v1/kratos_conf_registry.proto b/api/protos/conf/v1/kratos_conf_registry.proto index 30e355d..7432ff9 100644 --- a/api/protos/conf/v1/kratos_conf_registry.proto +++ b/api/protos/conf/v1/kratos_conf_registry.proto @@ -30,13 +30,18 @@ message Registry { message Nacos { string address = 1; // 服务端地址 uint64 port = 2; // 服务端端口 + string namespace_id = 3; // + string log_level = 4; // 日志等级 string cache_dir = 5; // 缓存目录 string log_dir = 6; // 日志目录 + int32 update_thread_num = 7; // 更新服务的线程数 + google.protobuf.Duration timeout = 8; // http请求超时时间,单位: 毫秒 google.protobuf.Duration beat_interval = 9; // 心跳间隔时间,单位: 毫秒 + bool not_load_cache_at_start = 10; // 在启动时不读取本地缓存数据,true: 不读取,false: 读取 bool update_cache_when_empty = 11; // 当服务列表为空时是否更新本地缓存,true: 更新,false: 不更新 } diff --git a/api/protos/conf/v1/kratos_conf_server.proto b/api/protos/conf/v1/kratos_conf_server.proto index 07c9d09..d0b4971 100644 --- a/api/protos/conf/v1/kratos_conf_server.proto +++ b/api/protos/conf/v1/kratos_conf_server.proto @@ -5,7 +5,9 @@ package conf; option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf"; import "google/protobuf/duration.proto"; + import "conf/v1/kratos_conf_middleware.proto"; +import "conf/v1/kratos_conf_tls.proto"; // 服务器 message Server { @@ -20,18 +22,25 @@ message Server { string network = 1; // 网络 string addr = 2; // 服务监听地址 google.protobuf.Duration timeout = 3; // 超时时间 - CORS cors = 4; // 服务监听地址 - Middleware middleware = 5; // 中间件 - bool enable_swagger = 6; // 启用SwaggerUI - bool enable_pprof = 7; // 启用pprof + + CORS cors = 10; // 服务监听地址 + Middleware middleware = 11; // 中间件 + TLS tls = 12; // TLS配置 + + bool enable_swagger = 20; // 启用SwaggerUI + bool enable_pprof = 21; // 启用pprof } // gPRC message GRPC { string network = 1; // 网络 string addr = 2; // 服务监听地址 + google.protobuf.Duration timeout = 3; // 超时时间 + Middleware middleware = 4; + + TLS tls = 5; // TLS配置 } // Websocket @@ -41,54 +50,64 @@ message Server { string path = 3; // 路径 string codec = 4; // 编解码器: json,xml,yaml... google.protobuf.Duration timeout = 5; // 超时时间 + TLS tls = 6; // TLS配置 } // MQTT message Mqtt { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } // Kafka message Kafka { repeated string endpoints = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } // RabbitMQ message RabbitMQ { repeated string endpoints = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message ActiveMQ { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message NATS { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message NSQ { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message Pulsar { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message Redis { string endpoint = 1; // 对端网络地址 string codec = 2; // 编解码器: json,xml,yaml... + TLS tls = 3; // TLS配置 } message RocketMQ { string version = 1; // 驱动版本:aliyun、v2、v5 string codec = 2; // 编解码器: json,xml,yaml... + bool enable_trace = 3; repeated string name_servers = 4; @@ -101,6 +120,8 @@ message Server { string namespace = 9; string instance_name = 10; string group_name = 11; + + TLS tls = 12; // TLS配置 } // Asynq @@ -109,12 +130,14 @@ message Server { string password = 2; // redis登录密码 int32 db = 3; // 数据库索引 string location = 4; // 时区 + TLS tls = 5; // TLS配置 } // Machinery message Machinery { repeated string brokers = 1; // broker的地址,可以根据实际使用的存储介质,分别指定Redis、AMQP或AWS SQS; repeated string backends = 2; // backend配置,用来指定存放结果的介质的配置。可以根据需求,分别指定为:Redis、memcached或mongodb等; + TLS tls = 3; // TLS配置 } // SSE @@ -123,14 +146,15 @@ message Server { string addr = 2; // 服务监听地址 string path = 3; // 路径 string codec = 4; // 编解码器 + TLS tls = 5; // TLS配置 - google.protobuf.Duration timeout = 5; // 超时时间 - google.protobuf.Duration event_ttl = 6; // 超时时间 + google.protobuf.Duration timeout = 10; // 超时时间 + google.protobuf.Duration event_ttl = 11; // - bool auto_stream = 7; // - bool auto_reply = 8; // - bool split_data = 9; // - bool encode_base64 = 10; // 进行BASE64编码 + bool auto_stream = 20; // + bool auto_reply = 21; // + bool split_data = 22; // + bool encode_base64 = 23; // 进行BASE64编码 } // SocketIO @@ -139,6 +163,7 @@ message Server { string addr = 2; // 服务监听地址 string path = 3; // 路径 string codec = 4; // 编解码器 + TLS tls = 5; // TLS配置 } // SignalR @@ -146,9 +171,11 @@ message Server { string network = 1; // 网络 string addr = 2; // 服务监听地址 string codec = 3; // 编解码器 + TLS tls = 4; // TLS配置 + + google.protobuf.Duration keep_alive_interval = 10; // 超时时间 + google.protobuf.Duration chan_receive_timeout = 11; // 超时时间 - google.protobuf.Duration keep_alive_interval = 4; // 超时时间 - google.protobuf.Duration chan_receive_timeout = 5; // 超时时间 bool debug = 6; // 调试开关 uint32 stream_buffer_capacity = 7; // } @@ -161,6 +188,7 @@ message Server { string codec = 4; // 编解码器 google.protobuf.Duration timeout = 5; // 超时时间 bool strict_slash = 6; + TLS tls = 7; // TLS配置 } // Thrift @@ -171,36 +199,37 @@ message Server { bool buffered = 4; bool framed = 5; bool buffer_size = 6; + TLS tls = 7; // TLS配置 } // RPC - REST rest = 1; // REST服务 - GRPC grpc = 2; // gRPC服务 - GraphQL graphql = 3; // GraphQL服务 - Thrift thrift = 4; // Thrift服务 + optional REST rest = 1; // REST服务 + optional GRPC grpc = 2; // gRPC服务 + optional GraphQL graphql = 3; // GraphQL服务 + optional Thrift thrift = 4; // Thrift服务 // Message Queue - Mqtt mqtt = 10; // MQTT服务 - Kafka kafka = 11; // Kafka服务 - RabbitMQ rabbitmq = 12; // RabbitMQ服务 - ActiveMQ activemq = 13; // ActiveMQ - NATS nats = 14; // NATS - NSQ nsq = 15; // NATS - Pulsar pulsar = 16; // Pulsar - Redis redis = 17; // Redis - RocketMQ rocketmq = 18; // RocketMQ + optional Mqtt mqtt = 10; // MQTT服务 + optional Kafka kafka = 11; // Kafka服务 + optional RabbitMQ rabbitmq = 12; // RabbitMQ服务 + optional ActiveMQ activemq = 13; // ActiveMQ + optional NATS nats = 14; // NATS + optional NSQ nsq = 15; // NATS + optional Pulsar pulsar = 16; // Pulsar + optional Redis redis = 17; // Redis + optional RocketMQ rocketmq = 18; // RocketMQ - // RealTime + // RealTime - Websocket websocket = 20; // Websocket服务 - SSE sse = 21; // SSE服务 - SocketIO socketio = 22; // SocketIO服务 - SignalR signalr = 23; // SignalR服务 + optional Websocket websocket = 20; // Websocket服务 + optional SSE sse = 21; // SSE服务 + optional SocketIO socketio = 22; // SocketIO服务 + optional SignalR signalr = 23; // SignalR服务 // Task Queue - Asynq asynq = 30; // Asynq服务 - Machinery machinery = 31; // Machinery服务 + optional Asynq asynq = 30; // Asynq服务 + optional Machinery machinery = 31; // Machinery服务 } diff --git a/api/protos/conf/v1/kratos_conf_tls.proto b/api/protos/conf/v1/kratos_conf_tls.proto new file mode 100644 index 0000000..38dcbc6 --- /dev/null +++ b/api/protos/conf/v1/kratos_conf_tls.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package conf; + +option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf"; + +message TLS { + message File { + optional string cert_path = 1; + optional string key_path = 2; + optional string ca_path = 3; + } + message Config { + optional bytes cert_pem = 1; + optional bytes key_pem = 2; + optional bytes ca_pem = 3; + } + + optional File file = 1; + optional Config config = 2; + + bool insecure_skip_verify = 3; +} diff --git a/rpc/grpc.go b/rpc/grpc.go index 213ec77..4446769 100644 --- a/rpc/grpc.go +++ b/rpc/grpc.go @@ -2,13 +2,15 @@ package rpc import ( "context" + "crypto/tls" + "strings" "time" - "google.golang.org/grpc" - "github.com/go-kratos/aegis/ratelimit" "github.com/go-kratos/aegis/ratelimit/bbr" + "google.golang.org/grpc" + "github.com/go-kratos/kratos/v2/log" "github.com/go-kratos/kratos/v2/registry" @@ -21,42 +23,33 @@ import ( kratosGrpc "github.com/go-kratos/kratos/v2/transport/grpc" conf "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1" + "github.com/tx7do/kratos-bootstrap/utils" ) const defaultTimeout = 5 * time.Second // CreateGrpcClient 创建GRPC客户端 -func CreateGrpcClient(ctx context.Context, r registry.Discovery, serviceName string, cfg *conf.Bootstrap, m ...middleware.Middleware) grpc.ClientConnInterface { - endpoint := "discovery:///" + serviceName +func CreateGrpcClient(ctx context.Context, r registry.Discovery, serviceName string, cfg *conf.Bootstrap, opts ...kratosGrpc.ClientOption) grpc.ClientConnInterface { - var ms []middleware.Middleware - timeout := defaultTimeout - if cfg.Client != nil && cfg.Client.Grpc != nil { - if cfg.Client.Grpc.Timeout != nil { - timeout = cfg.Client.Grpc.Timeout.AsDuration() - } + var options []kratosGrpc.ClientOption - if cfg.Client.Grpc.Middleware != nil { - if cfg.Client.Grpc.Middleware.GetEnableRecovery() { - ms = append(ms, recovery.Recovery()) - } - if cfg.Client.Grpc.Middleware.GetEnableTracing() { - ms = append(ms, tracing.Client()) - } - if cfg.Client.Grpc.Middleware.GetEnableValidate() { - ms = append(ms, validate.Validator()) - } - } + if opts != nil { + options = append(options, opts...) } - ms = append(ms, m...) - conn, err := kratosGrpc.DialInsecure( - ctx, - kratosGrpc.WithEndpoint(endpoint), - kratosGrpc.WithDiscovery(r), - kratosGrpc.WithTimeout(timeout), - kratosGrpc.WithMiddleware(ms...), - ) + options = append(options, kratosGrpc.WithDiscovery(r)) + + var endpoint string + if strings.HasPrefix(serviceName, "discovery:///") { + endpoint = serviceName + } else { + endpoint = "discovery:///" + serviceName + } + options = append(options, kratosGrpc.WithEndpoint(endpoint)) + + options = append(options, initGrpcClientConfig(cfg)...) + + conn, err := kratosGrpc.DialInsecure(ctx, options...) if err != nil { log.Fatalf("dial grpc client [%s] failed: %s", serviceName, err.Error()) } @@ -64,12 +57,89 @@ func CreateGrpcClient(ctx context.Context, r registry.Discovery, serviceName str return conn } -// CreateGrpcServer 创建GRPC服务端 -func CreateGrpcServer(cfg *conf.Bootstrap, m ...middleware.Middleware) *kratosGrpc.Server { - var opts []kratosGrpc.ServerOption +func initGrpcClientConfig(cfg *conf.Bootstrap) []kratosGrpc.ClientOption { + if cfg.Client == nil || cfg.Client.Grpc == nil { + return nil + } + + var options []kratosGrpc.ClientOption + + timeout := defaultTimeout + if cfg.Client.Grpc.Timeout != nil { + timeout = cfg.Client.Grpc.Timeout.AsDuration() + } + options = append(options, kratosGrpc.WithTimeout(timeout)) + + if cfg.Client.Grpc.Middleware != nil { + var ms []middleware.Middleware + + if cfg.Client.Grpc.Middleware.GetEnableRecovery() { + ms = append(ms, recovery.Recovery()) + } + if cfg.Client.Grpc.Middleware.GetEnableTracing() { + ms = append(ms, tracing.Client()) + } + if cfg.Client.Grpc.Middleware.GetEnableValidate() { + ms = append(ms, validate.Validator()) + } + } + + if cfg.Client.Grpc.Tls != nil { + var tlsCfg *tls.Config + var err error + + if cfg.Client.Grpc.Tls.File != nil { + if tlsCfg, err = utils.LoadClientTlsConfigFile( + cfg.Client.Grpc.Tls.File.GetKeyPath(), + cfg.Client.Grpc.Tls.File.GetCertPath(), + cfg.Client.Grpc.Tls.File.GetCaPath(), + ); err != nil { + panic(err) + } + } + if tlsCfg == nil && cfg.Client.Grpc.Tls.Config != nil { + if tlsCfg, err = utils.LoadClientTlsConfig( + cfg.Client.Grpc.Tls.Config.GetKeyPem(), + cfg.Client.Grpc.Tls.Config.GetCertPem(), + cfg.Client.Grpc.Tls.Config.GetCaPem(), + ); err != nil { + panic(err) + } + } + + if tlsCfg != nil { + options = append(options, kratosGrpc.WithTLSConfig(tlsCfg)) + } + } + + return options +} + +// CreateGrpcServer 创建GRPC服务端 +func CreateGrpcServer(cfg *conf.Bootstrap, opts ...kratosGrpc.ServerOption) *kratosGrpc.Server { + var options []kratosGrpc.ServerOption + + if opts != nil { + options = append(options, opts...) + } + + options = append(options, initGrpcServerConfig(cfg)...) + + srv := kratosGrpc.NewServer(options...) + + return srv +} + +func initGrpcServerConfig(cfg *conf.Bootstrap) []kratosGrpc.ServerOption { + if cfg.Server == nil || cfg.Server.Grpc == nil { + return nil + } + + var options []kratosGrpc.ServerOption + + if cfg.Server.Grpc.Middleware != nil { + var ms []middleware.Middleware - var ms []middleware.Middleware - if cfg.Server != nil && cfg.Server.Grpc != nil && cfg.Server.Grpc.Middleware != nil { if cfg.Server.Grpc.Middleware.GetEnableRecovery() { ms = append(ms, recovery.Recovery()) } @@ -89,21 +159,49 @@ func CreateGrpcServer(cfg *conf.Bootstrap, m ...middleware.Middleware) *kratosGr } ms = append(ms, midRateLimit.Server(midRateLimit.WithLimiter(limiter))) } + + options = append(options, kratosGrpc.Middleware(ms...)) + } + + if cfg.Server.Grpc.Tls != nil { + var tlsCfg *tls.Config + var err error + + if cfg.Server.Grpc.Tls.File != nil { + if tlsCfg, err = utils.LoadServerTlsConfigFile( + cfg.Server.Grpc.Tls.File.GetKeyPath(), + cfg.Server.Grpc.Tls.File.GetCertPath(), + cfg.Server.Grpc.Tls.File.GetCaPath(), + cfg.Server.Grpc.Tls.InsecureSkipVerify, + ); err != nil { + panic(err) + } + } + if tlsCfg == nil && cfg.Server.Grpc.Tls.Config != nil { + if tlsCfg, err = utils.LoadServerTlsConfig( + cfg.Server.Grpc.Tls.Config.GetKeyPem(), + cfg.Server.Grpc.Tls.Config.GetCertPem(), + cfg.Server.Grpc.Tls.Config.GetCaPem(), + cfg.Server.Grpc.Tls.InsecureSkipVerify, + ); err != nil { + panic(err) + } + } + + if tlsCfg != nil { + options = append(options, kratosGrpc.TLSConfig(tlsCfg)) + } } - ms = append(ms, m...) - opts = append(opts, kratosGrpc.Middleware(ms...)) if cfg.Server.Grpc.Network != "" { - opts = append(opts, kratosGrpc.Network(cfg.Server.Grpc.Network)) + options = append(options, kratosGrpc.Network(cfg.Server.Grpc.Network)) } if cfg.Server.Grpc.Addr != "" { - opts = append(opts, kratosGrpc.Address(cfg.Server.Grpc.Addr)) + options = append(options, kratosGrpc.Address(cfg.Server.Grpc.Addr)) } if cfg.Server.Grpc.Timeout != nil { - opts = append(opts, kratosGrpc.Timeout(cfg.Server.Grpc.Timeout.AsDuration())) + options = append(options, kratosGrpc.Timeout(cfg.Server.Grpc.Timeout.AsDuration())) } - srv := kratosGrpc.NewServer(opts...) - - return srv + return options } diff --git a/rpc/rest.go b/rpc/rest.go index 932fc7c..8a0e7ec 100644 --- a/rpc/rest.go +++ b/rpc/rest.go @@ -1,8 +1,11 @@ package rpc import ( + "crypto/tls" "net/http/pprof" + "github.com/gorilla/handlers" + "github.com/go-kratos/aegis/ratelimit" "github.com/go-kratos/aegis/ratelimit/bbr" @@ -14,23 +17,47 @@ import ( kratosRest "github.com/go-kratos/kratos/v2/transport/http" - "github.com/gorilla/handlers" - conf "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1" + "github.com/tx7do/kratos-bootstrap/utils" ) // CreateRestServer 创建REST服务端 -func CreateRestServer(cfg *conf.Bootstrap, m ...middleware.Middleware) *kratosRest.Server { - var opts = []kratosRest.ServerOption{ - kratosRest.Filter(handlers.CORS( +func CreateRestServer(cfg *conf.Bootstrap, opts ...kratosRest.ServerOption) *kratosRest.Server { + var options []kratosRest.ServerOption + + if opts != nil { + options = append(options, opts...) + } + + options = append(options, initRestConfig(cfg)...) + + srv := kratosRest.NewServer(options...) + + if cfg.Server != nil && cfg.Server.Rest != nil && cfg.Server.Rest.GetEnablePprof() { + registerHttpPprof(srv) + } + + return srv +} + +func initRestConfig(cfg *conf.Bootstrap) []kratosRest.ServerOption { + if cfg.Server == nil || cfg.Server.Rest == nil { + return nil + } + + var options []kratosRest.ServerOption + + if cfg.Server.Rest.Cors != nil { + options = append(options, kratosRest.Filter(handlers.CORS( handlers.AllowedHeaders(cfg.Server.Rest.Cors.Headers), handlers.AllowedMethods(cfg.Server.Rest.Cors.Methods), handlers.AllowedOrigins(cfg.Server.Rest.Cors.Origins), - )), + ))) } - var ms []middleware.Middleware - if cfg.Server != nil && cfg.Server.Rest != nil && cfg.Server.Rest.Middleware != nil { + if cfg.Server.Rest.Middleware != nil { + var ms []middleware.Middleware + if cfg.Server.Rest.Middleware.GetEnableRecovery() { ms = append(ms, recovery.Recovery()) } @@ -50,27 +77,51 @@ func CreateRestServer(cfg *conf.Bootstrap, m ...middleware.Middleware) *kratosRe } ms = append(ms, midRateLimit.Server(midRateLimit.WithLimiter(limiter))) } + + options = append(options, kratosRest.Middleware(ms...)) } - ms = append(ms, m...) - opts = append(opts, kratosRest.Middleware(ms...)) if cfg.Server.Rest.Network != "" { - opts = append(opts, kratosRest.Network(cfg.Server.Rest.Network)) + options = append(options, kratosRest.Network(cfg.Server.Rest.Network)) } if cfg.Server.Rest.Addr != "" { - opts = append(opts, kratosRest.Address(cfg.Server.Rest.Addr)) + options = append(options, kratosRest.Address(cfg.Server.Rest.Addr)) } if cfg.Server.Rest.Timeout != nil { - opts = append(opts, kratosRest.Timeout(cfg.Server.Rest.Timeout.AsDuration())) + options = append(options, kratosRest.Timeout(cfg.Server.Rest.Timeout.AsDuration())) } - srv := kratosRest.NewServer(opts...) + if cfg.Server.Rest.Tls != nil { + var tlsCfg *tls.Config + var err error - if cfg.Server.Rest.GetEnablePprof() { - registerHttpPprof(srv) + if cfg.Server.Rest.Tls.File != nil { + if tlsCfg, err = utils.LoadServerTlsConfigFile( + cfg.Server.Rest.Tls.File.GetKeyPath(), + cfg.Server.Rest.Tls.File.GetCertPath(), + cfg.Server.Rest.Tls.File.GetCaPath(), + cfg.Server.Rest.Tls.InsecureSkipVerify, + ); err != nil { + panic(err) + } + } + if tlsCfg == nil && cfg.Server.Rest.Tls.Config != nil { + if tlsCfg, err = utils.LoadServerTlsConfig( + cfg.Server.Rest.Tls.Config.GetKeyPem(), + cfg.Server.Rest.Tls.Config.GetCertPem(), + cfg.Server.Rest.Tls.Config.GetCaPem(), + cfg.Server.Rest.Tls.InsecureSkipVerify, + ); err != nil { + panic(err) + } + } + + if tlsCfg != nil { + options = append(options, kratosRest.TLSConfig(tlsCfg)) + } } - return srv + return options } func registerHttpPprof(s *kratosRest.Server) { diff --git a/utils/tls.go b/utils/tls.go new file mode 100644 index 0000000..59c75a5 --- /dev/null +++ b/utils/tls.go @@ -0,0 +1,190 @@ +package utils + +import ( + "crypto/tls" + "crypto/x509" + "encoding/pem" + "fmt" + "log" + "os" +) + +// 双向验证:server端提供证书(cert和key),还必须配置cerfiles即CA根证书,因为需要验证client端提供的证书。另外client也端必须提供一样的内容,即client端的证书(cert/key)以供server端验证,并且提供CA根证书验证server端提供的证书。 +// 单向验证:server端提供证书(cert和key),不需要配置certfiles即CA根证书,而在客户端必须提供CA根证书,用来验证server端的证书是否有效。另外client端也不需要自己的证书,因为它不需要想server端提供验证。 + +// LoadServerTlsConfigFile 创建服务端TLS证书认证配置 +// keyFile 服务端私钥文件路径,必须提供 +// certFile 服务端证书文件路径,必须提供 +// caFile CA根证书,如果提供则为双向认证,否则为单向认证 +// insecureSkipVerify 用来控制客户端是否证书和服务器主机名。如果设置为true,则不会校验证书以及证书中的主机名和服务器主机名是否一致。 +func LoadServerTlsConfigFile(keyFile, certFile, caFile string, insecureSkipVerify bool) (*tls.Config, error) { + if keyFile == "" || certFile == "" { + return nil, fmt.Errorf("KeyFile and CertFile must both be present[key: %v, cert: %v]", keyFile, certFile) + } + + var cfg tls.Config + cfg.InsecureSkipVerify = insecureSkipVerify + //cfg.ServerName = "host.docker.internal" + //cfg.MinVersion = tls.VersionTLS13 + + tlsCert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + log.Println("tls.LoadX509KeyPair error:", err) + return nil, err + } + + cfg.Certificates = []tls.Certificate{tlsCert} + + if caFile != "" { + cfg.ClientAuth = tls.RequireAndVerifyClientCert + cp, err := newCertPoolWithCaFile(caFile) + if err != nil { + log.Fatalln("read cert file error:", err) + return nil, err + } + + cfg.RootCAs = cp + cfg.ClientCAs = cp + } else { + cfg.ClientAuth = tls.NoClientCert + } + + return &cfg, nil +} + +func LoadServerTlsConfig(keyPEMBlock, certPEMBlock, caPEMBlock []byte, insecureSkipVerify bool) (*tls.Config, error) { + if len(keyPEMBlock) == 0 || len(certPEMBlock) == 0 { + return nil, fmt.Errorf("KeyPEMBlock and CertPEMBlock must both be present[key: %v, cert: %v]", keyPEMBlock, certPEMBlock) + } + + var cfg tls.Config + cfg.InsecureSkipVerify = insecureSkipVerify + //cfg.ServerName = "host.docker.internal" + //cfg.MinVersion = tls.VersionTLS13 + + tlsCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock) + if err != nil { + log.Println("tls.X509KeyPair error:", err) + return nil, err + } + + cfg.Certificates = []tls.Certificate{tlsCert} + + if len(caPEMBlock) != 0 { + cfg.ClientAuth = tls.RequireAndVerifyClientCert + cp, err := newCertPool(caPEMBlock) + if err != nil { + log.Fatalln("read cert PEM error:", err) + return nil, err + } + + cfg.RootCAs = cp + cfg.ClientCAs = cp + } else { + cfg.ClientAuth = tls.NoClientCert + } + + return &cfg, nil +} + +// LoadClientTlsConfigFile 创建客户端端TLS证书认证配置 +// keyFile 客户端私钥文件路径 +// certFile 客户端证书文件路径 +// caFile CA根证书 +func LoadClientTlsConfigFile(keyFile, certFile, caFile string) (*tls.Config, error) { + var cfg tls.Config + //cfg.InsecureSkipVerify = info.InsecureSkipVerify + //cfg.ServerName = "host.docker.internal" + //cfg.MinVersion = tls.VersionTLS13 + + if keyFile == "" || certFile == "" { + return &cfg, nil + } + + tlsCert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + log.Fatalln("read pair file error:", err) + return nil, err + } + + cfg.Certificates = []tls.Certificate{tlsCert} + + if caFile != "" { + cp, err := newCertPoolWithCaFile(caFile) + if err != nil { + log.Fatalln("read cert file error:", err) + return nil, err + } + + cfg.RootCAs = cp + } + + return &cfg, nil +} + +func LoadClientTlsConfig(keyPEMBlock, certPEMBlock, caPEMBlock []byte) (*tls.Config, error) { + if len(keyPEMBlock) == 0 || len(certPEMBlock) == 0 { + return nil, fmt.Errorf("KeyPEMBlock and CertPEMBlock must both be present[key: %v, cert: %v]", keyPEMBlock, certPEMBlock) + } + + var cfg tls.Config + //cfg.InsecureSkipVerify = info.InsecureSkipVerify + //cfg.ServerName = "host.docker.internal" + //cfg.MinVersion = tls.VersionTLS13 + + tlsCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock) + if err != nil { + log.Fatalln("read pair PEM error:", err) + return nil, err + } + + cfg.Certificates = []tls.Certificate{tlsCert} + + if len(caPEMBlock) != 0 { + cp, err := newCertPool(caPEMBlock) + if err != nil { + log.Fatalln("read cert PEM error:", err) + return nil, err + } + + cfg.RootCAs = cp + } + + return &cfg, nil +} + +// newCertPool creates x509 certPool with provided CA file +func newCertPoolWithCaFile(caFile string) (*x509.CertPool, error) { + pemByte, err := os.ReadFile(caFile) + if err != nil { + return nil, err + } + + return newCertPool(pemByte) +} + +func newCertPool(caPEMBlock []byte) (*x509.CertPool, error) { + certPool := x509.NewCertPool() + + var block *pem.Block + var cert *x509.Certificate + var err error + for { + block, caPEMBlock = pem.Decode(caPEMBlock) + if block == nil { + return certPool, nil + } + + cert, err = x509.ParseCertificate(block.Bytes) + if err != nil { + return nil, err + } + + certPool.AddCert(cert) + } + + //if !certPool.AppendCertsFromPEM(caPEMBlock) { + // return nil, fmt.Errorf("can't add CA cert") + //} + //return certPool, nil +}