增加DNS域名管理

This commit is contained in:
GoEdgeLab
2020-11-12 14:41:23 +08:00
parent 6d7d87aa11
commit 37538b40a9
36 changed files with 4007 additions and 4179 deletions

View File

@@ -178,53 +178,6 @@ func (*CountLogRequest) Descriptor() ([]byte, []int) {
return file_service_log_proto_rawDescGZIP(), []int{2}
}
type CountLogResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *CountLogResponse) Reset() {
*x = CountLogResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_log_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CountLogResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CountLogResponse) ProtoMessage() {}
func (x *CountLogResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_log_proto_msgTypes[3]
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 CountLogResponse.ProtoReflect.Descriptor instead.
func (*CountLogResponse) Descriptor() ([]byte, []int) {
return file_service_log_proto_rawDescGZIP(), []int{3}
}
func (x *CountLogResponse) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
// 列出单页日志
type ListLogsRequest struct {
state protoimpl.MessageState
@@ -238,7 +191,7 @@ type ListLogsRequest struct {
func (x *ListLogsRequest) Reset() {
*x = ListLogsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_log_proto_msgTypes[4]
mi := &file_service_log_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -251,7 +204,7 @@ func (x *ListLogsRequest) String() string {
func (*ListLogsRequest) ProtoMessage() {}
func (x *ListLogsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_log_proto_msgTypes[4]
mi := &file_service_log_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -264,7 +217,7 @@ func (x *ListLogsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListLogsRequest.ProtoReflect.Descriptor instead.
func (*ListLogsRequest) Descriptor() ([]byte, []int) {
return file_service_log_proto_rawDescGZIP(), []int{4}
return file_service_log_proto_rawDescGZIP(), []int{3}
}
func (x *ListLogsRequest) GetOffset() int64 {
@@ -292,7 +245,7 @@ type ListLogsResponse struct {
func (x *ListLogsResponse) Reset() {
*x = ListLogsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_log_proto_msgTypes[5]
mi := &file_service_log_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -305,7 +258,7 @@ func (x *ListLogsResponse) String() string {
func (*ListLogsResponse) ProtoMessage() {}
func (x *ListLogsResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_log_proto_msgTypes[5]
mi := &file_service_log_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -318,7 +271,7 @@ func (x *ListLogsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListLogsResponse.ProtoReflect.Descriptor instead.
func (*ListLogsResponse) Descriptor() ([]byte, []int) {
return file_service_log_proto_rawDescGZIP(), []int{5}
return file_service_log_proto_rawDescGZIP(), []int{4}
}
func (x *ListLogsResponse) GetLogs() []*Log {
@@ -332,40 +285,38 @@ var File_service_log_proto protoreflect.FileDescriptor
var file_service_log_proto_rawDesc = []byte{
0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c,
0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76,
0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x13, 0x0a, 0x11,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x10, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3d,
0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x2f, 0x0a,
0x10, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x07, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x32, 0xb5,
0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x10,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x4c, 0x6f, 0x67, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c,
0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x35, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70,
0x22, 0x13, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74,
0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f,
0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4c,
0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6c,
0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x32, 0xb5, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x67,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x36, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x13,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6c, 0x69, 0x73,
0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c,
0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x73, 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 (
@@ -380,24 +331,24 @@ func file_service_log_proto_rawDescGZIP() []byte {
return file_service_log_proto_rawDescData
}
var file_service_log_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_log_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_service_log_proto_goTypes = []interface{}{
(*CreateLogRequest)(nil), // 0: pb.CreateLogRequest
(*CreateLogResponse)(nil), // 1: pb.CreateLogResponse
(*CountLogRequest)(nil), // 2: pb.CountLogRequest
(*CountLogResponse)(nil), // 3: pb.CountLogResponse
(*ListLogsRequest)(nil), // 4: pb.ListLogsRequest
(*ListLogsResponse)(nil), // 5: pb.ListLogsResponse
(*Log)(nil), // 6: pb.Log
(*ListLogsRequest)(nil), // 3: pb.ListLogsRequest
(*ListLogsResponse)(nil), // 4: pb.ListLogsResponse
(*Log)(nil), // 5: pb.Log
(*RPCCountResponse)(nil), // 6: pb.RPCCountResponse
}
var file_service_log_proto_depIdxs = []int32{
6, // 0: pb.ListLogsResponse.logs:type_name -> pb.Log
5, // 0: pb.ListLogsResponse.logs:type_name -> pb.Log
0, // 1: pb.LogService.createLog:input_type -> pb.CreateLogRequest
2, // 2: pb.LogService.countLogs:input_type -> pb.CountLogRequest
4, // 3: pb.LogService.listLogs:input_type -> pb.ListLogsRequest
3, // 3: pb.LogService.listLogs:input_type -> pb.ListLogsRequest
1, // 4: pb.LogService.createLog:output_type -> pb.CreateLogResponse
3, // 5: pb.LogService.countLogs:output_type -> pb.CountLogResponse
5, // 6: pb.LogService.listLogs:output_type -> pb.ListLogsResponse
6, // 5: pb.LogService.countLogs:output_type -> pb.RPCCountResponse
4, // 6: pb.LogService.listLogs:output_type -> pb.ListLogsResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
@@ -410,6 +361,7 @@ func file_service_log_proto_init() {
if File_service_log_proto != nil {
return
}
file_rpc_messages_proto_init()
file_model_log_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
@@ -449,18 +401,6 @@ func file_service_log_proto_init() {
}
}
file_service_log_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountLogResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_log_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListLogsRequest); i {
case 0:
return &v.state
@@ -472,7 +412,7 @@ func file_service_log_proto_init() {
return nil
}
}
file_service_log_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_service_log_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListLogsResponse); i {
case 0:
return &v.state
@@ -491,7 +431,7 @@ func file_service_log_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_log_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
@@ -520,7 +460,7 @@ type LogServiceClient interface {
// 创建日志
CreateLog(ctx context.Context, in *CreateLogRequest, opts ...grpc.CallOption) (*CreateLogResponse, error)
// 计算日志数量
CountLogs(ctx context.Context, in *CountLogRequest, opts ...grpc.CallOption) (*CountLogResponse, error)
CountLogs(ctx context.Context, in *CountLogRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页日志
ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error)
}
@@ -542,8 +482,8 @@ func (c *logServiceClient) CreateLog(ctx context.Context, in *CreateLogRequest,
return out, nil
}
func (c *logServiceClient) CountLogs(ctx context.Context, in *CountLogRequest, opts ...grpc.CallOption) (*CountLogResponse, error) {
out := new(CountLogResponse)
func (c *logServiceClient) CountLogs(ctx context.Context, in *CountLogRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.LogService/countLogs", in, out, opts...)
if err != nil {
return nil, err
@@ -565,7 +505,7 @@ type LogServiceServer interface {
// 创建日志
CreateLog(context.Context, *CreateLogRequest) (*CreateLogResponse, error)
// 计算日志数量
CountLogs(context.Context, *CountLogRequest) (*CountLogResponse, error)
CountLogs(context.Context, *CountLogRequest) (*RPCCountResponse, error)
// 列出单页日志
ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error)
}
@@ -577,7 +517,7 @@ type UnimplementedLogServiceServer struct {
func (*UnimplementedLogServiceServer) CreateLog(context.Context, *CreateLogRequest) (*CreateLogResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateLog not implemented")
}
func (*UnimplementedLogServiceServer) CountLogs(context.Context, *CountLogRequest) (*CountLogResponse, error) {
func (*UnimplementedLogServiceServer) CountLogs(context.Context, *CountLogRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountLogs not implemented")
}
func (*UnimplementedLogServiceServer) ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) {