Skip to content
Snippets Groups Projects
Commit 811b12ca authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

more defined set

parent 88425e4e
Branches
Tags
No related merge requests found
...@@ -64,7 +64,7 @@ func (x SetResponseStatus) Number() protoreflect.EnumNumber { ...@@ -64,7 +64,7 @@ func (x SetResponseStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use SetResponseStatus.Descriptor instead. // Deprecated: Use SetResponseStatus.Descriptor instead.
func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { func (SetResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_gosdn_core_core_proto_rawDescGZIP(), []int{3, 0} return file_gosdn_core_core_proto_rawDescGZIP(), []int{4, 0}
} }
type GetRequest struct { type GetRequest struct {
...@@ -190,7 +190,8 @@ type SetRequest struct { ...@@ -190,7 +190,8 @@ type SetRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Pnd []*SetPnd `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"`
} }
func (x *SetRequest) Reset() { func (x *SetRequest) Reset() {
...@@ -232,18 +233,89 @@ func (x *SetRequest) GetTimestamp() int64 { ...@@ -232,18 +233,89 @@ func (x *SetRequest) GetTimestamp() int64 {
return 0 return 0
} }
func (x *SetRequest) GetPnd() []*SetPnd {
if x != nil {
return x.Pnd
}
return nil
}
type SetPnd struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Sbi string `protobuf:"bytes,3,opt,name=sbi,proto3" json:"sbi,omitempty"`
}
func (x *SetPnd) Reset() {
*x = SetPnd{}
if protoimpl.UnsafeEnabled {
mi := &file_gosdn_core_core_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetPnd) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetPnd) ProtoMessage() {}
func (x *SetPnd) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_core_core_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 SetPnd.ProtoReflect.Descriptor instead.
func (*SetPnd) Descriptor() ([]byte, []int) {
return file_gosdn_core_core_proto_rawDescGZIP(), []int{3}
}
func (x *SetPnd) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *SetPnd) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *SetPnd) GetSbi() string {
if x != nil {
return x.Sbi
}
return ""
}
type SetResponse struct { type SetResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.core.SetResponseStatus" json:"Status,omitempty"`
} }
func (x *SetResponse) Reset() { func (x *SetResponse) Reset() {
*x = SetResponse{} *x = SetResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_gosdn_core_core_proto_msgTypes[3] mi := &file_gosdn_core_core_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -256,7 +328,7 @@ func (x *SetResponse) String() string { ...@@ -256,7 +328,7 @@ func (x *SetResponse) String() string {
func (*SetResponse) ProtoMessage() {} func (*SetResponse) ProtoMessage() {}
func (x *SetResponse) ProtoReflect() protoreflect.Message { func (x *SetResponse) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_core_core_proto_msgTypes[3] mi := &file_gosdn_core_core_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -269,7 +341,7 @@ func (x *SetResponse) ProtoReflect() protoreflect.Message { ...@@ -269,7 +341,7 @@ func (x *SetResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetResponse.ProtoReflect.Descriptor instead. // Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.
func (*SetResponse) Descriptor() ([]byte, []int) { func (*SetResponse) Descriptor() ([]byte, []int) {
return file_gosdn_core_core_proto_rawDescGZIP(), []int{3} return file_gosdn_core_core_proto_rawDescGZIP(), []int{4}
} }
func (x *SetResponse) GetTimestamp() int64 { func (x *SetResponse) GetTimestamp() int64 {
...@@ -279,6 +351,13 @@ func (x *SetResponse) GetTimestamp() int64 { ...@@ -279,6 +351,13 @@ func (x *SetResponse) GetTimestamp() int64 {
return 0 return 0
} }
func (x *SetResponse) GetStatus() SetResponseStatus {
if x != nil {
return x.Status
}
return SetResponse_OK
}
var File_gosdn_core_core_proto protoreflect.FileDescriptor var File_gosdn_core_core_proto protoreflect.FileDescriptor
var file_gosdn_core_core_proto_rawDesc = []byte{ var file_gosdn_core_core_proto_rawDesc = []byte{
...@@ -296,25 +375,36 @@ var file_gosdn_core_core_proto_rawDesc = []byte{ ...@@ -296,25 +375,36 @@ var file_gosdn_core_core_proto_rawDesc = []byte{
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50,
0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x2a, 0x0a, 0x0a, 0x53, 0x65, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x53, 0x65,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x24, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65,
0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x2e, 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x06,
0x61, 0x6d, 0x70, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x32, 0x76, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0x80,
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c,
0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x06,
0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73,
0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74,
0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06,
0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10,
0x01, 0x32, 0x76, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74,
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64,
0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f,
0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e,
0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
...@@ -330,26 +420,29 @@ func file_gosdn_core_core_proto_rawDescGZIP() []byte { ...@@ -330,26 +420,29 @@ func file_gosdn_core_core_proto_rawDescGZIP() []byte {
} }
var file_gosdn_core_core_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_gosdn_core_core_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_gosdn_core_core_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_gosdn_core_core_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_gosdn_core_core_proto_goTypes = []interface{}{ var file_gosdn_core_core_proto_goTypes = []interface{}{
(SetResponseStatus)(0), // 0: gosdn.core.SetResponse.status (SetResponseStatus)(0), // 0: gosdn.core.SetResponse.status
(*GetRequest)(nil), // 1: gosdn.core.GetRequest (*GetRequest)(nil), // 1: gosdn.core.GetRequest
(*GetResponse)(nil), // 2: gosdn.core.GetResponse (*GetResponse)(nil), // 2: gosdn.core.GetResponse
(*SetRequest)(nil), // 3: gosdn.core.SetRequest (*SetRequest)(nil), // 3: gosdn.core.SetRequest
(*SetResponse)(nil), // 4: gosdn.core.SetResponse (*SetPnd)(nil), // 4: gosdn.core.setPnd
(*pnd.PrincipalNetworkDomain)(nil), // 5: gosdn.pnd.PrincipalNetworkDomain (*SetResponse)(nil), // 5: gosdn.core.SetResponse
(*pnd.PrincipalNetworkDomain)(nil), // 6: gosdn.pnd.PrincipalNetworkDomain
} }
var file_gosdn_core_core_proto_depIdxs = []int32{ var file_gosdn_core_core_proto_depIdxs = []int32{
5, // 0: gosdn.core.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 6, // 0: gosdn.core.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain
1, // 1: gosdn.core.core.Get:input_type -> gosdn.core.GetRequest 4, // 1: gosdn.core.SetRequest.pnd:type_name -> gosdn.core.setPnd
3, // 2: gosdn.core.core.Set:input_type -> gosdn.core.SetRequest 0, // 2: gosdn.core.SetResponse.Status:type_name -> gosdn.core.SetResponse.status
2, // 3: gosdn.core.core.Get:output_type -> gosdn.core.GetResponse 1, // 3: gosdn.core.core.Get:input_type -> gosdn.core.GetRequest
4, // 4: gosdn.core.core.Set:output_type -> gosdn.core.SetResponse 3, // 4: gosdn.core.core.Set:input_type -> gosdn.core.SetRequest
3, // [3:5] is the sub-list for method output_type 2, // 5: gosdn.core.core.Get:output_type -> gosdn.core.GetResponse
1, // [1:3] is the sub-list for method input_type 5, // 6: gosdn.core.core.Set:output_type -> gosdn.core.SetResponse
1, // [1:1] is the sub-list for extension type_name 5, // [5:7] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension extendee 3, // [3:5] is the sub-list for method input_type
0, // [0:1] is the sub-list for field type_name 3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_gosdn_core_core_proto_init() } func init() { file_gosdn_core_core_proto_init() }
...@@ -395,6 +488,18 @@ func file_gosdn_core_core_proto_init() { ...@@ -395,6 +488,18 @@ func file_gosdn_core_core_proto_init() {
} }
} }
file_gosdn_core_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_gosdn_core_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetPnd); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_gosdn_core_core_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetResponse); i { switch v := v.(*SetResponse); i {
case 0: case 0:
return &v.state return &v.state
...@@ -413,7 +518,7 @@ func file_gosdn_core_core_proto_init() { ...@@ -413,7 +518,7 @@ func file_gosdn_core_core_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_gosdn_core_core_proto_rawDesc, RawDescriptor: file_gosdn_core_core_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 4, NumMessages: 5,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
......
...@@ -71,99 +71,99 @@ func (Change_State) EnumDescriptor() ([]byte, []int) { ...@@ -71,99 +71,99 @@ func (Change_State) EnumDescriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{9, 0} return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{9, 0}
} }
type SetResponseStatus int32 type SetChange_Operation int32
const ( const (
SetResponse_OK SetResponseStatus = 0 SetChange_CREATE SetChange_Operation = 0
SetResponse_ERROR SetResponseStatus = 1 SetChange_COMMIT SetChange_Operation = 1
SetChange_CONFIRM SetChange_Operation = 2
) )
// Enum value maps for SetResponseStatus. // Enum value maps for SetChange_Operation.
var ( var (
SetResponseStatus_name = map[int32]string{ SetChange_Operation_name = map[int32]string{
0: "OK", 0: "CREATE",
1: "ERROR", 1: "COMMIT",
2: "CONFIRM",
} }
SetResponseStatus_value = map[string]int32{ SetChange_Operation_value = map[string]int32{
"OK": 0, "CREATE": 0,
"ERROR": 1, "COMMIT": 1,
"CONFIRM": 2,
} }
) )
func (x SetResponseStatus) Enum() *SetResponseStatus { func (x SetChange_Operation) Enum() *SetChange_Operation {
p := new(SetResponseStatus) p := new(SetChange_Operation)
*p = x *p = x
return p return p
} }
func (x SetResponseStatus) String() string { func (x SetChange_Operation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
} }
func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor { func (SetChange_Operation) Descriptor() protoreflect.EnumDescriptor {
return file_gosdn_pnd_pnd_proto_enumTypes[1].Descriptor() return file_gosdn_pnd_pnd_proto_enumTypes[1].Descriptor()
} }
func (SetResponseStatus) Type() protoreflect.EnumType { func (SetChange_Operation) Type() protoreflect.EnumType {
return &file_gosdn_pnd_pnd_proto_enumTypes[1] return &file_gosdn_pnd_pnd_proto_enumTypes[1]
} }
func (x SetResponseStatus) Number() protoreflect.EnumNumber { func (x SetChange_Operation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x) return protoreflect.EnumNumber(x)
} }
// Deprecated: Use SetResponseStatus.Descriptor instead. // Deprecated: Use SetChange_Operation.Descriptor instead.
func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { func (SetChange_Operation) EnumDescriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{14, 0} return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13, 0}
} }
type ChangeRequest_Operation int32 type SetResponseStatus int32
const ( const (
ChangeRequest_CREATE ChangeRequest_Operation = 0 SetResponse_OK SetResponseStatus = 0
ChangeRequest_COMMIT ChangeRequest_Operation = 1 SetResponse_ERROR SetResponseStatus = 1
ChangeRequest_CONFIRM ChangeRequest_Operation = 2
) )
// Enum value maps for ChangeRequest_Operation. // Enum value maps for SetResponseStatus.
var ( var (
ChangeRequest_Operation_name = map[int32]string{ SetResponseStatus_name = map[int32]string{
0: "CREATE", 0: "OK",
1: "COMMIT", 1: "ERROR",
2: "CONFIRM",
} }
ChangeRequest_Operation_value = map[string]int32{ SetResponseStatus_value = map[string]int32{
"CREATE": 0, "OK": 0,
"COMMIT": 1, "ERROR": 1,
"CONFIRM": 2,
} }
) )
func (x ChangeRequest_Operation) Enum() *ChangeRequest_Operation { func (x SetResponseStatus) Enum() *SetResponseStatus {
p := new(ChangeRequest_Operation) p := new(SetResponseStatus)
*p = x *p = x
return p return p
} }
func (x ChangeRequest_Operation) String() string { func (x SetResponseStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
} }
func (ChangeRequest_Operation) Descriptor() protoreflect.EnumDescriptor { func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor {
return file_gosdn_pnd_pnd_proto_enumTypes[2].Descriptor() return file_gosdn_pnd_pnd_proto_enumTypes[2].Descriptor()
} }
func (ChangeRequest_Operation) Type() protoreflect.EnumType { func (SetResponseStatus) Type() protoreflect.EnumType {
return &file_gosdn_pnd_pnd_proto_enumTypes[2] return &file_gosdn_pnd_pnd_proto_enumTypes[2]
} }
func (x ChangeRequest_Operation) Number() protoreflect.EnumNumber { func (x SetResponseStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x) return protoreflect.EnumNumber(x)
} }
// Deprecated: Use ChangeRequest_Operation.Descriptor instead. // Deprecated: Use SetResponseStatus.Descriptor instead.
func (ChangeRequest_Operation) EnumDescriptor() ([]byte, []int) { func (SetResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0} return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{14, 0}
} }
type ChangeRequest_ApiOperation int32 type ChangeRequest_ApiOperation int32
...@@ -212,7 +212,7 @@ func (x ChangeRequest_ApiOperation) Number() protoreflect.EnumNumber { ...@@ -212,7 +212,7 @@ func (x ChangeRequest_ApiOperation) Number() protoreflect.EnumNumber {
// Deprecated: Use ChangeRequest_ApiOperation.Descriptor instead. // Deprecated: Use ChangeRequest_ApiOperation.Descriptor instead.
func (ChangeRequest_ApiOperation) EnumDescriptor() ([]byte, []int) { func (ChangeRequest_ApiOperation) EnumDescriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 1} return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0}
} }
type GetRequest struct { type GetRequest struct {
...@@ -1097,6 +1097,9 @@ type SetChange struct { ...@@ -1097,6 +1097,9 @@ type SetChange struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"`
Op SetChange_Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.pnd.SetChange_Operation" json:"op,omitempty"`
} }
func (x *SetChange) Reset() { func (x *SetChange) Reset() {
...@@ -1131,12 +1134,28 @@ func (*SetChange) Descriptor() ([]byte, []int) { ...@@ -1131,12 +1134,28 @@ func (*SetChange) Descriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13} return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13}
} }
func (x *SetChange) GetCuid() string {
if x != nil {
return x.Cuid
}
return ""
}
func (x *SetChange) GetOp() SetChange_Operation {
if x != nil {
return x.Op
}
return SetChange_CREATE
}
type SetResponse struct { type SetResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.pnd.SetResponseStatus" json:"Status,omitempty"`
Responses []*SetResponse `protobuf:"bytes,3,rep,name=responses,proto3" json:"responses,omitempty"`
} }
func (x *SetResponse) Reset() { func (x *SetResponse) Reset() {
...@@ -1178,6 +1197,20 @@ func (x *SetResponse) GetTimestamp() int64 { ...@@ -1178,6 +1197,20 @@ func (x *SetResponse) GetTimestamp() int64 {
return 0 return 0
} }
func (x *SetResponse) GetStatus() SetResponseStatus {
if x != nil {
return x.Status
}
return SetResponse_OK
}
func (x *SetResponse) GetResponses() []*SetResponse {
if x != nil {
return x.Responses
}
return nil
}
type ChangeRequest struct { type ChangeRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
...@@ -1187,7 +1220,6 @@ type ChangeRequest struct { ...@@ -1187,7 +1220,6 @@ type ChangeRequest struct {
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
ApiOp ChangeRequest_ApiOperation `protobuf:"varint,4,opt,name=apiOp,proto3,enum=gosdn.pnd.ChangeRequest_ApiOperation" json:"apiOp,omitempty"` ApiOp ChangeRequest_ApiOperation `protobuf:"varint,4,opt,name=apiOp,proto3,enum=gosdn.pnd.ChangeRequest_ApiOperation" json:"apiOp,omitempty"`
Op ChangeRequest_Operation `protobuf:"varint,5,opt,name=op,proto3,enum=gosdn.pnd.ChangeRequest_Operation" json:"op,omitempty"`
} }
func (x *ChangeRequest) Reset() { func (x *ChangeRequest) Reset() {
...@@ -1250,13 +1282,6 @@ func (x *ChangeRequest) GetApiOp() ChangeRequest_ApiOperation { ...@@ -1250,13 +1282,6 @@ func (x *ChangeRequest) GetApiOp() ChangeRequest_ApiOperation {
return ChangeRequest_UPDATE return ChangeRequest_UPDATE
} }
func (x *ChangeRequest) GetOp() ChangeRequest_Operation {
if x != nil {
return x.Op
}
return ChangeRequest_CREATE
}
var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor
var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{
...@@ -1370,41 +1395,49 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ ...@@ -1370,41 +1395,49 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{
0x72, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x74, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x74,
0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52,
0x03, 0x73, 0x62, 0x69, 0x22, 0x08, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x0b, 0x03, 0x73, 0x62, 0x69, 0x22, 0x08, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x81,
0x0a, 0x09, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x48, 0x0a, 0x0b, 0x53, 0x01, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x12, 0x2e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e,
0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x67, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70,
0x52, 0x4f, 0x52, 0x10, 0x01, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x30, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x10, 0x02, 0x22, 0xb5, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x12, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x12, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x0a, 0x02, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73,
0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x6f, 0x70, 0x22, 0x30, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x1b, 0x0a,
0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12,
0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x43,
0x52, 0x4d, 0x10, 0x02, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x12, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18,
0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e,
0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70,
0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x69, 0x4f, 0x70, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12,
0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x12,
0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70,
0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67,
0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e,
0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x63,
0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f,
0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73,
0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
...@@ -1423,8 +1456,8 @@ var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4) ...@@ -1423,8 +1456,8 @@ var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{
(Change_State)(0), // 0: gosdn.pnd.Change.State (Change_State)(0), // 0: gosdn.pnd.Change.State
(SetResponseStatus)(0), // 1: gosdn.pnd.SetResponse.status (SetChange_Operation)(0), // 1: gosdn.pnd.setChange.Operation
(ChangeRequest_Operation)(0), // 2: gosdn.pnd.ChangeRequest.Operation (SetResponseStatus)(0), // 2: gosdn.pnd.SetResponse.status
(ChangeRequest_ApiOperation)(0), // 3: gosdn.pnd.ChangeRequest.ApiOperation (ChangeRequest_ApiOperation)(0), // 3: gosdn.pnd.ChangeRequest.ApiOperation
(*GetRequest)(nil), // 4: gosdn.pnd.GetRequest (*GetRequest)(nil), // 4: gosdn.pnd.GetRequest
(*GetPnd)(nil), // 5: gosdn.pnd.getPnd (*GetPnd)(nil), // 5: gosdn.pnd.getPnd
...@@ -1464,17 +1497,19 @@ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ ...@@ -1464,17 +1497,19 @@ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{
17, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange 17, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange
19, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest 19, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest
11, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.pnd.SouthboundInterface 11, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.pnd.SouthboundInterface
3, // 19: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ChangeRequest.ApiOperation 1, // 19: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation
2, // 20: gosdn.pnd.ChangeRequest.op:type_name -> gosdn.pnd.ChangeRequest.Operation 2, // 20: gosdn.pnd.SetResponse.Status:type_name -> gosdn.pnd.SetResponse.status
4, // 21: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest 18, // 21: gosdn.pnd.SetResponse.responses:type_name -> gosdn.pnd.SetResponse
14, // 22: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest 3, // 22: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ChangeRequest.ApiOperation
9, // 23: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse 4, // 23: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest
18, // 24: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse 14, // 24: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest
23, // [23:25] is the sub-list for method output_type 9, // 25: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse
21, // [21:23] is the sub-list for method input_type 18, // 26: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse
21, // [21:21] is the sub-list for extension type_name 25, // [25:27] is the sub-list for method output_type
21, // [21:21] is the sub-list for extension extendee 23, // [23:25] is the sub-list for method input_type
0, // [0:21] is the sub-list for field type_name 23, // [23:23] is the sub-list for extension type_name
23, // [23:23] is the sub-list for extension extendee
0, // [0:23] is the sub-list for field type_name
} }
func init() { file_gosdn_pnd_pnd_proto_init() } func init() { file_gosdn_pnd_pnd_proto_init() }
......
...@@ -22,6 +22,13 @@ message GetResponse { ...@@ -22,6 +22,13 @@ message GetResponse {
} }
message SetRequest { message SetRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated setPnd pnd = 2;
}
message setPnd {
string name = 1;
string description = 2;
string sbi = 3;
} }
message SetResponse { message SetResponse {
...@@ -30,4 +37,5 @@ message SetResponse { ...@@ -30,4 +37,5 @@ message SetResponse {
OK = 0; OK = 0;
ERROR = 1; ERROR = 1;
} }
} status Status = 2;
\ No newline at end of file }
...@@ -101,7 +101,13 @@ message setSbi { ...@@ -101,7 +101,13 @@ message setSbi {
} }
message setChange { message setChange {
enum Operation {
CREATE = 0;
COMMIT = 1;
CONFIRM = 2;
}
string cuid = 1;
Operation op = 2;
} }
message SetResponse{ message SetResponse{
...@@ -110,14 +116,11 @@ message SetResponse{ ...@@ -110,14 +116,11 @@ message SetResponse{
OK = 0; OK = 0;
ERROR = 1; ERROR = 1;
} }
status Status = 2;
repeated SetResponse responses = 3;
} }
message ChangeRequest { message ChangeRequest {
enum Operation {
CREATE = 0;
COMMIT = 1;
CONFIRM = 2;
}
enum ApiOperation { enum ApiOperation {
UPDATE = 0; UPDATE = 0;
REPLACE = 1; REPLACE = 1;
...@@ -127,5 +130,4 @@ message ChangeRequest { ...@@ -127,5 +130,4 @@ message ChangeRequest {
string path = 2; string path = 2;
string value = 3; string value = 3;
ApiOperation apiOp = 4; ApiOperation apiOp = 4;
Operation op = 5;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment