Compare commits
1 Commits
registry/z
...
api/v0.0.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e051505a1 |
@@ -1,9 +0,0 @@
|
||||
version: v1
|
||||
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
@@ -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{
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
349
api/gen/go/conf/v1/kratos_conf_tls.pb.go
Normal file
349
api/gen/go/conf/v1/kratos_conf_tls.pb.go
Normal file
@@ -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
|
||||
}
|
||||
@@ -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服务
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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: 不更新
|
||||
}
|
||||
|
||||
@@ -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服务
|
||||
}
|
||||
|
||||
23
api/protos/conf/v1/kratos_conf_tls.proto
Normal file
23
api/protos/conf/v1/kratos_conf_tls.proto
Normal file
@@ -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;
|
||||
}
|
||||
182
rpc/grpc.go
182
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
|
||||
}
|
||||
|
||||
85
rpc/rest.go
85
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) {
|
||||
|
||||
190
utils/tls.go
Normal file
190
utils/tls.go
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user