mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-06 14:50:24 +08:00
初步实现对象存储源站
This commit is contained in:
@@ -15266,7 +15266,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CreateOriginRequest",
|
"name": "CreateOriginRequest",
|
||||||
"code": "message CreateOriginRequest {\n\tstring name = 1;\n\tNetworkAddress addr = 2;\n\tstring description = 3;\n\tint32 weight = 4;\n\tbool isOn = 5;\n\tbytes connTimeoutJSON = 6;\n\tbytes readTimeoutJSON = 7;\n\tbytes idleTimeoutJSON = 8;\n\tint32 maxConns = 9;\n\tint32 maxIdleConns = 10;\n\trepeated string domains = 11;\n\tbytes certRefJSON = 12;\n\tstring host = 13;\n\tbool followPort = 14;\n}",
|
"code": "message CreateOriginRequest {\n\tstring name = 1; // 名称,为可选项\n\tNetworkAddress addr = 2; // 源站网络地址\n\tbytes ossJSON = 15; // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项\n\tstring description = 3; // 描述,为可选项\n\tint32 weight = 4; // 权重,不小于0,一般设置为10\n\tbool isOn = 5; // 是否启用\n\tbytes connTimeoutJSON = 6; // 可选项\n\tbytes readTimeoutJSON = 7; // 可选项\n\tbytes idleTimeoutJSON = 8; // 可选项\n\tint32 maxConns = 9; // 可选项\n\tint32 maxIdleConns = 10; // 可选项\n\trepeated string domains = 11; // 可选项\n\tbytes certRefJSON = 12; // 可选项\n\tstring host = 13; // 可选项\n\tbool followPort = 14; // 可选项\n}",
|
||||||
"doc": "创建源站"
|
"doc": "创建源站"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -20886,7 +20886,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Origin",
|
"name": "Origin",
|
||||||
"code": "message Origin {\n\tint64 id = 1;\n\tbool isOn = 2;\n\tstring name = 3;\n\tNetworkAddress addr = 4;\n\tstring description = 5;\n\trepeated string domains = 6;\n\tstring host = 7;\n\tbool followPort = 8;\n}",
|
"code": "message Origin {\n\tint64 id = 1;\n\tbool isOn = 2;\n\tstring name = 3;\n\tNetworkAddress addr = 4; // 源站网络地址\n\tbytes ossJSON = 9; // 源站网络地址为oss:开头时有此内容\n\tstring description = 5;\n\trepeated string domains = 6;\n\tstring host = 7;\n\tbool followPort = 8;\n}",
|
||||||
"doc": ""
|
"doc": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -22266,7 +22266,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateOriginRequest",
|
"name": "UpdateOriginRequest",
|
||||||
"code": "message UpdateOriginRequest {\n\tint64 originId = 1;\n\tstring name = 2;\n\tNetworkAddress addr = 3;\n\tstring description = 4;\n\tint32 weight = 5;\n\tbool isOn = 6;\n\tbytes connTimeoutJSON = 7;\n\tbytes readTimeoutJSON = 8;\n\tbytes idleTimeoutJSON = 9;\n\tint32 maxConns = 10;\n\tint32 maxIdleConns = 11;\n\trepeated string domains = 12;\n\tbytes certRefJSON = 13;\n\tstring host = 14;\n\tbool followPort = 15;\n}",
|
"code": "message UpdateOriginRequest {\n\tint64 originId = 1; // 源站ID\n\tstring name = 2; // 可选项\n\tNetworkAddress addr = 3; // 源站网络地址\n\tbytes ossJSON = 16; // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项\n\tstring description = 4; // 可选项\n\tint32 weight = 5; // 权重,不小于0,一般设置为10\n\tbool isOn = 6; // 是否启用\n\tbytes connTimeoutJSON = 7; // 可选项\n\tbytes readTimeoutJSON = 8; // 可选项\n\tbytes idleTimeoutJSON = 9; // 可选项\n\tint32 maxConns = 10; // 可选项\n\tint32 maxIdleConns = 11; // 可选项\n\trepeated string domains = 12; // 可选项\n\tbytes certRefJSON = 13; // 可选项\n\tstring host = 14; // 可选项\n\tbool followPort = 15; // 可选项\n}",
|
||||||
"doc": "修改源站"
|
"doc": "修改源站"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ type Origin struct {
|
|||||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
Addr *NetworkAddress `protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"`
|
Addr *NetworkAddress `protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"` // 源站网络地址
|
||||||
|
OssJSON []byte `protobuf:"bytes,9,opt,name=ossJSON,proto3" json:"ossJSON,omitempty"` // 源站网络地址为oss:开头时有此内容
|
||||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||||
Domains []string `protobuf:"bytes,6,rep,name=domains,proto3" json:"domains,omitempty"`
|
Domains []string `protobuf:"bytes,6,rep,name=domains,proto3" json:"domains,omitempty"`
|
||||||
Host string `protobuf:"bytes,7,opt,name=host,proto3" json:"host,omitempty"`
|
Host string `protobuf:"bytes,7,opt,name=host,proto3" json:"host,omitempty"`
|
||||||
@@ -100,6 +101,13 @@ func (x *Origin) GetAddr() *NetworkAddress {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Origin) GetOssJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.OssJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Origin) GetDescription() string {
|
func (x *Origin) GetDescription() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Description
|
return x.Description
|
||||||
@@ -135,21 +143,23 @@ var file_models_model_origin_proto_rawDesc = []byte{
|
|||||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
|
0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
|
||||||
0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x65,
|
0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x65,
|
||||||
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72,
|
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x0e,
|
0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x01, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x0e,
|
||||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
||||||
0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73,
|
0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73,
|
||||||
0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04,
|
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04,
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||||
0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x20,
|
0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18,
|
||||||
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
|
0x0a, 0x07, 0x6f, 0x73, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
0x07, 0x6f, 0x73, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||||
0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,
|
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
||||||
0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f,
|
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f,
|
||||||
0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e,
|
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d,
|
||||||
0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01,
|
0x61, 0x69, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01,
|
||||||
0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x42, 0x06,
|
0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c,
|
||||||
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f,
|
||||||
|
0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -35,20 +35,21 @@ type CreateOriginRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 名称,为可选项
|
||||||
Addr *NetworkAddress `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
|
Addr *NetworkAddress `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 源站网络地址
|
||||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
OssJSON []byte `protobuf:"bytes,15,opt,name=ossJSON,proto3" json:"ossJSON,omitempty"` // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项
|
||||||
Weight int32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"`
|
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 描述,为可选项
|
||||||
IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
Weight int32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` // 权重,不小于0,一般设置为10
|
||||||
ConnTimeoutJSON []byte `protobuf:"bytes,6,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"`
|
IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
|
||||||
ReadTimeoutJSON []byte `protobuf:"bytes,7,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"`
|
ConnTimeoutJSON []byte `protobuf:"bytes,6,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"` // 可选项
|
||||||
IdleTimeoutJSON []byte `protobuf:"bytes,8,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"`
|
ReadTimeoutJSON []byte `protobuf:"bytes,7,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"` // 可选项
|
||||||
MaxConns int32 `protobuf:"varint,9,opt,name=maxConns,proto3" json:"maxConns,omitempty"`
|
IdleTimeoutJSON []byte `protobuf:"bytes,8,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"` // 可选项
|
||||||
MaxIdleConns int32 `protobuf:"varint,10,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"`
|
MaxConns int32 `protobuf:"varint,9,opt,name=maxConns,proto3" json:"maxConns,omitempty"` // 可选项
|
||||||
Domains []string `protobuf:"bytes,11,rep,name=domains,proto3" json:"domains,omitempty"`
|
MaxIdleConns int32 `protobuf:"varint,10,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"` // 可选项
|
||||||
CertRefJSON []byte `protobuf:"bytes,12,opt,name=certRefJSON,proto3" json:"certRefJSON,omitempty"`
|
Domains []string `protobuf:"bytes,11,rep,name=domains,proto3" json:"domains,omitempty"` // 可选项
|
||||||
Host string `protobuf:"bytes,13,opt,name=host,proto3" json:"host,omitempty"`
|
CertRefJSON []byte `protobuf:"bytes,12,opt,name=certRefJSON,proto3" json:"certRefJSON,omitempty"` // 可选项
|
||||||
FollowPort bool `protobuf:"varint,14,opt,name=followPort,proto3" json:"followPort,omitempty"`
|
Host string `protobuf:"bytes,13,opt,name=host,proto3" json:"host,omitempty"` // 可选项
|
||||||
|
FollowPort bool `protobuf:"varint,14,opt,name=followPort,proto3" json:"followPort,omitempty"` // 可选项
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateOriginRequest) Reset() {
|
func (x *CreateOriginRequest) Reset() {
|
||||||
@@ -97,6 +98,13 @@ func (x *CreateOriginRequest) GetAddr() *NetworkAddress {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CreateOriginRequest) GetOssJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.OssJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *CreateOriginRequest) GetDescription() string {
|
func (x *CreateOriginRequest) GetDescription() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Description
|
return x.Description
|
||||||
@@ -234,21 +242,22 @@ type UpdateOriginRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"`
|
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"` // 源站ID
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 可选项
|
||||||
Addr *NetworkAddress `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
|
Addr *NetworkAddress `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"` // 源站网络地址
|
||||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
OssJSON []byte `protobuf:"bytes,16,opt,name=ossJSON,proto3" json:"ossJSON,omitempty"` // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项
|
||||||
Weight int32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"`
|
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 可选项
|
||||||
IsOn bool `protobuf:"varint,6,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
Weight int32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"` // 权重,不小于0,一般设置为10
|
||||||
ConnTimeoutJSON []byte `protobuf:"bytes,7,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"`
|
IsOn bool `protobuf:"varint,6,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
|
||||||
ReadTimeoutJSON []byte `protobuf:"bytes,8,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"`
|
ConnTimeoutJSON []byte `protobuf:"bytes,7,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"` // 可选项
|
||||||
IdleTimeoutJSON []byte `protobuf:"bytes,9,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"`
|
ReadTimeoutJSON []byte `protobuf:"bytes,8,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"` // 可选项
|
||||||
MaxConns int32 `protobuf:"varint,10,opt,name=maxConns,proto3" json:"maxConns,omitempty"`
|
IdleTimeoutJSON []byte `protobuf:"bytes,9,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"` // 可选项
|
||||||
MaxIdleConns int32 `protobuf:"varint,11,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"`
|
MaxConns int32 `protobuf:"varint,10,opt,name=maxConns,proto3" json:"maxConns,omitempty"` // 可选项
|
||||||
Domains []string `protobuf:"bytes,12,rep,name=domains,proto3" json:"domains,omitempty"`
|
MaxIdleConns int32 `protobuf:"varint,11,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"` // 可选项
|
||||||
CertRefJSON []byte `protobuf:"bytes,13,opt,name=certRefJSON,proto3" json:"certRefJSON,omitempty"`
|
Domains []string `protobuf:"bytes,12,rep,name=domains,proto3" json:"domains,omitempty"` // 可选项
|
||||||
Host string `protobuf:"bytes,14,opt,name=host,proto3" json:"host,omitempty"`
|
CertRefJSON []byte `protobuf:"bytes,13,opt,name=certRefJSON,proto3" json:"certRefJSON,omitempty"` // 可选项
|
||||||
FollowPort bool `protobuf:"varint,15,opt,name=followPort,proto3" json:"followPort,omitempty"`
|
Host string `protobuf:"bytes,14,opt,name=host,proto3" json:"host,omitempty"` // 可选项
|
||||||
|
FollowPort bool `protobuf:"varint,15,opt,name=followPort,proto3" json:"followPort,omitempty"` // 可选项
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateOriginRequest) Reset() {
|
func (x *UpdateOriginRequest) Reset() {
|
||||||
@@ -304,6 +313,13 @@ func (x *UpdateOriginRequest) GetAddr() *NetworkAddress {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UpdateOriginRequest) GetOssJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.OssJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *UpdateOriginRequest) GetDescription() string {
|
func (x *UpdateOriginRequest) GetDescription() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Description
|
return x.Description
|
||||||
@@ -588,107 +604,110 @@ var file_service_origin_proto_rawDesc = []byte{
|
|||||||
0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
||||||
0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||||
0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70,
|
0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
|
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x03, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
|
||||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x12, 0x26, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
|
0x12, 0x26, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65,
|
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65,
|
||||||
0x73, 0x73, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
0x73, 0x73, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x73, 0x73, 0x4a,
|
||||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
0x53, 0x4f, 0x4e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x73, 0x73, 0x4a, 0x53,
|
||||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65,
|
0x4f, 0x4e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||||
0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67,
|
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||||
0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
|
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04,
|
||||||
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
0x69, 0x73, 0x4f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e,
|
||||||
0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e,
|
0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a,
|
||||||
0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a,
|
0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54,
|
||||||
0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54,
|
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65,
|
||||||
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x64,
|
0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20,
|
||||||
0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20,
|
0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65,
|
||||||
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69,
|
||||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a,
|
||||||
0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43,
|
0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61,
|
||||||
0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18,
|
0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20,
|
0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x18,
|
||||||
0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20,
|
0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e,
|
0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63,
|
||||||
0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f,
|
0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f,
|
||||||
0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77,
|
0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e,
|
||||||
0x50, 0x6f, 0x72, 0x74, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72,
|
0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01,
|
||||||
0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x32,
|
||||||
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
|
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65,
|
||||||
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x22, 0xe9, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
||||||
0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
||||||
0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x49, 0x64, 0x22, 0x83, 0x04, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69,
|
||||||
0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72,
|
||||||
0x12, 0x26, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
|
0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x61, 0x64,
|
||||||
0x73, 0x73, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65,
|
||||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x61, 0x64,
|
||||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65,
|
0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x73, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20,
|
||||||
0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67,
|
0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x73, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x20, 0x0a, 0x0b,
|
||||||
0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
|
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69,
|
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
|
||||||
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e,
|
0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x06,
|
||||||
0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f,
|
||||||
0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54,
|
0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20,
|
||||||
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x64,
|
0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
||||||
0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20,
|
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72,
|
||||||
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28,
|
||||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x0a, 0x0f, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f,
|
||||||
0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73,
|
0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d,
|
||||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43,
|
0x65, 0x6f, 0x75, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43,
|
||||||
0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18,
|
0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43,
|
||||||
0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x20,
|
0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43,
|
||||||
0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0d, 0x20,
|
0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49,
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e,
|
0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x69, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||||
0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f,
|
0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f,
|
||||||
0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77,
|
0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x52, 0x65, 0x66,
|
||||||
0x50, 0x6f, 0x72, 0x74, 0x22, 0x36, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
|
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01,
|
||||||
0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x6c, 0x6c,
|
||||||
0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f,
|
||||||
0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x19,
|
0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x36, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64,
|
||||||
0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69,
|
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x4f, 0x72, 0x69,
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64,
|
||||||
0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64,
|
||||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x3c, 0x0a,
|
0x22, 0x3f, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f,
|
||||||
0x1e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67,
|
0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a,
|
||||||
0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
|
||||||
0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x70, 0x62, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69,
|
||||||
0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x1f, 0x46,
|
0x6e, 0x22, 0x3c, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e,
|
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x18,
|
||||||
0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01,
|
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x22,
|
||||||
0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xc1,
|
0x41, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72,
|
||||||
0x02, 0x0a, 0x0d, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
|
||||||
0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
|
||||||
0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67,
|
|
||||||
0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
|
||||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69,
|
|
||||||
0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f,
|
|
||||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
|
|
||||||
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x11,
|
|
||||||
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69,
|
|
||||||
0x6e, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
|
||||||
0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
|
||||||
0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
|
||||||
0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62,
|
|
||||||
0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69,
|
|
||||||
0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46,
|
|
||||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
|
||||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
|
||||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72,
|
|
||||||
0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e,
|
||||||
0x6f, 0x33,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53,
|
||||||
|
0x4f, 0x4e, 0x32, 0xc1, 0x02, 0x0a, 0x0d, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72,
|
||||||
|
0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72,
|
||||||
|
0x69, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
|
0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
|
||||||
|
0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||||
|
0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f,
|
||||||
|
0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
|
||||||
|
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
|
||||||
|
0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||||
|
0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72,
|
||||||
|
0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||||
|
0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ message Origin {
|
|||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
bool isOn = 2;
|
bool isOn = 2;
|
||||||
string name = 3;
|
string name = 3;
|
||||||
NetworkAddress addr = 4;
|
NetworkAddress addr = 4; // 源站网络地址
|
||||||
|
bytes ossJSON = 9; // 源站网络地址为oss:开头时有此内容
|
||||||
string description = 5;
|
string description = 5;
|
||||||
repeated string domains = 6;
|
repeated string domains = 6;
|
||||||
string host = 7;
|
string host = 7;
|
||||||
|
|||||||
@@ -24,20 +24,21 @@ service OriginService {
|
|||||||
|
|
||||||
// 创建源站
|
// 创建源站
|
||||||
message CreateOriginRequest {
|
message CreateOriginRequest {
|
||||||
string name = 1;
|
string name = 1; // 名称,为可选项
|
||||||
NetworkAddress addr = 2;
|
NetworkAddress addr = 2; // 源站网络地址
|
||||||
string description = 3;
|
bytes ossJSON = 15; // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项
|
||||||
int32 weight = 4;
|
string description = 3; // 描述,为可选项
|
||||||
bool isOn = 5;
|
int32 weight = 4; // 权重,不小于0,一般设置为10
|
||||||
bytes connTimeoutJSON = 6;
|
bool isOn = 5; // 是否启用
|
||||||
bytes readTimeoutJSON = 7;
|
bytes connTimeoutJSON = 6; // 可选项
|
||||||
bytes idleTimeoutJSON = 8;
|
bytes readTimeoutJSON = 7; // 可选项
|
||||||
int32 maxConns = 9;
|
bytes idleTimeoutJSON = 8; // 可选项
|
||||||
int32 maxIdleConns = 10;
|
int32 maxConns = 9; // 可选项
|
||||||
repeated string domains = 11;
|
int32 maxIdleConns = 10; // 可选项
|
||||||
bytes certRefJSON = 12;
|
repeated string domains = 11; // 可选项
|
||||||
string host = 13;
|
bytes certRefJSON = 12; // 可选项
|
||||||
bool followPort = 14;
|
string host = 13; // 可选项
|
||||||
|
bool followPort = 14; // 可选项
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateOriginResponse {
|
message CreateOriginResponse {
|
||||||
@@ -46,21 +47,22 @@ message CreateOriginResponse {
|
|||||||
|
|
||||||
// 修改源站
|
// 修改源站
|
||||||
message UpdateOriginRequest {
|
message UpdateOriginRequest {
|
||||||
int64 originId = 1;
|
int64 originId = 1; // 源站ID
|
||||||
string name = 2;
|
string name = 2; // 可选项
|
||||||
NetworkAddress addr = 3;
|
NetworkAddress addr = 3; // 源站网络地址
|
||||||
string description = 4;
|
bytes ossJSON = 16; // OSS配置信息,源站网络地址中protocol为oss:开头时需要设置此项
|
||||||
int32 weight = 5;
|
string description = 4; // 可选项
|
||||||
bool isOn = 6;
|
int32 weight = 5; // 权重,不小于0,一般设置为10
|
||||||
bytes connTimeoutJSON = 7;
|
bool isOn = 6; // 是否启用
|
||||||
bytes readTimeoutJSON = 8;
|
bytes connTimeoutJSON = 7; // 可选项
|
||||||
bytes idleTimeoutJSON = 9;
|
bytes readTimeoutJSON = 8; // 可选项
|
||||||
int32 maxConns = 10;
|
bytes idleTimeoutJSON = 9; // 可选项
|
||||||
int32 maxIdleConns = 11;
|
int32 maxConns = 10; // 可选项
|
||||||
repeated string domains = 12;
|
int32 maxIdleConns = 11; // 可选项
|
||||||
bytes certRefJSON = 13;
|
repeated string domains = 12; // 可选项
|
||||||
string host = 14;
|
bytes certRefJSON = 13; // 可选项
|
||||||
bool followPort = 15;
|
string host = 14; // 可选项
|
||||||
|
bool followPort = 15; // 可选项
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找单个源站信息
|
// 查找单个源站信息
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||||
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ossconfigs"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -18,6 +19,7 @@ type OriginConfig struct {
|
|||||||
Version int `yaml:"version" json:"version"` // 版本
|
Version int `yaml:"version" json:"version"` // 版本
|
||||||
Name string `yaml:"name" json:"name"` // 名称
|
Name string `yaml:"name" json:"name"` // 名称
|
||||||
Addr *NetworkAddressConfig `yaml:"addr" json:"addr"` // 地址
|
Addr *NetworkAddressConfig `yaml:"addr" json:"addr"` // 地址
|
||||||
|
OSS *ossconfigs.OSSConfig `yaml:"oss" json:"oss"` // 对象存储配置
|
||||||
Description string `yaml:"description" json:"description"` // 描述 TODO
|
Description string `yaml:"description" json:"description"` // 描述 TODO
|
||||||
Code string `yaml:"code" json:"code"` // 代号 TODO
|
Code string `yaml:"code" json:"code"` // 代号 TODO
|
||||||
|
|
||||||
@@ -171,6 +173,14 @@ func (this *OriginConfig) Init(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// oss
|
||||||
|
if this.OSS != nil {
|
||||||
|
err := this.OSS.Init()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,3 +227,22 @@ func (this *OriginConfig) RequestURIHasVariables() bool {
|
|||||||
func (this *OriginConfig) UniqueKey() string {
|
func (this *OriginConfig) UniqueKey() string {
|
||||||
return this.uniqueKey
|
return this.uniqueKey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsOSS 判断当前源站是否为OSS
|
||||||
|
func (this *OriginConfig) IsOSS() bool {
|
||||||
|
return this.Addr != nil && ossconfigs.IsOSSProtocol(this.Addr.Protocol.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddrSummary 地址描述
|
||||||
|
func (this *OriginConfig) AddrSummary() string {
|
||||||
|
if this.Addr == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// OSS
|
||||||
|
if ossconfigs.IsOSSProtocol(this.Addr.Protocol.String()) && this.OSS != nil {
|
||||||
|
return this.OSS.Summary()
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.Addr.Protocol.String() + "://" + this.Addr.Host + ":" + this.Addr.PortRange
|
||||||
|
}
|
||||||
|
|||||||
85
pkg/serverconfigs/ossconfigs/oss_config.go
Normal file
85
pkg/serverconfigs/ossconfigs/oss_config.go
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||||
|
|
||||||
|
package ossconfigs
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"reflect"
|
||||||
|
)
|
||||||
|
|
||||||
|
type OSSConfig struct {
|
||||||
|
Type OSSType `yaml:"oss" json:"type"`
|
||||||
|
Options any `yaml:"options" json:"options"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewOSSConfig() *OSSConfig {
|
||||||
|
return &OSSConfig{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *OSSConfig) Init() error {
|
||||||
|
if this.Options != nil {
|
||||||
|
// decode options
|
||||||
|
if reflect.TypeOf(this.Options).Kind() == reflect.Map {
|
||||||
|
optionsJSON, err := json.Marshal(this.Options)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
newOptions, decodeErr := DecodeOSSOptions(this.Type, optionsJSON)
|
||||||
|
if decodeErr != nil {
|
||||||
|
return decodeErr
|
||||||
|
}
|
||||||
|
if newOptions != nil {
|
||||||
|
this.Options = newOptions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options, ok := this.Options.(OSSOptions)
|
||||||
|
if ok {
|
||||||
|
err := options.Init()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *OSSConfig) Summary() string {
|
||||||
|
var name = ""
|
||||||
|
var found = false
|
||||||
|
for _, def := range FindAllOSSTypes() {
|
||||||
|
if def.Code == this.Type {
|
||||||
|
name = def.Name
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var summary = ""
|
||||||
|
if this.Options != nil {
|
||||||
|
// decode options
|
||||||
|
if reflect.TypeOf(this.Options).Kind() == reflect.Map {
|
||||||
|
optionsJSON, err := json.Marshal(this.Options)
|
||||||
|
if err == nil { // ignore error
|
||||||
|
newOptions, decodeErr := DecodeOSSOptions(this.Type, optionsJSON)
|
||||||
|
if decodeErr == nil && newOptions != nil {
|
||||||
|
this.Options = newOptions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options, ok := this.Options.(OSSOptions)
|
||||||
|
if ok {
|
||||||
|
summary = options.Summary()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(summary) == 0 {
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
return name + " - " + summary
|
||||||
|
}
|
||||||
9
pkg/serverconfigs/ossconfigs/oss_options.go
Normal file
9
pkg/serverconfigs/ossconfigs/oss_options.go
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||||
|
|
||||||
|
package ossconfigs
|
||||||
|
|
||||||
|
type OSSOptions interface {
|
||||||
|
Init() error // 初始化
|
||||||
|
Summary() string // 内容简述
|
||||||
|
UniqueId() string // 唯一标识
|
||||||
|
}
|
||||||
16
pkg/serverconfigs/ossconfigs/oss_types.go
Normal file
16
pkg/serverconfigs/ossconfigs/oss_types.go
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||||
|
//go:build !plus
|
||||||
|
|
||||||
|
package ossconfigs
|
||||||
|
|
||||||
|
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||||
|
|
||||||
|
type OSSType = string
|
||||||
|
|
||||||
|
func FindAllOSSTypes() []*shared.Definition {
|
||||||
|
return []*shared.Definition{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DecodeOSSOptions(ossType OSSType, optionsJSON []byte) (any, error) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
9
pkg/serverconfigs/ossconfigs/oss_utils.go
Normal file
9
pkg/serverconfigs/ossconfigs/oss_utils.go
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||||
|
|
||||||
|
package ossconfigs
|
||||||
|
|
||||||
|
import "strings"
|
||||||
|
|
||||||
|
func IsOSSProtocol(protocol string) bool {
|
||||||
|
return strings.HasPrefix(protocol, "oss:")
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package serverconfigs
|
package serverconfigs
|
||||||
|
|
||||||
|
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ossconfigs"
|
||||||
|
|
||||||
type Protocol string
|
type Protocol string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -52,7 +54,11 @@ func (this Protocol) IsUDPFamily() bool {
|
|||||||
return this == ProtocolUDP
|
return this == ProtocolUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
// 主协议
|
func (this Protocol) IsOSS() bool {
|
||||||
|
return ossconfigs.IsOSSProtocol(this.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Primary 主协议
|
||||||
func (this Protocol) Primary() Protocol {
|
func (this Protocol) Primary() Protocol {
|
||||||
switch this {
|
switch this {
|
||||||
case ProtocolHTTP, ProtocolHTTP4, ProtocolHTTP6:
|
case ProtocolHTTP, ProtocolHTTP4, ProtocolHTTP6:
|
||||||
@@ -72,7 +78,7 @@ func (this Protocol) Primary() Protocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scheme
|
// Scheme schema
|
||||||
func (this Protocol) Scheme() string {
|
func (this Protocol) Scheme() string {
|
||||||
return string(this)
|
return string(this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user