diff --git a/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go b/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go index 09e16b6053907bc724b86ea5219a2e7cb1e3bf0c..3eba4d2363d6c5103edbfcedba8205d6d1580c66 100755 --- a/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/collector/collector.proto @@ -27,6 +27,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -37,11 +38,10 @@ const ( ) type ReconnectRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Target []string `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` // List of targets to reconnect. unknownFields protoimpl.UnknownFields - - Target []string `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` // List of targets to reconnect. + sizeCache protoimpl.SizeCache } func (x *ReconnectRequest) Reset() { @@ -82,9 +82,9 @@ func (x *ReconnectRequest) GetTarget() []string { } type Nil struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Nil) Reset() { @@ -119,7 +119,7 @@ func (*Nil) Descriptor() ([]byte, []int) { var File_github_com_openconfig_gnmi_proto_collector_collector_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = string([]byte{ 0x0a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, 0x6c, @@ -135,16 +135,16 @@ var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = [] 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3b, 0x67, 0x6e, 0x6d, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc + file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData } @@ -173,7 +173,7 @@ func file_github_com_openconfig_gnmi_proto_collector_collector_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -184,7 +184,6 @@ func file_github_com_openconfig_gnmi_proto_collector_collector_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_collector_collector_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_collector_collector_proto = out.File - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_collector_collector_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_collector_collector_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go b/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go index d0162888f8ea5b4e40d0010e030796e96be8bb5a..0d1e241b07492d5c4fdf1ce37b7d91a4db6f3cbb 100755 --- a/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/gnmi/gnmi.proto @@ -39,6 +39,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -329,12 +330,9 @@ func (GetRequest_DataType) EnumDescriptor() ([]byte, []int) { // // Reference: gNMI Specification Section 2.1 type Notification struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Prefix *Path `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Prefix *Path `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. // An alias for the path specified in the prefix field. // Reference: gNMI Specification Section 2.4.2 Alias string `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"` @@ -342,7 +340,9 @@ type Notification struct { Delete []*Path `protobuf:"bytes,5,rep,name=delete,proto3" json:"delete,omitempty"` // Data elements that have been deleted. // This notification contains a set of paths that are always updated together // referenced by a globally unique prefix. - Atomic bool `protobuf:"varint,6,opt,name=atomic,proto3" json:"atomic,omitempty"` + Atomic bool `protobuf:"varint,6,opt,name=atomic,proto3" json:"atomic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Notification) Reset() { @@ -421,15 +421,14 @@ func (x *Notification) GetAtomic() bool { // Value pair. // Reference: gNMI Specification Section 2.1 type Update struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path (key) for the update. + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path (key) for the update. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value (value) for the update. - Val *TypedValue `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` // The explicitly typed update value. - Duplicates uint32 `protobuf:"varint,4,opt,name=duplicates,proto3" json:"duplicates,omitempty"` // Number of coalesced duplicates. + Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value (value) for the update. + Val *TypedValue `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` // The explicitly typed update value. + Duplicates uint32 `protobuf:"varint,4,opt,name=duplicates,proto3" json:"duplicates,omitempty"` // Number of coalesced duplicates. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Update) Reset() { @@ -494,17 +493,14 @@ func (x *Update) GetDuplicates() uint32 { // TypedValue is used to encode a value being sent between the client and // target (originated by either entity). type TypedValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // One of the fields within the val oneof is populated with the value // of the update. The type of the value being included in the Update // determines which field should be populated. In the case that the // encoding is a particular form of the base protobuf type, a specific // field is used to store the value (e.g., json_val). // - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *TypedValue_StringVal // *TypedValue_IntVal @@ -519,7 +515,9 @@ type TypedValue struct { // *TypedValue_JsonIetfVal // *TypedValue_AsciiVal // *TypedValue_ProtoBytes - Value isTypedValue_Value `protobuf_oneof:"value"` + Value isTypedValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TypedValue) Reset() { @@ -552,100 +550,126 @@ func (*TypedValue) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{2} } -func (m *TypedValue) GetValue() isTypedValue_Value { - if m != nil { - return m.Value +func (x *TypedValue) GetValue() isTypedValue_Value { + if x != nil { + return x.Value } return nil } func (x *TypedValue) GetStringVal() string { - if x, ok := x.GetValue().(*TypedValue_StringVal); ok { - return x.StringVal + if x != nil { + if x, ok := x.Value.(*TypedValue_StringVal); ok { + return x.StringVal + } } return "" } func (x *TypedValue) GetIntVal() int64 { - if x, ok := x.GetValue().(*TypedValue_IntVal); ok { - return x.IntVal + if x != nil { + if x, ok := x.Value.(*TypedValue_IntVal); ok { + return x.IntVal + } } return 0 } func (x *TypedValue) GetUintVal() uint64 { - if x, ok := x.GetValue().(*TypedValue_UintVal); ok { - return x.UintVal + if x != nil { + if x, ok := x.Value.(*TypedValue_UintVal); ok { + return x.UintVal + } } return 0 } func (x *TypedValue) GetBoolVal() bool { - if x, ok := x.GetValue().(*TypedValue_BoolVal); ok { - return x.BoolVal + if x != nil { + if x, ok := x.Value.(*TypedValue_BoolVal); ok { + return x.BoolVal + } } return false } func (x *TypedValue) GetBytesVal() []byte { - if x, ok := x.GetValue().(*TypedValue_BytesVal); ok { - return x.BytesVal + if x != nil { + if x, ok := x.Value.(*TypedValue_BytesVal); ok { + return x.BytesVal + } } return nil } func (x *TypedValue) GetFloatVal() float32 { - if x, ok := x.GetValue().(*TypedValue_FloatVal); ok { - return x.FloatVal + if x != nil { + if x, ok := x.Value.(*TypedValue_FloatVal); ok { + return x.FloatVal + } } return 0 } func (x *TypedValue) GetDecimalVal() *Decimal64 { - if x, ok := x.GetValue().(*TypedValue_DecimalVal); ok { - return x.DecimalVal + if x != nil { + if x, ok := x.Value.(*TypedValue_DecimalVal); ok { + return x.DecimalVal + } } return nil } func (x *TypedValue) GetLeaflistVal() *ScalarArray { - if x, ok := x.GetValue().(*TypedValue_LeaflistVal); ok { - return x.LeaflistVal + if x != nil { + if x, ok := x.Value.(*TypedValue_LeaflistVal); ok { + return x.LeaflistVal + } } return nil } func (x *TypedValue) GetAnyVal() *anypb.Any { - if x, ok := x.GetValue().(*TypedValue_AnyVal); ok { - return x.AnyVal + if x != nil { + if x, ok := x.Value.(*TypedValue_AnyVal); ok { + return x.AnyVal + } } return nil } func (x *TypedValue) GetJsonVal() []byte { - if x, ok := x.GetValue().(*TypedValue_JsonVal); ok { - return x.JsonVal + if x != nil { + if x, ok := x.Value.(*TypedValue_JsonVal); ok { + return x.JsonVal + } } return nil } func (x *TypedValue) GetJsonIetfVal() []byte { - if x, ok := x.GetValue().(*TypedValue_JsonIetfVal); ok { - return x.JsonIetfVal + if x != nil { + if x, ok := x.Value.(*TypedValue_JsonIetfVal); ok { + return x.JsonIetfVal + } } return nil } func (x *TypedValue) GetAsciiVal() string { - if x, ok := x.GetValue().(*TypedValue_AsciiVal); ok { - return x.AsciiVal + if x != nil { + if x, ok := x.Value.(*TypedValue_AsciiVal); ok { + return x.AsciiVal + } } return "" } func (x *TypedValue) GetProtoBytes() []byte { - if x, ok := x.GetValue().(*TypedValue_ProtoBytes); ok { - return x.ProtoBytes + if x != nil { + if x, ok := x.Value.(*TypedValue_ProtoBytes); ok { + return x.ProtoBytes + } } return nil } @@ -741,18 +765,17 @@ func (*TypedValue_ProtoBytes) isTypedValue_Value() {} // associated attributes. // Reference: gNMI Specification Section 2.2.2. type Path struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Elements of the path are no longer encoded as a string, but rather within // the elem field as a PathElem message. // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Element []string `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` // Label to disambiguate path. - Elem []*PathElem `protobuf:"bytes,3,rep,name=elem,proto3" json:"elem,omitempty"` // Elements of the path. - Target string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"` // The name of the target + Element []string `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` // Label to disambiguate path. + Elem []*PathElem `protobuf:"bytes,3,rep,name=elem,proto3" json:"elem,omitempty"` // Elements of the path. + Target string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"` // The name of the target + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Path) Reset() { @@ -818,12 +841,11 @@ func (x *Path) GetTarget() string { // that may be associated with it. // Reference: gNMI Specification Section 2.2.2. type PathElem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the element in the path. + Key map[string]string `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Map of key (attribute) name to value. unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the element in the path. - Key map[string]string `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Map of key (attribute) name to value. + sizeCache protoimpl.SizeCache } func (x *PathElem) Reset() { @@ -876,12 +898,11 @@ func (x *PathElem) GetKey() map[string]string { // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Value of the variable being transmitted. + Type Encoding `protobuf:"varint,2,opt,name=type,proto3,enum=gnmi.Encoding" json:"type,omitempty"` // Encoding used for the value field. unknownFields protoimpl.UnknownFields - - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Value of the variable being transmitted. - Type Encoding `protobuf:"varint,2,opt,name=type,proto3,enum=gnmi.Encoding" json:"type,omitempty"` // Encoding used for the value field. + sizeCache protoimpl.SizeCache } func (x *Value) Reset() { @@ -935,13 +956,12 @@ func (x *Value) GetType() Encoding { // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. type Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Canonical gRPC error code. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Human readable error. + Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // Optional additional information. unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Canonical gRPC error code. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Human readable error. - Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // Optional additional information. + sizeCache protoimpl.SizeCache } func (x *Error) Reset() { @@ -999,12 +1019,11 @@ func (x *Error) GetData() *anypb.Any { // is expressed as a set of digits with the precision specifying the // number of digits following the decimal point in the digit set. type Decimal64 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Digits int64 `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"` // Set of digits. + Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` // Number of digits following the decimal point. unknownFields protoimpl.UnknownFields - - Digits int64 `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"` // Set of digits. - Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` // Number of digits following the decimal point. + sizeCache protoimpl.SizeCache } func (x *Decimal64) Reset() { @@ -1053,14 +1072,13 @@ func (x *Decimal64) GetPrecision() uint32 { // ScalarArray is used to encode a mixed-type array of values. type ScalarArray struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of elements within the array. Each TypedValue message should // specify only elements that have a field identifier of 1-7 (i.e., the // values are scalar values). - Element []*TypedValue `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + Element []*TypedValue `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ScalarArray) Reset() { @@ -1107,11 +1125,8 @@ func (x *ScalarArray) GetElement() []*TypedValue { // used to define aliases or trigger polled data to be sent by the target. // Reference: gNMI Specification Section 3.5.1.1 type SubscribeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: // // *SubscribeRequest_Subscribe // *SubscribeRequest_Poll @@ -1119,7 +1134,9 @@ type SubscribeRequest struct { Request isSubscribeRequest_Request `protobuf_oneof:"request"` // Extension messages associated with the SubscribeRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeRequest) Reset() { @@ -1152,30 +1169,36 @@ func (*SubscribeRequest) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{9} } -func (m *SubscribeRequest) GetRequest() isSubscribeRequest_Request { - if m != nil { - return m.Request +func (x *SubscribeRequest) GetRequest() isSubscribeRequest_Request { + if x != nil { + return x.Request } return nil } func (x *SubscribeRequest) GetSubscribe() *SubscriptionList { - if x, ok := x.GetRequest().(*SubscribeRequest_Subscribe); ok { - return x.Subscribe + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Subscribe); ok { + return x.Subscribe + } } return nil } func (x *SubscribeRequest) GetPoll() *Poll { - if x, ok := x.GetRequest().(*SubscribeRequest_Poll); ok { - return x.Poll + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Poll); ok { + return x.Poll + } } return nil } func (x *SubscribeRequest) GetAliases() *AliasList { - if x, ok := x.GetRequest().(*SubscribeRequest_Aliases); ok { - return x.Aliases + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Aliases); ok { + return x.Aliases + } } return nil } @@ -1214,9 +1237,9 @@ func (*SubscribeRequest_Aliases) isSubscribeRequest_Request() {} // subscription. // Reference: gNMI Specification Section Section 3.5.1.4 type Poll struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Poll) Reset() { @@ -1256,11 +1279,8 @@ func (*Poll) Descriptor() ([]byte, []int) { // synchronized). // Reference: gNMI Specification Section 3.5.1.4 type SubscribeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: // // *SubscribeResponse_Update // *SubscribeResponse_SyncResponse @@ -1268,7 +1288,9 @@ type SubscribeResponse struct { Response isSubscribeResponse_Response `protobuf_oneof:"response"` // Extension messages associated with the SubscribeResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeResponse) Reset() { @@ -1301,31 +1323,37 @@ func (*SubscribeResponse) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{11} } -func (m *SubscribeResponse) GetResponse() isSubscribeResponse_Response { - if m != nil { - return m.Response +func (x *SubscribeResponse) GetResponse() isSubscribeResponse_Response { + if x != nil { + return x.Response } return nil } func (x *SubscribeResponse) GetUpdate() *Notification { - if x, ok := x.GetResponse().(*SubscribeResponse_Update); ok { - return x.Update + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_Update); ok { + return x.Update + } } return nil } func (x *SubscribeResponse) GetSyncResponse() bool { - if x, ok := x.GetResponse().(*SubscribeResponse_SyncResponse); ok { - return x.SyncResponse + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_SyncResponse); ok { + return x.SyncResponse + } } return false } // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. func (x *SubscribeResponse) GetError() *Error { - if x, ok := x.GetResponse().(*SubscribeResponse_Error); ok { - return x.Error + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_Error); ok { + return x.Error + } } return nil } @@ -1370,12 +1398,9 @@ func (*SubscribeResponse_Error) isSubscribeResponse_Response() {} // subscription. // Reference: gNMI Specification Section 3.5.1.2 type SubscriptionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. - Subscription []*Subscription `protobuf:"bytes,2,rep,name=subscription,proto3" json:"subscription,omitempty"` // Set of subscriptions to create. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + Subscription []*Subscription `protobuf:"bytes,2,rep,name=subscription,proto3" json:"subscription,omitempty"` // Set of subscriptions to create. // Whether target defined aliases are allowed within the subscription. UseAliases bool `protobuf:"varint,3,opt,name=use_aliases,json=useAliases,proto3" json:"use_aliases,omitempty"` Qos *QOSMarking `protobuf:"bytes,4,opt,name=qos,proto3" json:"qos,omitempty"` // DSCP marking to be used. @@ -1394,7 +1419,9 @@ type SubscriptionList struct { // rather only the sync message followed by any subsequent updates to the // current state. For ONCE and POLL modes, this causes the server to send only // the sync message (Sec. 3.5.2.3). - UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` + UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscriptionList) Reset() { @@ -1496,13 +1523,10 @@ func (x *SubscriptionList) GetUpdatesOnly() bool { // should trigger updates to be sent. // Reference: gNMI Specification Section 3.5.1.3 type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The data tree path. - Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gnmi.SubscriptionMode" json:"mode,omitempty"` // Subscription mode to be used. - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // ns between samples in SAMPLE mode. + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The data tree path. + Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gnmi.SubscriptionMode" json:"mode,omitempty"` // Subscription mode to be used. + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // ns between samples in SAMPLE mode. // Indicates whether values that have not changed should be sent in a SAMPLE // subscription. SuppressRedundant bool `protobuf:"varint,4,opt,name=suppress_redundant,json=suppressRedundant,proto3" json:"suppress_redundant,omitempty"` @@ -1510,6 +1534,8 @@ type Subscription struct { // suppress_redundant is in use. The target should send a value at least once // in the period specified. HeartbeatInterval uint64 `protobuf:"varint,5,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -1581,11 +1607,10 @@ func (x *Subscription) GetHeartbeatInterval() uint64 { // updates from the target. // Reference: gNMI Specification Section 3.5.1.2 type QOSMarking struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Marking uint32 `protobuf:"varint,1,opt,name=marking,proto3" json:"marking,omitempty"` unknownFields protoimpl.UnknownFields - - Marking uint32 `protobuf:"varint,1,opt,name=marking,proto3" json:"marking,omitempty"` + sizeCache protoimpl.SizeCache } func (x *QOSMarking) Reset() { @@ -1631,12 +1656,11 @@ func (x *QOSMarking) GetMarking() uint32 { // data tree element paths. // Reference: gNMI Specification Section 2.4.2 type Alias struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path to be aliased. + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // The alias value, a string prefixed by "#". unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path to be aliased. - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // The alias value, a string prefixed by "#". + sizeCache protoimpl.SizeCache } func (x *Alias) Reset() { @@ -1687,11 +1711,10 @@ func (x *Alias) GetAlias() string { // a client to create a set of aliases that the target is to utilize. // Reference: gNMI Specification Section 3.5.1.6 type AliasList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Alias []*Alias `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"` // The set of aliases to be created. unknownFields protoimpl.UnknownFields - - Alias []*Alias `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"` // The set of aliases to be created. + sizeCache protoimpl.SizeCache } func (x *AliasList) Reset() { @@ -1739,17 +1762,16 @@ func (x *AliasList) GetAlias() []*Alias { // a single SetRequest are considered to be a transaction. // Reference: gNMI Specification Section 3.4.1 type SetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. - Delete []*Path `protobuf:"bytes,2,rep,name=delete,proto3" json:"delete,omitempty"` // Paths to be deleted from the data tree. - Replace []*Update `protobuf:"bytes,3,rep,name=replace,proto3" json:"replace,omitempty"` // Updates specifying elements to be replaced. - Update []*Update `protobuf:"bytes,4,rep,name=update,proto3" json:"update,omitempty"` // Updates specifying elements to updated. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. + Delete []*Path `protobuf:"bytes,2,rep,name=delete,proto3" json:"delete,omitempty"` // Paths to be deleted from the data tree. + Replace []*Update `protobuf:"bytes,3,rep,name=replace,proto3" json:"replace,omitempty"` // Updates specifying elements to be replaced. + Update []*Update `protobuf:"bytes,4,rep,name=update,proto3" json:"update,omitempty"` // Updates specifying elements to updated. // Extension messages associated with the SetRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetRequest) Reset() { @@ -1825,11 +1847,8 @@ func (x *SetRequest) GetExtension() []*gnmi_ext.Extension { // details where required. // Reference: gNMI Specification Section 3.4.2 type SetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. // A set of responses specifying the result of the operations specified in // the SetRequest. Response []*UpdateResult `protobuf:"bytes,2,rep,name=response,proto3" json:"response,omitempty"` @@ -1838,7 +1857,9 @@ type SetResponse struct { Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp of transaction (ns since epoch). // Extension messages associated with the SetResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetResponse) Reset() { @@ -1911,10 +1932,7 @@ func (x *SetResponse) GetExtension() []*gnmi_ext.Extension { // result of an operation specified within a SetRequest message. // Reference: gNMI Specification Section 3.4.2 type UpdateResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated timestamp for the UpdateResult, this field has been // replaced by the timestamp within the SetResponse message, since // all mutations effected by a set should be applied as a single @@ -1924,8 +1942,10 @@ type UpdateResult struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Path *Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // Path associated with the update. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Message *Error `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Status of the update operation. - Op UpdateResult_Operation `protobuf:"varint,4,opt,name=op,proto3,enum=gnmi.UpdateResult_Operation" json:"op,omitempty"` // Update operation type. + Message *Error `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Status of the update operation. + Op UpdateResult_Operation `protobuf:"varint,4,opt,name=op,proto3,enum=gnmi.UpdateResult_Operation" json:"op,omitempty"` // Update operation type. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateResult) Reset() { @@ -1995,18 +2015,17 @@ func (x *UpdateResult) GetOp() UpdateResult_Operation { // must use all schema models that it has. // Reference: gNMI Specification Section 3.3.1 type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. - Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` // Paths requested by the client. - Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` // The type of data being requested. - Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` // Encoding to be used. - UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` // The schema models to be used. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` // Paths requested by the client. + Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` // The type of data being requested. + Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` // Encoding to be used. + UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` // The schema models to be used. // Extension messages associated with the GetRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -2086,16 +2105,15 @@ func (x *GetRequest) GetExtension() []*gnmi_ext.Extension { // by the client in the GetRequest. // Reference: gNMI Specification Section 3.3.2 type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Notification []*Notification `protobuf:"bytes,1,rep,name=notification,proto3" json:"notification,omitempty"` // Data values. + state protoimpl.MessageState `protogen:"open.v1"` + Notification []*Notification `protobuf:"bytes,1,rep,name=notification,proto3" json:"notification,omitempty"` // Data values. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // Errors that occurred in the Get. // Extension messages associated with the GetResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,3,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,3,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -2154,13 +2172,12 @@ func (x *GetResponse) GetExtension() []*gnmi_ext.Extension { // that the target reports its capabilities. // Reference: gNMI Specification Section 3.2.1 type CapabilityRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Extension messages associated with the CapabilityRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,1,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,1,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CapabilityRequest) Reset() { @@ -2204,16 +2221,15 @@ func (x *CapabilityRequest) GetExtension() []*gnmi_ext.Extension { // client within the Capabilities RPC. // Reference: gNMI Specification Section 3.2.2 type CapabilityResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SupportedModels []*ModelData `protobuf:"bytes,1,rep,name=supported_models,json=supportedModels,proto3" json:"supported_models,omitempty"` // Supported schema models. - SupportedEncodings []Encoding `protobuf:"varint,2,rep,packed,name=supported_encodings,json=supportedEncodings,proto3,enum=gnmi.Encoding" json:"supported_encodings,omitempty"` // Supported encodings. - GNMIVersion string `protobuf:"bytes,3,opt,name=gNMI_version,json=gNMIVersion,proto3" json:"gNMI_version,omitempty"` // Supported gNMI version. + state protoimpl.MessageState `protogen:"open.v1"` + SupportedModels []*ModelData `protobuf:"bytes,1,rep,name=supported_models,json=supportedModels,proto3" json:"supported_models,omitempty"` // Supported schema models. + SupportedEncodings []Encoding `protobuf:"varint,2,rep,packed,name=supported_encodings,json=supportedEncodings,proto3,enum=gnmi.Encoding" json:"supported_encodings,omitempty"` // Supported encodings. + GNMIVersion string `protobuf:"bytes,3,opt,name=gNMI_version,json=gNMIVersion,proto3" json:"gNMI_version,omitempty"` // Supported gNMI version. // Extension messages associated with the CapabilityResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,4,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,4,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CapabilityResponse) Reset() { @@ -2280,13 +2296,12 @@ func (x *CapabilityResponse) GetExtension() []*gnmi_ext.Extension { // the set of models from which data tree elements should be reported. // Reference: gNMI Specification Section 3.2.3 type ModelData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the model. + Organization string `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` // Organization publishing the model. + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Semantic version of the model. unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the model. - Organization string `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` // Organization publishing the model. - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Semantic version of the model. + sizeCache protoimpl.SizeCache } func (x *ModelData) Reset() { @@ -2361,7 +2376,7 @@ var ( var File_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = string([]byte{ 0x0a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, 0x72, 0x6f, @@ -2671,16 +2686,16 @@ var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = []byte{ 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc + file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData } @@ -2830,7 +2845,7 @@ func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc)), NumEnums: 5, NumMessages: 26, NumExtensions: 1, @@ -2843,7 +2858,6 @@ func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_init() { ExtensionInfos: file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_extTypes, }.Build() File_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto = out.File - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go b/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go index aaaa55d00a30af1ce6c4a75447a9b6d7de6a5122..5536b80f43ec09a50dd8e97150bfff1c5b936b6f 100755 --- a/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto @@ -32,6 +32,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -93,16 +94,15 @@ func (ExtensionID) EnumDescriptor() ([]byte, []int) { // The Extension message contains a single gNMI extension. type Extension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Ext: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Ext: // // *Extension_RegisteredExt // *Extension_MasterArbitration // *Extension_History - Ext isExtension_Ext `protobuf_oneof:"ext"` + Ext isExtension_Ext `protobuf_oneof:"ext"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Extension) Reset() { @@ -135,30 +135,36 @@ func (*Extension) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{0} } -func (m *Extension) GetExt() isExtension_Ext { - if m != nil { - return m.Ext +func (x *Extension) GetExt() isExtension_Ext { + if x != nil { + return x.Ext } return nil } func (x *Extension) GetRegisteredExt() *RegisteredExtension { - if x, ok := x.GetExt().(*Extension_RegisteredExt); ok { - return x.RegisteredExt + if x != nil { + if x, ok := x.Ext.(*Extension_RegisteredExt); ok { + return x.RegisteredExt + } } return nil } func (x *Extension) GetMasterArbitration() *MasterArbitration { - if x, ok := x.GetExt().(*Extension_MasterArbitration); ok { - return x.MasterArbitration + if x != nil { + if x, ok := x.Ext.(*Extension_MasterArbitration); ok { + return x.MasterArbitration + } } return nil } func (x *Extension) GetHistory() *History { - if x, ok := x.GetExt().(*Extension_History); ok { - return x.History + if x != nil { + if x, ok := x.Ext.(*Extension_History); ok { + return x.History + } } return nil } @@ -189,12 +195,11 @@ func (*Extension_History) isExtension_Ext() {} // The RegisteredExtension message defines an extension which is defined outside // of this file. type RegisteredExtension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id ExtensionID `protobuf:"varint,1,opt,name=id,proto3,enum=gnmi_ext.ExtensionID" json:"id,omitempty"` // The unique ID assigned to this extension. + Msg []byte `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // The binary-marshalled protobuf extension payload. unknownFields protoimpl.UnknownFields - - Id ExtensionID `protobuf:"varint,1,opt,name=id,proto3,enum=gnmi_ext.ExtensionID" json:"id,omitempty"` // The unique ID assigned to this extension. - Msg []byte `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // The binary-marshalled protobuf extension payload. + sizeCache protoimpl.SizeCache } func (x *RegisteredExtension) Reset() { @@ -247,12 +252,11 @@ func (x *RegisteredExtension) GetMsg() []byte { // The document about gNMI master arbitration can be found at // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md type MasterArbitration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + ElectionId *Uint128 `protobuf:"bytes,2,opt,name=election_id,json=electionId,proto3" json:"election_id,omitempty"` unknownFields protoimpl.UnknownFields - - Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - ElectionId *Uint128 `protobuf:"bytes,2,opt,name=election_id,json=electionId,proto3" json:"election_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MasterArbitration) Reset() { @@ -301,12 +305,11 @@ func (x *MasterArbitration) GetElectionId() *Uint128 { // Representation of unsigned 128-bit integer. type Uint128 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` + Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` unknownFields protoimpl.UnknownFields - - High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` - Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Uint128) Reset() { @@ -355,11 +358,10 @@ func (x *Uint128) GetLow() uint64 { // There can be one master for each role. The role is identified by its id. type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Role) Reset() { @@ -403,15 +405,14 @@ func (x *Role) GetId() string { // spec can be found at // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md type History struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: // // *History_SnapshotTime // *History_Range - Request isHistory_Request `protobuf_oneof:"request"` + Request isHistory_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *History) Reset() { @@ -444,23 +445,27 @@ func (*History) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{5} } -func (m *History) GetRequest() isHistory_Request { - if m != nil { - return m.Request +func (x *History) GetRequest() isHistory_Request { + if x != nil { + return x.Request } return nil } func (x *History) GetSnapshotTime() int64 { - if x, ok := x.GetRequest().(*History_SnapshotTime); ok { - return x.SnapshotTime + if x != nil { + if x, ok := x.Request.(*History_SnapshotTime); ok { + return x.SnapshotTime + } } return 0 } func (x *History) GetRange() *TimeRange { - if x, ok := x.GetRequest().(*History_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Request.(*History_Range); ok { + return x.Range + } } return nil } @@ -482,12 +487,11 @@ func (*History_SnapshotTime) isHistory_Request() {} func (*History_Range) isHistory_Request() {} type TimeRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // Nanoseconds since the epoch + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // Nanoseconds since the epoch unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // Nanoseconds since the epoch - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // Nanoseconds since the epoch + sizeCache protoimpl.SizeCache } func (x *TimeRange) Reset() { @@ -536,7 +540,7 @@ func (x *TimeRange) GetEnd() int64 { var File_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = string([]byte{ 0x0a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2f, 0x67, 0x6e, 0x6d, 0x69, @@ -588,16 +592,16 @@ var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []by 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc + file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData } @@ -647,7 +651,7 @@ func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc)), NumEnums: 1, NumMessages: 7, NumExtensions: 0, @@ -659,7 +663,6 @@ func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto = out.File - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go b/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go index 168a726d8cd58bebc94304cab9af31183b30b4d7..607f004a958349760e6319f97fc759bb5d8a6b81 100755 --- a/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/target/target.proto @@ -31,6 +31,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -43,21 +44,18 @@ const ( // Configuration holds all information necessary for a caching gNMI collector // to establish subscriptions to a list of gNMI targets. type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Request is a keyed list of all SubscriptionRequests that can be sent to // to targets in the Configuration. // The request must have at minimum a SubscriptionList with a prefix // containing origin and one or more Subscriptions. Only the STREAM mode is // supported. - Request map[string]*gnmi.SubscribeRequest `protobuf:"bytes,1,rep,name=request,proto3" json:"request,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Request map[string]*gnmi.SubscribeRequest `protobuf:"bytes,1,rep,name=request,proto3" json:"request,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Target is the full list of targets connected to by a caching gNMI // collector. The key of the map is a unique name to identify a target and // is set in the prefix.target of a SubscriptionRequest message when connecting // to each respective target. - Target map[string]*Target `protobuf:"bytes,2,rep,name=target,proto3" json:"target,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Target map[string]*Target `protobuf:"bytes,2,rep,name=target,proto3" json:"target,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Identifier for the caching collector. InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // Revision for this Configuration. Systems that non-atomically write @@ -65,7 +63,9 @@ type Configuration struct { // protobuf serialization of fields in order. Presence of this field makes no // guarantee. Consumers should account for atomicity constraints of their // environment and any custom encoding. - Revision int64 `protobuf:"varint,536870911,opt,name=revision,proto3" json:"revision,omitempty"` + Revision int64 `protobuf:"varint,536870911,opt,name=revision,proto3" json:"revision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -129,10 +129,7 @@ func (x *Configuration) GetRevision() int64 { // Target is the information necessary to establish a single gNMI Subscribe RPC // to be collected and cached. type Target struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of address and port or name that resolves to an address and port. Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` // Credentials to use in metadata for authorization of the RPC @@ -141,7 +138,9 @@ type Target struct { // the request map of the Configuration message. Request string `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` // Additional target metadata. - Meta map[string]string `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Meta map[string]string `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Target) Reset() { @@ -205,14 +204,13 @@ func (x *Target) GetMeta() map[string]string { // Credentials contains the fields necessary for authentication of the client to // the target. type Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // Password lookup ID. - PasswordId string `protobuf:"bytes,3,opt,name=password_id,json=passwordId,proto3" json:"password_id,omitempty"` + PasswordId string `protobuf:"bytes,3,opt,name=password_id,json=passwordId,proto3" json:"password_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Credentials) Reset() { @@ -268,7 +266,7 @@ func (x *Credentials) GetPasswordId() string { var File_github_com_openconfig_gnmi_proto_target_target_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = string([]byte{ 0x0a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, @@ -323,16 +321,16 @@ var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc + file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData } @@ -370,7 +368,7 @@ func file_github_com_openconfig_gnmi_proto_target_target_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, @@ -381,7 +379,6 @@ func file_github_com_openconfig_gnmi_proto_target_target_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_target_target_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_target_target_proto = out.File - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_target_target_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_target_target_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go b/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go index 1beb87208c350ef0fca3df478125ce69273784ca..18fcb63861fb8a5ff0a7499cb6248b1fc11d8396 100755 --- a/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go +++ b/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/testing/fake/proto/fake.proto @@ -17,6 +17,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -130,12 +131,11 @@ func (Config_ClientType) EnumDescriptor() ([]byte, []int) { // Configuration is used to store all agent configuration for the fake agent // server. Each config describes a single agent hosted on the server. type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Repeated list of targets to emulate. - Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` + Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -176,12 +176,11 @@ func (x *Configuration) GetConfig() []*Config { } type Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Credentials) Reset() { @@ -231,10 +230,7 @@ func (x *Credentials) GetPassword() string { // Config is a collection of values that together represent the update streams // for one or more fake devices. type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The target for which the fake will publish values for. Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` // Port for the agent to listen on. If 0 or unset the agent will pick a port @@ -269,7 +265,7 @@ type Config struct { EnableDelay bool `protobuf:"varint,10,opt,name=enable_delay,json=enableDelay,proto3" json:"enable_delay,omitempty"` // Generator for value series for the target. // - // Types that are assignable to Generator: + // Types that are valid to be assigned to Generator: // // *Config_Custom // *Config_Random @@ -278,7 +274,9 @@ type Config struct { // tunnel_addr is the address of the tunnel server. TunnelAddr string `protobuf:"bytes,11,opt,name=tunnel_addr,json=tunnelAddr,proto3" json:"tunnel_addr,omitempty"` // tunnel_crt is the certificate file for the tunnel conection. - TunnelCrt string `protobuf:"bytes,12,opt,name=tunnel_crt,json=tunnelCrt,proto3" json:"tunnel_crt,omitempty"` + TunnelCrt string `protobuf:"bytes,12,opt,name=tunnel_crt,json=tunnelCrt,proto3" json:"tunnel_crt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Config) Reset() { @@ -383,30 +381,36 @@ func (x *Config) GetEnableDelay() bool { return false } -func (m *Config) GetGenerator() isConfig_Generator { - if m != nil { - return m.Generator +func (x *Config) GetGenerator() isConfig_Generator { + if x != nil { + return x.Generator } return nil } func (x *Config) GetCustom() *anypb.Any { - if x, ok := x.GetGenerator().(*Config_Custom); ok { - return x.Custom + if x != nil { + if x, ok := x.Generator.(*Config_Custom); ok { + return x.Custom + } } return nil } func (x *Config) GetRandom() *RandomGenerator { - if x, ok := x.GetGenerator().(*Config_Random); ok { - return x.Random + if x != nil { + if x, ok := x.Generator.(*Config_Random); ok { + return x.Random + } } return nil } func (x *Config) GetFixed() *FixedGenerator { - if x, ok := x.GetGenerator().(*Config_Fixed); ok { - return x.Fixed + if x != nil { + if x, ok := x.Generator.(*Config_Fixed); ok { + return x.Fixed + } } return nil } @@ -448,11 +452,10 @@ func (*Config_Random) isConfig_Generator() {} func (*Config_Fixed) isConfig_Generator() {} type FixedGenerator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Responses []*gnmi.SubscribeResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Responses []*gnmi.SubscribeResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FixedGenerator) Reset() { @@ -493,12 +496,11 @@ func (x *FixedGenerator) GetResponses() []*gnmi.SubscribeResponse { } type RandomGenerator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Seed int64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` + Values []*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Seed int64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` - Values []*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RandomGenerator) Reset() { @@ -547,9 +549,9 @@ func (x *RandomGenerator) GetValues() []*Value { // Delete will cause the value to be deleted at the Value's path. type DeleteValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteValue) Reset() { @@ -586,10 +588,7 @@ func (*DeleteValue) Descriptor() ([]byte, []int) { // path. A file containing a list of values can be used to simulate a network // device for integration tests. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The device specific, or OpenConfig path corresponding to a value. Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"` // The initial timestamp and configuration on how the timestamp will change @@ -605,7 +604,7 @@ type Value struct { // The initial value of the chosen type including configuration on how the // value will mutate for subsequent updates. // - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *Value_IntValue // *Value_DoubleValue @@ -615,7 +614,9 @@ type Value struct { // *Value_BoolValue // *Value_UintValue // *Value_StringListValue - Value isValue_Value `protobuf_oneof:"value"` + Value isValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Value) Reset() { @@ -676,65 +677,81 @@ func (x *Value) GetSeed() int64 { return 0 } -func (m *Value) GetValue() isValue_Value { - if m != nil { - return m.Value +func (x *Value) GetValue() isValue_Value { + if x != nil { + return x.Value } return nil } func (x *Value) GetIntValue() *IntValue { - if x, ok := x.GetValue().(*Value_IntValue); ok { - return x.IntValue + if x != nil { + if x, ok := x.Value.(*Value_IntValue); ok { + return x.IntValue + } } return nil } func (x *Value) GetDoubleValue() *DoubleValue { - if x, ok := x.GetValue().(*Value_DoubleValue); ok { - return x.DoubleValue + if x != nil { + if x, ok := x.Value.(*Value_DoubleValue); ok { + return x.DoubleValue + } } return nil } func (x *Value) GetStringValue() *StringValue { - if x, ok := x.GetValue().(*Value_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Value.(*Value_StringValue); ok { + return x.StringValue + } } return nil } func (x *Value) GetSync() uint64 { - if x, ok := x.GetValue().(*Value_Sync); ok { - return x.Sync + if x != nil { + if x, ok := x.Value.(*Value_Sync); ok { + return x.Sync + } } return 0 } func (x *Value) GetDelete() *DeleteValue { - if x, ok := x.GetValue().(*Value_Delete); ok { - return x.Delete + if x != nil { + if x, ok := x.Value.(*Value_Delete); ok { + return x.Delete + } } return nil } func (x *Value) GetBoolValue() *BoolValue { - if x, ok := x.GetValue().(*Value_BoolValue); ok { - return x.BoolValue + if x != nil { + if x, ok := x.Value.(*Value_BoolValue); ok { + return x.BoolValue + } } return nil } func (x *Value) GetUintValue() *UintValue { - if x, ok := x.GetValue().(*Value_UintValue); ok { - return x.UintValue + if x != nil { + if x, ok := x.Value.(*Value_UintValue); ok { + return x.UintValue + } } return nil } func (x *Value) GetStringListValue() *StringListValue { - if x, ok := x.GetValue().(*Value_StringListValue); ok { - return x.StringListValue + if x != nil { + if x, ok := x.Value.(*Value_StringListValue); ok { + return x.StringListValue + } } return nil } @@ -792,10 +809,7 @@ func (*Value_UintValue) isValue_Value() {} func (*Value_StringListValue) isValue_Value() {} type Timestamp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Initial timestamp for the corresponding value, nanoseconds since epoch. // This value need have no relation to absolute real-time as the stream of // of updates is generated without regard to the real clock and can be run @@ -804,8 +818,10 @@ type Timestamp struct { // These values will vary the change in the timestamp for subsequent outputs // by a value between delta_min and delta_max. Set to the same value to force // a set periodic interval. - DeltaMin int64 `protobuf:"varint,2,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,3,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,2,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,3,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Timestamp) Reset() { @@ -860,10 +876,7 @@ func (x *Timestamp) GetDeltaMax() int64 { } type IntValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is IntRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is IntList, value is only used to hold the value as it @@ -871,11 +884,13 @@ type IntValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *IntValue_Range // *IntValue_List - Distribution isIntValue_Distribution `protobuf_oneof:"distribution"` + Distribution isIntValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntValue) Reset() { @@ -915,23 +930,27 @@ func (x *IntValue) GetValue() int64 { return 0 } -func (m *IntValue) GetDistribution() isIntValue_Distribution { - if m != nil { - return m.Distribution +func (x *IntValue) GetDistribution() isIntValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *IntValue) GetRange() *IntRange { - if x, ok := x.GetDistribution().(*IntValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*IntValue_Range); ok { + return x.Range + } } return nil } func (x *IntValue) GetList() *IntList { - if x, ok := x.GetDistribution().(*IntValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*IntValue_List); ok { + return x.List + } } return nil } @@ -953,10 +972,7 @@ func (*IntValue_Range) isIntValue_Distribution() {} func (*IntValue_List) isIntValue_Distribution() {} type IntRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum int64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum int64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -965,8 +981,10 @@ type IntRange struct { // minimum and maximum are still respected and values will saturate at the // boundaries if they are exceeded. If not set subsequent value is a value // randomly chosen between minimum and maximum. - DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntRange) Reset() { @@ -1028,15 +1046,14 @@ func (x *IntRange) GetDeltaMax() int64 { } type IntList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []int64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntList) Reset() { @@ -1084,10 +1101,7 @@ func (x *IntList) GetRandom() bool { } type DoubleValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is DoubleRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is DoubleList, value is only used to hold the value as it @@ -1095,11 +1109,13 @@ type DoubleValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *DoubleValue_Range // *DoubleValue_List - Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"` + Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleValue) Reset() { @@ -1139,23 +1155,27 @@ func (x *DoubleValue) GetValue() float64 { return 0 } -func (m *DoubleValue) GetDistribution() isDoubleValue_Distribution { - if m != nil { - return m.Distribution +func (x *DoubleValue) GetDistribution() isDoubleValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *DoubleValue) GetRange() *DoubleRange { - if x, ok := x.GetDistribution().(*DoubleValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*DoubleValue_Range); ok { + return x.Range + } } return nil } func (x *DoubleValue) GetList() *DoubleList { - if x, ok := x.GetDistribution().(*DoubleValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*DoubleValue_List); ok { + return x.List + } } return nil } @@ -1177,10 +1197,7 @@ func (*DoubleValue_Range) isDoubleValue_Distribution() {} func (*DoubleValue_List) isDoubleValue_Distribution() {} type DoubleRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum float64 `protobuf:"fixed64,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum float64 `protobuf:"fixed64,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -1188,8 +1205,10 @@ type DoubleRange struct { // where delta is randomly chosen between delta_min and delta_max. The range // minimum and maximum are still respected. If not set subsequent value is a // value randomly chosen between minimum and maximum. - DeltaMin float64 `protobuf:"fixed64,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax float64 `protobuf:"fixed64,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin float64 `protobuf:"fixed64,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax float64 `protobuf:"fixed64,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleRange) Reset() { @@ -1251,15 +1270,14 @@ func (x *DoubleRange) GetDeltaMax() float64 { } type DoubleList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []float64 `protobuf:"fixed64,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleList) Reset() { @@ -1307,19 +1325,18 @@ func (x *DoubleList) GetRandom() bool { } type StringValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is StringList, value is used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *StringValue_List - Distribution isStringValue_Distribution `protobuf_oneof:"distribution"` + Distribution isStringValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringValue) Reset() { @@ -1359,16 +1376,18 @@ func (x *StringValue) GetValue() string { return "" } -func (m *StringValue) GetDistribution() isStringValue_Distribution { - if m != nil { - return m.Distribution +func (x *StringValue) GetDistribution() isStringValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *StringValue) GetList() *StringList { - if x, ok := x.GetDistribution().(*StringValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*StringValue_List); ok { + return x.List + } } return nil } @@ -1384,15 +1403,14 @@ type StringValue_List struct { func (*StringValue_List) isStringValue_Distribution() {} type StringList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of strings which can be used. Options []string `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringList) Reset() { @@ -1440,19 +1458,18 @@ func (x *StringList) GetRandom() bool { } type StringListValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is StringList, value is used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *StringListValue_List - Distribution isStringListValue_Distribution `protobuf_oneof:"distribution"` + Distribution isStringListValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringListValue) Reset() { @@ -1492,16 +1509,18 @@ func (x *StringListValue) GetValue() []string { return nil } -func (m *StringListValue) GetDistribution() isStringListValue_Distribution { - if m != nil { - return m.Distribution +func (x *StringListValue) GetDistribution() isStringListValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *StringListValue) GetList() *StringList { - if x, ok := x.GetDistribution().(*StringListValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*StringListValue_List); ok { + return x.List + } } return nil } @@ -1517,19 +1536,18 @@ type StringListValue_List struct { func (*StringListValue_List) isStringListValue_Distribution() {} type BoolValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is BoolList, value is only used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *BoolValue_List - Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"` + Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BoolValue) Reset() { @@ -1569,16 +1587,18 @@ func (x *BoolValue) GetValue() bool { return false } -func (m *BoolValue) GetDistribution() isBoolValue_Distribution { - if m != nil { - return m.Distribution +func (x *BoolValue) GetDistribution() isBoolValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *BoolValue) GetList() *BoolList { - if x, ok := x.GetDistribution().(*BoolValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*BoolValue_List); ok { + return x.List + } } return nil } @@ -1594,15 +1614,14 @@ type BoolValue_List struct { func (*BoolValue_List) isBoolValue_Distribution() {} type BoolList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []bool `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BoolList) Reset() { @@ -1650,10 +1669,7 @@ func (x *BoolList) GetRandom() bool { } type UintValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is UintRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is UintList, value is only used to hold the value as it @@ -1661,11 +1677,13 @@ type UintValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *UintValue_Range // *UintValue_List - Distribution isUintValue_Distribution `protobuf_oneof:"distribution"` + Distribution isUintValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintValue) Reset() { @@ -1705,23 +1723,27 @@ func (x *UintValue) GetValue() uint64 { return 0 } -func (m *UintValue) GetDistribution() isUintValue_Distribution { - if m != nil { - return m.Distribution +func (x *UintValue) GetDistribution() isUintValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *UintValue) GetRange() *UintRange { - if x, ok := x.GetDistribution().(*UintValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*UintValue_Range); ok { + return x.Range + } } return nil } func (x *UintValue) GetList() *UintList { - if x, ok := x.GetDistribution().(*UintValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*UintValue_List); ok { + return x.List + } } return nil } @@ -1743,10 +1765,7 @@ func (*UintValue_Range) isUintValue_Distribution() {} func (*UintValue_List) isUintValue_Distribution() {} type UintRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum uint64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum uint64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -1755,8 +1774,10 @@ type UintRange struct { // minimum and maximum are still respected and values will saturate at the // boundaries if they are exceeded. If not set subsequent value is a value // randomly chosen between minimum and maximum. - DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintRange) Reset() { @@ -1818,15 +1839,14 @@ func (x *UintRange) GetDeltaMax() int64 { } type UintList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []uint64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintList) Reset() { @@ -1875,7 +1895,7 @@ func (x *UintList) GetRandom() bool { var File_github_com_openconfig_gnmi_testing_fake_proto_fake_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = string([]byte{ 0x0a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, @@ -2092,16 +2112,16 @@ var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = []by 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x66, 0x61, 0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc + file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData) + file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc), len(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData } @@ -2221,7 +2241,7 @@ func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc), len(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc)), NumEnums: 2, NumMessages: 22, NumExtensions: 0, @@ -2233,7 +2253,6 @@ func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_testing_fake_proto_fake_proto = out.File - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = nil file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_goTypes = nil file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_depIdxs = nil } diff --git a/api/go/gosdn/app/app.pb.go b/api/go/gosdn/app/app.pb.go index 8064592bd3de7f15d5080d99ae2a40d3546d4d9e..2f69f65da012e1aceb6291d3d379063c337dc3e8 100755 --- a/api/go/gosdn/app/app.pb.go +++ b/api/go/gosdn/app/app.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/app/app.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,13 +26,12 @@ const ( ) type AppRegisterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppRegisterRequest) Reset() { @@ -86,12 +86,11 @@ func (x *AppRegisterRequest) GetToken() string { } type AppRegisterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Queueconnection string `protobuf:"bytes,2,opt,name=queueconnection,proto3" json:"queueconnection,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Queueconnection string `protobuf:"bytes,2,opt,name=queueconnection,proto3" json:"queueconnection,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AppRegisterResponse) Reset() { @@ -139,12 +138,11 @@ func (x *AppRegisterResponse) GetQueueconnection() string { } type AppDeregisterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppDeregisterRequest) Reset() { @@ -192,11 +190,10 @@ func (x *AppDeregisterRequest) GetAppname() string { } type AppDeregisterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppDeregisterResponse) Reset() { @@ -238,7 +235,7 @@ func (x *AppDeregisterResponse) GetTimestamp() int64 { var File_gosdn_app_app_proto protoreflect.FileDescriptor -var file_gosdn_app_app_proto_rawDesc = []byte{ +var file_gosdn_app_app_proto_rawDesc = string([]byte{ 0x0a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x61, 0x70, 0x70, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, @@ -290,16 +287,16 @@ var file_gosdn_app_app_proto_rawDesc = []byte{ 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_app_app_proto_rawDescOnce sync.Once - file_gosdn_app_app_proto_rawDescData = file_gosdn_app_app_proto_rawDesc + file_gosdn_app_app_proto_rawDescData []byte ) func file_gosdn_app_app_proto_rawDescGZIP() []byte { file_gosdn_app_app_proto_rawDescOnce.Do(func() { - file_gosdn_app_app_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_app_app_proto_rawDescData) + file_gosdn_app_app_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_app_app_proto_rawDesc), len(file_gosdn_app_app_proto_rawDesc))) }) return file_gosdn_app_app_proto_rawDescData } @@ -332,7 +329,7 @@ func file_gosdn_app_app_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_app_app_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_app_app_proto_rawDesc), len(file_gosdn_app_app_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -343,7 +340,6 @@ func file_gosdn_app_app_proto_init() { MessageInfos: file_gosdn_app_app_proto_msgTypes, }.Build() File_gosdn_app_app_proto = out.File - file_gosdn_app_app_proto_rawDesc = nil file_gosdn_app_app_proto_goTypes = nil file_gosdn_app_app_proto_depIdxs = nil } diff --git a/api/go/gosdn/app/app.pb.gw.go b/api/go/gosdn/app/app.pb.gw.go index 8ff05688f11ada4e8cbe589a431fa490e0e7a8b2..852173e5aff0f6702467464452ea95a238f33bb2 100755 --- a/api/go/gosdn/app/app.pb.gw.go +++ b/api/go/gosdn/app/app.pb.gw.go @@ -10,6 +10,7 @@ package app import ( "context" + "errors" "io" "net/http" @@ -24,63 +25,62 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AppService_Register_0(ctx context.Context, marshaler runtime.Marshaler, client AppServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppRegisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppRegisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Register(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AppService_Register_0(ctx context.Context, marshaler runtime.Marshaler, server AppServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppRegisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppRegisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Register(ctx, &protoReq) return msg, metadata, err - } func request_AppService_Deregister_0(ctx context.Context, marshaler runtime.Marshaler, client AppServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppDeregisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppDeregisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Deregister(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AppService_Deregister_0(ctx context.Context, marshaler runtime.Marshaler, server AppServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppDeregisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppDeregisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Deregister(ctx, &protoReq) return msg, metadata, err - } // RegisterAppServiceHandlerServer registers the http handlers for service AppService to "mux". @@ -89,16 +89,13 @@ func local_request_AppService_Deregister_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAppServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppServiceServer) error { - - mux.Handle("POST", pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -110,20 +107,15 @@ func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -135,9 +127,7 @@ func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Deregister_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -164,7 +154,6 @@ func RegisterAppServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser } }() }() - return RegisterAppServiceHandler(ctx, mux, conn) } @@ -180,14 +169,11 @@ func RegisterAppServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AppServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppServiceClient) error { - - mux.Handle("POST", pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -198,18 +184,13 @@ func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -220,22 +201,17 @@ func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Deregister_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_AppService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"register"}, "")) - + pattern_AppService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"register"}, "")) pattern_AppService_Deregister_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"deregister"}, "")) ) var ( - forward_AppService_Register_0 = runtime.ForwardResponseMessage - + forward_AppService_Register_0 = runtime.ForwardResponseMessage forward_AppService_Deregister_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go index b4600ce3f5febf0339cd5e2d8608b8c65cd1ffff..1a8b68cabba56fc5ab1067360802da8fde8deba9 100755 --- a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go +++ b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/configurationmanagement/configurationmanagement.proto @@ -14,6 +14,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,12 +25,11 @@ const ( ) type ExportSDNConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExportSDNConfigRequest) Reset() { @@ -77,12 +77,11 @@ func (x *ExportSDNConfigRequest) GetPid() string { } type ExportSDNConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + SdnConfigData string `protobuf:"bytes,2,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - SdnConfigData string `protobuf:"bytes,2,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExportSDNConfigResponse) Reset() { @@ -130,13 +129,12 @@ func (x *ExportSDNConfigResponse) GetSdnConfigData() string { } type ImportSDNConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + SdnConfigData string `protobuf:"bytes,3,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - SdnConfigData string `protobuf:"bytes,3,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ImportSDNConfigRequest) Reset() { @@ -191,11 +189,10 @@ func (x *ImportSDNConfigRequest) GetSdnConfigData() string { } type ImportSDNConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *ImportSDNConfigResponse) Reset() { @@ -237,7 +234,7 @@ func (x *ImportSDNConfigResponse) GetTimestamp() int64 { var File_gosdn_configurationmanagement_configurationmanagement_proto protoreflect.FileDescriptor -var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = []byte{ +var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = string([]byte{ 0x0a, 0x3b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, @@ -297,16 +294,16 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = [ 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 ( file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescOnce sync.Once - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc + file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData []byte ) func file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP() []byte { file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescOnce.Do(func() { - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData) + file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc), len(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc))) }) return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData } @@ -339,7 +336,7 @@ func file_gosdn_configurationmanagement_configurationmanagement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc), len(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -350,7 +347,6 @@ func file_gosdn_configurationmanagement_configurationmanagement_proto_init() { MessageInfos: file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes, }.Build() File_gosdn_configurationmanagement_configurationmanagement_proto = out.File - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = nil file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = nil file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = nil } diff --git a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go index a0a3160e0a336ac38a290d5115a1d5717ff1efcd..20532a16287ee289ec75dccd97ab6a8aa12286e9 100755 --- a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go +++ b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go @@ -10,6 +10,7 @@ package core import ( "context" + "errors" "io" "net/http" @@ -24,151 +25,114 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ConfigurationManagementService_ExportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExportSDNConfigRequest - var metadata runtime.ServerMetadata +var filter_ConfigurationManagementService_ExportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +func request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - val string - ok bool - err error - _ = err + protoReq ExportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ExportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ExportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ExportSDNConfig(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ConfigurationManagementService_ImportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_ConfigurationManagementService_ImportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ImportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ImportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ImportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ImportSDNConfig(ctx, &protoReq) return msg, metadata, err - } // RegisterConfigurationManagementServiceHandlerServer registers the http handlers for service ConfigurationManagementService to "mux". @@ -177,16 +141,13 @@ func local_request_ConfigurationManagementService_ImportSDNConfig_0(ctx context. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigurationManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigurationManagementServiceServer) error { - - mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -198,20 +159,15 @@ func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ExportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -223,9 +179,7 @@ func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ImportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -252,7 +206,6 @@ func RegisterConfigurationManagementServiceHandlerFromEndpoint(ctx context.Conte } }() }() - return RegisterConfigurationManagementServiceHandler(ctx, mux, conn) } @@ -268,14 +221,11 @@ func RegisterConfigurationManagementServiceHandler(ctx context.Context, mux *run // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ConfigurationManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigurationManagementServiceClient) error { - - mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -286,18 +236,13 @@ func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ExportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -308,22 +253,17 @@ func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ImportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_ConfigurationManagementService_ExportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"export", "pid"}, "")) - pattern_ConfigurationManagementService_ImportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"import", "pid"}, "")) ) var ( forward_ConfigurationManagementService_ExportSDNConfig_0 = runtime.ForwardResponseMessage - forward_ConfigurationManagementService_ImportSDNConfig_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/conflict/conflict.pb.go b/api/go/gosdn/conflict/conflict.pb.go index a1c9d5c448ec17c6425096fa274d2387f262df62..89b844920edf23c2b9cd5f8549977f5386a45b50 100755 --- a/api/go/gosdn/conflict/conflict.pb.go +++ b/api/go/gosdn/conflict/conflict.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/conflict/conflict.proto @@ -12,6 +12,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -22,11 +23,10 @@ const ( ) type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceVersion int64 `protobuf:"varint,1,opt,name=resourceVersion,proto3" json:"resourceVersion,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ResourceVersion int64 `protobuf:"varint,1,opt,name=resourceVersion,proto3" json:"resourceVersion,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { @@ -68,7 +68,7 @@ func (x *Metadata) GetResourceVersion() int64 { var File_gosdn_conflict_conflict_proto protoreflect.FileDescriptor -var file_gosdn_conflict_conflict_proto_rawDesc = []byte{ +var file_gosdn_conflict_conflict_proto_rawDesc = string([]byte{ 0x0a, 0x1d, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x1a, @@ -82,16 +82,16 @@ var file_gosdn_conflict_conflict_proto_rawDesc = []byte{ 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_conflict_conflict_proto_rawDescOnce sync.Once - file_gosdn_conflict_conflict_proto_rawDescData = file_gosdn_conflict_conflict_proto_rawDesc + file_gosdn_conflict_conflict_proto_rawDescData []byte ) func file_gosdn_conflict_conflict_proto_rawDescGZIP() []byte { file_gosdn_conflict_conflict_proto_rawDescOnce.Do(func() { - file_gosdn_conflict_conflict_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_conflict_conflict_proto_rawDescData) + file_gosdn_conflict_conflict_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_conflict_conflict_proto_rawDesc), len(file_gosdn_conflict_conflict_proto_rawDesc))) }) return file_gosdn_conflict_conflict_proto_rawDescData } @@ -117,7 +117,7 @@ func file_gosdn_conflict_conflict_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_conflict_conflict_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_conflict_conflict_proto_rawDesc), len(file_gosdn_conflict_conflict_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -128,7 +128,6 @@ func file_gosdn_conflict_conflict_proto_init() { MessageInfos: file_gosdn_conflict_conflict_proto_msgTypes, }.Build() File_gosdn_conflict_conflict_proto = out.File - file_gosdn_conflict_conflict_proto_rawDesc = nil file_gosdn_conflict_conflict_proto_goTypes = nil file_gosdn_conflict_conflict_proto_depIdxs = nil } diff --git a/api/go/gosdn/csbi/csbi.pb.go b/api/go/gosdn/csbi/csbi.pb.go index 55f5c6d639a4f5fd4a694cd22d02422e9fee2e3e..39d930645bb15dbf9cec3e90f86c4dc3a9328da6 100755 --- a/api/go/gosdn/csbi/csbi.pb.go +++ b/api/go/gosdn/csbi/csbi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/csbi/csbi.proto @@ -13,6 +13,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -81,13 +82,12 @@ func (State) EnumDescriptor() ([]byte, []int) { } type Syn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Syn) Reset() { @@ -142,12 +142,11 @@ func (x *Syn) GetAddress() string { } type Ack struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. TransportOption *transport.TransportOption `protobuf:"bytes,2,opt,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Ack) Reset() { @@ -195,13 +194,12 @@ func (x *Ack) GetTransportOption() *transport.TransportOption { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` + Did []string `protobuf:"bytes,3,rep,name=did,proto3" json:"did,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` - Did []string `protobuf:"bytes,3,rep,name=did,proto3" json:"did,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -256,13 +254,12 @@ func (x *GetRequest) GetDid() []string { } type GetPayloadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` + File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPayloadRequest) Reset() { @@ -317,12 +314,11 @@ func (x *GetPayloadRequest) GetFile() string { } type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -370,13 +366,12 @@ func (x *GetResponse) GetDeployments() []*Deployment { } type Deployment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + State State `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.csbi.State" json:"state,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - State State `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.csbi.State" json:"state,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Deployment) Reset() { @@ -431,12 +426,11 @@ func (x *Deployment) GetState() State { } type CreateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. TransportOption []*transport.TransportOption `protobuf:"bytes,2,rep,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRequest) Reset() { @@ -484,12 +478,11 @@ func (x *CreateRequest) GetTransportOption() []*transport.TransportOption { } type CreateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateResponse) Reset() { @@ -537,11 +530,10 @@ func (x *CreateResponse) GetDeployments() []*Deployment { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -582,12 +574,11 @@ func (x *Payload) GetChunk() []byte { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Did []string `protobuf:"bytes,2,rep,name=did,proto3" json:"did,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Did []string `protobuf:"bytes,2,rep,name=did,proto3" json:"did,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -635,11 +626,10 @@ func (x *DeleteRequest) GetDid() []string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -681,7 +671,7 @@ func (x *DeleteResponse) GetTimestamp() int64 { var File_gosdn_csbi_csbi_proto protoreflect.FileDescriptor -var file_gosdn_csbi_csbi_proto_rawDesc = []byte{ +var file_gosdn_csbi_csbi_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x73, 0x62, 0x69, 0x2f, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, @@ -786,16 +776,16 @@ var file_gosdn_csbi_csbi_proto_rawDesc = []byte{ 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x73, 0x62, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_csbi_csbi_proto_rawDescOnce sync.Once - file_gosdn_csbi_csbi_proto_rawDescData = file_gosdn_csbi_csbi_proto_rawDesc + file_gosdn_csbi_csbi_proto_rawDescData []byte ) func file_gosdn_csbi_csbi_proto_rawDescGZIP() []byte { file_gosdn_csbi_csbi_proto_rawDescOnce.Do(func() { - file_gosdn_csbi_csbi_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_csbi_csbi_proto_rawDescData) + file_gosdn_csbi_csbi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_csbi_csbi_proto_rawDesc), len(file_gosdn_csbi_csbi_proto_rawDesc))) }) return file_gosdn_csbi_csbi_proto_rawDescData } @@ -851,7 +841,7 @@ func file_gosdn_csbi_csbi_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_csbi_csbi_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_csbi_csbi_proto_rawDesc), len(file_gosdn_csbi_csbi_proto_rawDesc)), NumEnums: 1, NumMessages: 11, NumExtensions: 0, @@ -863,7 +853,6 @@ func file_gosdn_csbi_csbi_proto_init() { MessageInfos: file_gosdn_csbi_csbi_proto_msgTypes, }.Build() File_gosdn_csbi_csbi_proto = out.File - file_gosdn_csbi_csbi_proto_rawDesc = nil file_gosdn_csbi_csbi_proto_goTypes = nil file_gosdn_csbi_csbi_proto_depIdxs = nil } diff --git a/api/go/gosdn/networkelement/networkelement.pb.go b/api/go/gosdn/networkelement/networkelement.pb.go index a58431fdb61a1a3eda72b3c3228141eeea634fb2..17e66647eb62526acac70faceba3524b7fa141a2 100755 --- a/api/go/gosdn/networkelement/networkelement.pb.go +++ b/api/go/gosdn/networkelement/networkelement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/networkelement/networkelement.proto @@ -19,6 +19,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -293,12 +294,11 @@ func (StreamMode) EnumDescriptor() ([]byte, []int) { // TODO: change name to fit the rest type UpdateNetworkElementRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` NetworkElement *ManagedNetworkElement `protobuf:"bytes,2,opt,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateNetworkElementRequest) Reset() { @@ -346,11 +346,10 @@ func (x *UpdateNetworkElementRequest) GetNetworkElement() *ManagedNetworkElement } type UpdateNetworkElementResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateNetworkElementResponse) Reset() { @@ -391,10 +390,7 @@ func (x *UpdateNetworkElementResponse) GetTimestamp() int64 { } type ManagedNetworkElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` @@ -405,6 +401,8 @@ type ManagedNetworkElement struct { Metadata *conflict.Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` AssociatedPnd string `protobuf:"bytes,9,opt,name=associated_pnd,json=associatedPnd,proto3" json:"associated_pnd,omitempty"` GnmiSubscribePaths []string `protobuf:"bytes,10,rep,name=gnmi_subscribe_paths,json=gnmiSubscribePaths,proto3" json:"gnmi_subscribe_paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ManagedNetworkElement) Reset() { @@ -508,14 +506,13 @@ func (x *ManagedNetworkElement) GetGnmiSubscribePaths() []string { } type FlattenedManagedNetworkElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + Pluginid string `protobuf:"bytes,4,opt,name=pluginid,proto3" json:"pluginid,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` - Pluginid string `protobuf:"bytes,4,opt,name=pluginid,proto3" json:"pluginid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FlattenedManagedNetworkElement) Reset() { @@ -577,12 +574,11 @@ func (x *FlattenedManagedNetworkElement) GetPluginid() string { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -630,15 +626,14 @@ func (x *GetAllRequest) GetPid() string { } type GetAllResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne []*ManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*ManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAllResponse) Reset() { @@ -693,12 +688,11 @@ func (x *GetAllResponse) GetMne() []*ManagedNetworkElement { } type GetAllFlattenedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllFlattenedRequest) Reset() { @@ -746,15 +740,14 @@ func (x *GetAllFlattenedRequest) GetPid() string { } type GetAllFlattenedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne []*FlattenedManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*FlattenedManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAllFlattenedResponse) Reset() { @@ -809,12 +802,11 @@ func (x *GetAllFlattenedResponse) GetMne() []*FlattenedManagedNetworkElement { } type ParseYangRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Yang string `protobuf:"bytes,2,opt,name=yang,proto3" json:"yang,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Yang string `protobuf:"bytes,2,opt,name=yang,proto3" json:"yang,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ParseYangRequest) Reset() { @@ -862,12 +854,11 @@ func (x *ParseYangRequest) GetYang() string { } type ParseYangResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ParseYangResponse) Reset() { @@ -915,13 +906,12 @@ func (x *ParseYangResponse) GetJson() string { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -976,15 +966,14 @@ func (x *GetRequest) GetPid() string { } type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne *ManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne *ManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -1039,13 +1028,12 @@ func (x *GetResponse) GetMne() *ManagedNetworkElement { } type GetFlattenedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetFlattenedRequest) Reset() { @@ -1100,15 +1088,14 @@ func (x *GetFlattenedRequest) GetPid() string { } type GetFlattenedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne *FlattenedManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne *FlattenedManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFlattenedResponse) Reset() { @@ -1163,10 +1150,7 @@ func (x *GetFlattenedResponse) GetMne() *FlattenedManagedNetworkElement { } type SetMne struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` PluginId string `protobuf:"bytes,3,opt,name=pluginId,proto3" json:"pluginId,omitempty"` @@ -1174,6 +1158,8 @@ type SetMne struct { TransportOption *transport.TransportOption `protobuf:"bytes,5,opt,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` GnmiSubscribePaths []string `protobuf:"bytes,6,rep,name=gnmi_subscribe_paths,json=gnmiSubscribePaths,proto3" json:"gnmi_subscribe_paths,omitempty"` MneId string `protobuf:"bytes,7,opt,name=mne_id,json=mneId,proto3" json:"mne_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetMne) Reset() { @@ -1256,13 +1242,12 @@ func (x *SetMne) GetMneId() string { } type AddListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mne []*SetMne `protobuf:"bytes,2,rep,name=mne,proto3" json:"mne,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mne []*SetMne `protobuf:"bytes,2,rep,name=mne,proto3" json:"mne,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddListRequest) Reset() { @@ -1317,12 +1302,11 @@ func (x *AddListRequest) GetPid() string { } type AddListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddListResponse) Reset() { @@ -1370,14 +1354,13 @@ func (x *AddListResponse) GetResponses() []*SetResponse { } type GetPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPathRequest) Reset() { @@ -1439,15 +1422,14 @@ func (x *GetPathRequest) GetPid() string { } type GetPathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPathResponse) Reset() { @@ -1502,14 +1484,13 @@ func (x *GetPathResponse) GetMneNotification() []*gnmi.Notification { } type GetIntendedPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + IntendedPath string `protobuf:"bytes,3,opt,name=intended_path,json=intendedPath,proto3" json:"intended_path,omitempty"` + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - IntendedPath string `protobuf:"bytes,3,opt,name=intended_path,json=intendedPath,proto3" json:"intended_path,omitempty"` - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetIntendedPathRequest) Reset() { @@ -1571,13 +1552,12 @@ func (x *GetIntendedPathRequest) GetPid() string { } type GetIntendedPathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,64,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetIntendedPathResponse) Reset() { @@ -1632,12 +1612,11 @@ func (x *GetIntendedPathResponse) GetMneNotification() []*gnmi.Notification { } type SetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetResponse) Reset() { @@ -1685,13 +1664,12 @@ func (x *SetResponse) GetId() string { } type SetPathListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + ChangeRequest []*ChangeRequest `protobuf:"bytes,2,rep,name=change_request,json=changeRequest,proto3" json:"change_request,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - ChangeRequest []*ChangeRequest `protobuf:"bytes,2,rep,name=change_request,json=changeRequest,proto3" json:"change_request,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetPathListRequest) Reset() { @@ -1746,12 +1724,11 @@ func (x *SetPathListRequest) GetPid() string { } type SetPathListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetPathListResponse) Reset() { @@ -1799,13 +1776,12 @@ func (x *SetPathListResponse) GetResponses() []*SetResponse { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -1860,11 +1836,10 @@ func (x *DeleteRequest) GetMneid() string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -1905,14 +1880,13 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type Change struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + State ChangeState `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.networkelement.ChangeState" json:"state,omitempty"` + Diff *gnmi.Notification `protobuf:"bytes,4,opt,name=diff,proto3" json:"diff,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` - State ChangeState `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.networkelement.ChangeState" json:"state,omitempty"` - Diff *gnmi.Notification `protobuf:"bytes,4,opt,name=diff,proto3" json:"diff,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Change) Reset() { @@ -1974,14 +1948,13 @@ func (x *Change) GetDiff() *gnmi.Notification { } type ChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Mneid string `protobuf:"bytes,1,opt,name=mneid,proto3" json:"mneid,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ApiOp ApiOperation `protobuf:"varint,4,opt,name=api_op,json=apiOp,proto3,enum=gosdn.networkelement.ApiOperation" json:"api_op,omitempty"` unknownFields protoimpl.UnknownFields - - Mneid string `protobuf:"bytes,1,opt,name=mneid,proto3" json:"mneid,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - ApiOp ApiOperation `protobuf:"varint,4,opt,name=api_op,json=apiOp,proto3,enum=gosdn.networkelement.ApiOperation" json:"api_op,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChangeRequest) Reset() { @@ -2043,12 +2016,11 @@ func (x *ChangeRequest) GetApiOp() ApiOperation { } type SetChange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` + Op Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.networkelement.Operation" json:"op,omitempty"` unknownFields protoimpl.UnknownFields - - Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` - Op Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.networkelement.Operation" json:"op,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChange) Reset() { @@ -2096,12 +2068,11 @@ func (x *SetChange) GetOp() Operation { } type GetChangeListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetChangeListRequest) Reset() { @@ -2149,15 +2120,14 @@ func (x *GetChangeListRequest) GetPid() string { } type GetChangeListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetChangeListResponse) Reset() { @@ -2212,13 +2182,12 @@ func (x *GetChangeListResponse) GetChange() []*Change { } type GetChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Cuid []string `protobuf:"bytes,2,rep,name=cuid,proto3" json:"cuid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Cuid []string `protobuf:"bytes,2,rep,name=cuid,proto3" json:"cuid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetChangeRequest) Reset() { @@ -2273,15 +2242,14 @@ func (x *GetChangeRequest) GetPid() string { } type GetChangeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetChangeResponse) Reset() { @@ -2336,13 +2304,12 @@ func (x *GetChangeResponse) GetChange() []*Change { } type SetChangeListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Change []*SetChange `protobuf:"bytes,2,rep,name=change,proto3" json:"change,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Change []*SetChange `protobuf:"bytes,2,rep,name=change,proto3" json:"change,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChangeListRequest) Reset() { @@ -2397,12 +2364,11 @@ func (x *SetChangeListRequest) GetPid() string { } type SetChangeListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChangeListResponse) Reset() { @@ -2452,12 +2418,11 @@ func (x *SetChangeListResponse) GetResponses() []*SetResponse { // The mode determines how the target should trigger updates to be sent. // Reference: gNMI Specification Section 3.5.1.2 type SubscriptionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Subscription []*Subscription `protobuf:"bytes,1,rep,name=subscription,proto3" json:"subscription,omitempty"` + Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gosdn.networkelement.SubscriptionMode" json:"mode,omitempty"` unknownFields protoimpl.UnknownFields - - Subscription []*Subscription `protobuf:"bytes,1,rep,name=subscription,proto3" json:"subscription,omitempty"` - Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gosdn.networkelement.SubscriptionMode" json:"mode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubscriptionList) Reset() { @@ -2505,13 +2470,12 @@ func (x *SubscriptionList) GetMode() SubscriptionMode { } type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - StreamMode StreamMode `protobuf:"varint,2,opt,name=stream_mode,json=streamMode,proto3,enum=gosdn.networkelement.StreamMode" json:"stream_mode,omitempty"` - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // time in ns between samples in SAMPLE mode. + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + StreamMode StreamMode `protobuf:"varint,2,opt,name=stream_mode,json=streamMode,proto3,enum=gosdn.networkelement.StreamMode" json:"stream_mode,omitempty"` + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // time in ns between samples in SAMPLE mode. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -2566,14 +2530,13 @@ func (x *Subscription) GetSampleInterval() uint64 { } type SubscribePathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + Sublist *SubscriptionList `protobuf:"bytes,4,opt,name=sublist,proto3" json:"sublist,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` - Sublist *SubscriptionList `protobuf:"bytes,4,opt,name=sublist,proto3" json:"sublist,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubscribePathRequest) Reset() { @@ -2635,12 +2598,11 @@ func (x *SubscribePathRequest) GetSublist() *SubscriptionList { } type SubscribePathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - MneNotification []*gnmi.Notification `protobuf:"bytes,2,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + MneNotification []*gnmi.Notification `protobuf:"bytes,2,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribePathResponse) Reset() { @@ -2689,7 +2651,7 @@ func (x *SubscribePathResponse) GetMneNotification() []*gnmi.Notification { var File_gosdn_networkelement_networkelement_proto protoreflect.FileDescriptor -var file_gosdn_networkelement_networkelement_proto_rawDesc = []byte{ +var file_gosdn_networkelement_networkelement_proto_rawDesc = string([]byte{ 0x0a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6f, 0x73, @@ -3212,16 +3174,16 @@ var file_gosdn_networkelement_networkelement_proto_rawDesc = []byte{ 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_networkelement_networkelement_proto_rawDescOnce sync.Once - file_gosdn_networkelement_networkelement_proto_rawDescData = file_gosdn_networkelement_networkelement_proto_rawDesc + file_gosdn_networkelement_networkelement_proto_rawDescData []byte ) func file_gosdn_networkelement_networkelement_proto_rawDescGZIP() []byte { file_gosdn_networkelement_networkelement_proto_rawDescOnce.Do(func() { - file_gosdn_networkelement_networkelement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_networkelement_networkelement_proto_rawDescData) + file_gosdn_networkelement_networkelement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_networkelement_networkelement_proto_rawDesc), len(file_gosdn_networkelement_networkelement_proto_rawDesc))) }) return file_gosdn_networkelement_networkelement_proto_rawDescData } @@ -3367,7 +3329,7 @@ func file_gosdn_networkelement_networkelement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_networkelement_networkelement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_networkelement_networkelement_proto_rawDesc), len(file_gosdn_networkelement_networkelement_proto_rawDesc)), NumEnums: 5, NumMessages: 39, NumExtensions: 0, @@ -3379,7 +3341,6 @@ func file_gosdn_networkelement_networkelement_proto_init() { MessageInfos: file_gosdn_networkelement_networkelement_proto_msgTypes, }.Build() File_gosdn_networkelement_networkelement_proto = out.File - file_gosdn_networkelement_networkelement_proto_rawDesc = nil file_gosdn_networkelement_networkelement_proto_goTypes = nil file_gosdn_networkelement_networkelement_proto_depIdxs = nil } diff --git a/api/go/gosdn/networkelement/networkelement.pb.gw.go b/api/go/gosdn/networkelement/networkelement.pb.gw.go index 64219868860f12e1bb95dd99216649a21ec61704..409a3a5a49e9847619b07b02b5de6583db065547 100755 --- a/api/go/gosdn/networkelement/networkelement.pb.gw.go +++ b/api/go/gosdn/networkelement/networkelement.pb.gw.go @@ -10,6 +10,7 @@ package networkelement import ( "context" + "errors" "io" "net/http" @@ -24,613 +25,488 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNetworkElementRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateNetworkElementRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNetworkElementRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateNetworkElementRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Update(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetAllFlattened_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_GetAllFlattened_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_GetAllFlattened_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllFlattenedRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllFlattenedRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAllFlattened_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAllFlattened(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetAllFlattened_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllFlattenedRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllFlattenedRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAllFlattened_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAllFlattened(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Get(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_ParseYang_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_ParseYang_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_ParseYang_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ParseYangRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ParseYangRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_ParseYang_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ParseYang(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_ParseYang_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ParseYangRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ParseYangRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_ParseYang_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ParseYang(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_AddList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_AddList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) +var filter_NetworkElementService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} func request_NetworkElementService_GetPath_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") } - protoReq.Path, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPath(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetPath_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") } - protoReq.Path, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPath(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetIntendedPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "intended_path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) +var filter_NetworkElementService_GetIntendedPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "intended_path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} func request_NetworkElementService_GetIntendedPath_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetIntendedPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetIntendedPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["intended_path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "intended_path") } - protoReq.IntendedPath, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "intended_path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetIntendedPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetIntendedPath(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetIntendedPath_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetIntendedPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetIntendedPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["intended_path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "intended_path") } - protoReq.IntendedPath, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "intended_path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetIntendedPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetIntendedPath(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_SetPathList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetPathListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetPathListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetPathList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_SetPathList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetPathListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetPathListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetPathList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Delete(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetChangeList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_GetChangeList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_GetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetChangeListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChangeList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetChangeList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetChangeListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChangeList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetChangeList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetChange_0 = &utilities.DoubleArray{Encoding: map[string]int{"cuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_GetChange_0 = &utilities.DoubleArray{Encoding: map[string]int{"cuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_GetChange_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetChangeRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["cuid"] + val, ok := pathParams["cuid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cuid") } - protoReq.Cuid, err = runtime.StringSlice(val, ",") if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cuid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChange_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetChange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetChange_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetChangeRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["cuid"] + val, ok := pathParams["cuid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cuid") } - protoReq.Cuid, err = runtime.StringSlice(val, ",") if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cuid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChange_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetChange(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_SetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetChangeListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetChangeListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetChangeList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_SetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetChangeListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetChangeListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetChangeList(ctx, &protoReq) return msg, metadata, err - } // RegisterNetworkElementServiceHandlerServer registers the http handlers for service NetworkElementService to "mux". @@ -639,16 +515,13 @@ func local_request_NetworkElementService_SetChangeList_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkElementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkElementServiceServer) error { - - mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -660,20 +533,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -685,20 +553,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetAllFlattened_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -710,20 +573,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -735,20 +593,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_ParseYang_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -760,20 +613,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_AddList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -785,20 +633,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -810,20 +653,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetIntendedPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -835,20 +673,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetPathList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -860,20 +693,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -885,20 +713,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -910,20 +733,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -935,9 +753,7 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -964,7 +780,6 @@ func RegisterNetworkElementServiceHandlerFromEndpoint(ctx context.Context, mux * } }() }() - return RegisterNetworkElementServiceHandler(ctx, mux, conn) } @@ -980,14 +795,11 @@ func RegisterNetworkElementServiceHandler(ctx context.Context, mux *runtime.Serv // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NetworkElementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkElementServiceClient) error { - - mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -998,18 +810,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1020,18 +827,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetAllFlattened_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1042,18 +844,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1064,18 +861,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_ParseYang_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1086,18 +878,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_AddList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1108,18 +895,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1130,18 +912,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetIntendedPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1152,18 +929,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetPathList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1174,18 +946,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1196,18 +963,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1218,18 +980,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1240,62 +997,37 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_NetworkElementService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "update"}, "")) - + pattern_NetworkElementService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "update"}, "")) pattern_NetworkElementService_GetAllFlattened_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) - - pattern_NetworkElementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) - - pattern_NetworkElementService_ParseYang_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"yang", "parse"}, "")) - - pattern_NetworkElementService_AddList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) - - pattern_NetworkElementService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "paths", "path"}, "")) - + pattern_NetworkElementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) + pattern_NetworkElementService_ParseYang_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"yang", "parse"}, "")) + pattern_NetworkElementService_AddList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) + pattern_NetworkElementService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "paths", "path"}, "")) pattern_NetworkElementService_GetIntendedPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "intendedpaths", "intended_path"}, "")) - - pattern_NetworkElementService_SetPathList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "paths"}, "")) - - pattern_NetworkElementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) - - pattern_NetworkElementService_GetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) - - pattern_NetworkElementService_GetChange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"mnes", "changes", "cuid"}, "")) - - pattern_NetworkElementService_SetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) + pattern_NetworkElementService_SetPathList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "paths"}, "")) + pattern_NetworkElementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) + pattern_NetworkElementService_GetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) + pattern_NetworkElementService_GetChange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"mnes", "changes", "cuid"}, "")) + pattern_NetworkElementService_SetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) ) var ( - forward_NetworkElementService_Update_0 = runtime.ForwardResponseMessage - + forward_NetworkElementService_Update_0 = runtime.ForwardResponseMessage forward_NetworkElementService_GetAllFlattened_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_Get_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_ParseYang_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_AddList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetPath_0 = runtime.ForwardResponseMessage - + forward_NetworkElementService_Get_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_ParseYang_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_AddList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetPath_0 = runtime.ForwardResponseMessage forward_NetworkElementService_GetIntendedPath_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_SetPathList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_Delete_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetChangeList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetChange_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_SetChangeList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_SetPathList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_Delete_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetChangeList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetChange_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_SetChangeList_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/plugin-internal/plugin-internal.pb.go b/api/go/gosdn/plugin-internal/plugin-internal.pb.go index 490d4f78c85ce34db7bbb89f9190ae3b1a1295df..6d52ec6b0126f9658e61e829e2777749855f61c6 100755 --- a/api/go/gosdn/plugin-internal/plugin-internal.pb.go +++ b/api/go/gosdn/plugin-internal/plugin-internal.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin-internal/plugin-internal.proto @@ -9,10 +9,12 @@ package plugin_internal import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,11 +25,10 @@ const ( ) type GetAvailablePluginsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAvailablePluginsRequest) Reset() { @@ -67,29 +68,28 @@ func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { return 0 } -type GetAvailablePluginsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type GetPluginSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Plugins []*plugin_registry.Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetAvailablePluginsResponse) Reset() { - *x = GetAvailablePluginsResponse{} +func (x *GetPluginSchemaRequest) Reset() { + *x = GetPluginSchemaRequest{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAvailablePluginsResponse) String() string { +func (x *GetPluginSchemaRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAvailablePluginsResponse) ProtoMessage() {} +func (*GetPluginSchemaRequest) ProtoMessage() {} -func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { +func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -101,48 +101,46 @@ func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. -func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPluginSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetPluginSchemaRequest) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{1} } -func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { +func (x *GetPluginSchemaRequest) GetTimestamp() int64 { if x != nil { return x.Timestamp } return 0 } -func (x *GetAvailablePluginsResponse) GetPlugins() []*plugin_registry.Plugin { +func (x *GetPluginSchemaRequest) GetPid() string { if x != nil { - return x.Plugins + return x.Pid } - return nil + return "" } -type GetPluginSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type PluginSchemaPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetPluginSchemaRequest) Reset() { - *x = GetPluginSchemaRequest{} +func (x *PluginSchemaPayload) Reset() { + *x = PluginSchemaPayload{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPluginSchemaRequest) String() string { +func (x *PluginSchemaPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPluginSchemaRequest) ProtoMessage() {} +func (*PluginSchemaPayload) ProtoMessage() {} -func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { +func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -154,47 +152,40 @@ func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPluginSchemaRequest.ProtoReflect.Descriptor instead. -func (*GetPluginSchemaRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PluginSchemaPayload.ProtoReflect.Descriptor instead. +func (*PluginSchemaPayload) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{2} } -func (x *GetPluginSchemaRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *GetPluginSchemaRequest) GetPid() string { +func (x *PluginSchemaPayload) GetChunk() []byte { if x != nil { - return x.Pid + return x.Chunk } - return "" + return nil } -type PluginSchemaPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type GetAvailablePluginsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*plugin_registry.Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *PluginSchemaPayload) Reset() { - *x = PluginSchemaPayload{} +func (x *GetAvailablePluginsResponse) Reset() { + *x = GetAvailablePluginsResponse{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *PluginSchemaPayload) String() string { +func (x *GetAvailablePluginsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PluginSchemaPayload) ProtoMessage() {} +func (*GetAvailablePluginsResponse) ProtoMessage() {} -func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { +func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -206,21 +197,28 @@ func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PluginSchemaPayload.ProtoReflect.Descriptor instead. -func (*PluginSchemaPayload) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{3} } -func (x *PluginSchemaPayload) GetChunk() []byte { +func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { if x != nil { - return x.Chunk + return x.Timestamp + } + return 0 +} + +func (x *GetAvailablePluginsResponse) GetPlugins() []*plugin_registry.Plugin { + if x != nil { + return x.Plugins } return nil } var File_gosdn_plugin_internal_plugin_internal_proto protoreflect.FileDescriptor -var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = []byte{ +var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = string([]byte{ 0x0a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, @@ -229,56 +227,66 @@ var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = []byte{ 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x70, - 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, - 0xf2, 0x01, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x30, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, - 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x18, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x32, 0xf2, 0x02, + 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x30, 0x01, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, + 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( file_gosdn_plugin_internal_plugin_internal_proto_rawDescOnce sync.Once - file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = file_gosdn_plugin_internal_plugin_internal_proto_rawDesc + file_gosdn_plugin_internal_plugin_internal_proto_rawDescData []byte ) func file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP() []byte { file_gosdn_plugin_internal_plugin_internal_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_internal_plugin_internal_proto_rawDescData) + file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc), len(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc))) }) return file_gosdn_plugin_internal_plugin_internal_proto_rawDescData } @@ -286,20 +294,22 @@ func file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP() []byte { var file_gosdn_plugin_internal_plugin_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_gosdn_plugin_internal_plugin_internal_proto_goTypes = []any{ (*GetAvailablePluginsRequest)(nil), // 0: gosdn.plugin_internal.GetAvailablePluginsRequest - (*GetAvailablePluginsResponse)(nil), // 1: gosdn.plugin_internal.GetAvailablePluginsResponse - (*GetPluginSchemaRequest)(nil), // 2: gosdn.plugin_internal.GetPluginSchemaRequest - (*PluginSchemaPayload)(nil), // 3: gosdn.plugin_internal.PluginSchemaPayload + (*GetPluginSchemaRequest)(nil), // 1: gosdn.plugin_internal.GetPluginSchemaRequest + (*PluginSchemaPayload)(nil), // 2: gosdn.plugin_internal.PluginSchemaPayload + (*GetAvailablePluginsResponse)(nil), // 3: gosdn.plugin_internal.GetAvailablePluginsResponse (*plugin_registry.Plugin)(nil), // 4: gosdn.plugin_registry.Plugin (*plugin_registry.GetResponse)(nil), // 5: gosdn.plugin_registry.GetResponse } var file_gosdn_plugin_internal_plugin_internal_proto_depIdxs = []int32{ 4, // 0: gosdn.plugin_internal.GetAvailablePluginsResponse.plugins:type_name -> gosdn.plugin_registry.Plugin 0, // 1: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:input_type -> gosdn.plugin_internal.GetAvailablePluginsRequest - 2, // 2: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:input_type -> gosdn.plugin_internal.GetPluginSchemaRequest - 5, // 3: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse - 3, // 4: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:output_type -> gosdn.plugin_internal.PluginSchemaPayload - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 1, // 2: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:input_type -> gosdn.plugin_internal.GetPluginSchemaRequest + 0, // 3: gosdn.plugin_internal.PluginInternalService.GetAvailablePlugins:input_type -> gosdn.plugin_internal.GetAvailablePluginsRequest + 5, // 4: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 2, // 5: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:output_type -> gosdn.plugin_internal.PluginSchemaPayload + 5, // 6: gosdn.plugin_internal.PluginInternalService.GetAvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 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 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -314,7 +324,7 @@ func file_gosdn_plugin_internal_plugin_internal_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_internal_plugin_internal_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc), len(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -325,7 +335,6 @@ func file_gosdn_plugin_internal_plugin_internal_proto_init() { MessageInfos: file_gosdn_plugin_internal_plugin_internal_proto_msgTypes, }.Build() File_gosdn_plugin_internal_plugin_internal_proto = out.File - file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = nil file_gosdn_plugin_internal_plugin_internal_proto_goTypes = nil file_gosdn_plugin_internal_plugin_internal_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go b/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..9fd179fdf723f49f88a0507a2644b04d2387d5dc --- /dev/null +++ b/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin-internal/plugin-internal.proto + +/* +Package plugin_internal is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin_internal + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_PluginInternalService_GetAvailablePlugins_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_PluginInternalService_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, client PluginInternalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginInternalService_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAvailablePlugins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_PluginInternalService_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, server PluginInternalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginInternalService_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAvailablePlugins(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginInternalServiceHandlerServer registers the http handlers for service PluginInternalService to "mux". +// UnaryRPC :call PluginInternalServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginInternalServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginInternalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginInternalServiceServer) error { + mux.Handle(http.MethodGet, pattern_PluginInternalService_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PluginInternalService_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginInternalService_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginInternalServiceHandlerFromEndpoint is same as RegisterPluginInternalServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginInternalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginInternalServiceHandler(ctx, mux, conn) +} + +// RegisterPluginInternalServiceHandler registers the http handlers for service PluginInternalService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginInternalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginInternalServiceHandlerClient(ctx, mux, NewPluginInternalServiceClient(conn)) +} + +// RegisterPluginInternalServiceHandlerClient registers the http handlers for service PluginInternalService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginInternalServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginInternalServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginInternalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginInternalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginInternalServiceClient) error { + mux.Handle(http.MethodGet, pattern_PluginInternalService_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PluginInternalService_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginInternalService_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_PluginInternalService_GetAvailablePlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"plugins"}, "")) +) + +var ( + forward_PluginInternalService_GetAvailablePlugins_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go b/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go index eaa452aa3746a888fadffccf2db1bc902fa42ad0..31b9539de4e7ef651500495fdea440a919ccb43c 100755 --- a/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go +++ b/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go @@ -20,8 +20,9 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - PluginInternalService_AvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins" - PluginInternalService_GetPluginSchema_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema" + PluginInternalService_AvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins" + PluginInternalService_GetPluginSchema_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema" + PluginInternalService_GetAvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins" ) // PluginInternalServiceClient is the client API for PluginInternalService service. @@ -30,6 +31,7 @@ const ( type PluginInternalServiceClient interface { AvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) GetPluginSchema(ctx context.Context, in *GetPluginSchemaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PluginSchemaPayload], error) + GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) } type pluginInternalServiceClient struct { @@ -69,12 +71,23 @@ func (c *pluginInternalServiceClient) GetPluginSchema(ctx context.Context, in *G // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type PluginInternalService_GetPluginSchemaClient = grpc.ServerStreamingClient[PluginSchemaPayload] +func (c *pluginInternalServiceClient) GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(plugin_registry.GetResponse) + err := c.cc.Invoke(ctx, PluginInternalService_GetAvailablePlugins_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // PluginInternalServiceServer is the server API for PluginInternalService service. // All implementations must embed UnimplementedPluginInternalServiceServer // for forward compatibility. type PluginInternalServiceServer interface { AvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) GetPluginSchema(*GetPluginSchemaRequest, grpc.ServerStreamingServer[PluginSchemaPayload]) error + GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) mustEmbedUnimplementedPluginInternalServiceServer() } @@ -91,6 +104,9 @@ func (UnimplementedPluginInternalServiceServer) AvailablePlugins(context.Context func (UnimplementedPluginInternalServiceServer) GetPluginSchema(*GetPluginSchemaRequest, grpc.ServerStreamingServer[PluginSchemaPayload]) error { return status.Errorf(codes.Unimplemented, "method GetPluginSchema not implemented") } +func (UnimplementedPluginInternalServiceServer) GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvailablePlugins not implemented") +} func (UnimplementedPluginInternalServiceServer) mustEmbedUnimplementedPluginInternalServiceServer() {} func (UnimplementedPluginInternalServiceServer) testEmbeddedByValue() {} @@ -141,6 +157,24 @@ func _PluginInternalService_GetPluginSchema_Handler(srv interface{}, stream grpc // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type PluginInternalService_GetPluginSchemaServer = grpc.ServerStreamingServer[PluginSchemaPayload] +func _PluginInternalService_GetAvailablePlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvailablePluginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginInternalServiceServer).GetAvailablePlugins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PluginInternalService_GetAvailablePlugins_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginInternalServiceServer).GetAvailablePlugins(ctx, req.(*GetAvailablePluginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PluginInternalService_ServiceDesc is the grpc.ServiceDesc for PluginInternalService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -152,6 +186,10 @@ var PluginInternalService_ServiceDesc = grpc.ServiceDesc{ MethodName: "AvailablePlugins", Handler: _PluginInternalService_AvailablePlugins_Handler, }, + { + MethodName: "GetAvailablePlugins", + Handler: _PluginInternalService_GetAvailablePlugins_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/go/gosdn/plugin-registry/plugin-registry.pb.go b/api/go/gosdn/plugin-registry/plugin-registry.pb.go index 7bb50e04f93410d2e07e82ca51f20fad30e29088..ed68537218fbe0112b7c14dec3f405d098a9b766 100755 --- a/api/go/gosdn/plugin-registry/plugin-registry.pb.go +++ b/api/go/gosdn/plugin-registry/plugin-registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin-registry/plugin-registry.proto @@ -8,11 +8,13 @@ package plugin_registry import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,12 +25,11 @@ const ( ) type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Query []*Query `protobuf:"bytes,2,rep,name=query,proto3" json:"query,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Query []*Query `protobuf:"bytes,2,rep,name=query,proto3" json:"query,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -76,11 +77,10 @@ func (x *GetRequest) GetQuery() []*Query { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -121,15 +121,14 @@ func (x *GetAllRequest) GetTimestamp() int64 { } type Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Identifier: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Identifier: // // *Query_Id // *Query_Name - Identifier isQuery_Identifier `protobuf_oneof:"identifier"` + Identifier isQuery_Identifier `protobuf_oneof:"identifier"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Query) Reset() { @@ -162,23 +161,27 @@ func (*Query) Descriptor() ([]byte, []int) { return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{2} } -func (m *Query) GetIdentifier() isQuery_Identifier { - if m != nil { - return m.Identifier +func (x *Query) GetIdentifier() isQuery_Identifier { + if x != nil { + return x.Identifier } return nil } func (x *Query) GetId() string { - if x, ok := x.GetIdentifier().(*Query_Id); ok { - return x.Id + if x != nil { + if x, ok := x.Identifier.(*Query_Id); ok { + return x.Id + } } return "" } func (x *Query) GetName() string { - if x, ok := x.GetIdentifier().(*Query_Name); ok { - return x.Name + if x != nil { + if x, ok := x.Identifier.(*Query_Name); ok { + return x.Name + } } return "" } @@ -200,12 +203,11 @@ func (*Query_Id) isQuery_Identifier() {} func (*Query_Name) isQuery_Identifier() {} type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -253,12 +255,11 @@ func (x *GetResponse) GetPlugins() []*Plugin { } type GetDownloadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDownloadRequest) Reset() { @@ -306,11 +307,10 @@ func (x *GetDownloadRequest) GetId() string { } type GetDownloadPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDownloadPayload) Reset() { @@ -351,12 +351,11 @@ func (x *GetDownloadPayload) GetChunk() []byte { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id []string `protobuf:"bytes,2,rep,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Id []string `protobuf:"bytes,2,rep,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -404,11 +403,10 @@ func (x *DeleteRequest) GetId() []string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -449,12 +447,11 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type Plugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Manifest *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Manifest *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Plugin) Reset() { @@ -502,14 +499,13 @@ func (x *Plugin) GetManifest() *Manifest { } type Manifest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Firmware string `protobuf:"bytes,2,opt,name=firmware,proto3" json:"firmware,omitempty"` + Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Firmware string `protobuf:"bytes,2,opt,name=firmware,proto3" json:"firmware,omitempty"` - Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Manifest) Reset() { @@ -570,9 +566,105 @@ func (x *Manifest) GetVersion() string { return "" } +type GetAvailablePluginsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsResponse) Reset() { + *x = GetAvailablePluginsResponse{} + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsResponse) ProtoMessage() {} + +func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{10} +} + +func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetAvailablePluginsResponse) GetPlugins() []*Plugin { + if x != nil { + return x.Plugins + } + return nil +} + +type GetAvailablePluginsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsRequest) Reset() { + *x = GetAvailablePluginsRequest{} + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsRequest) ProtoMessage() {} + +func (x *GetAvailablePluginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsRequest.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsRequest) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{11} +} + +func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + var File_gosdn_plugin_registry_plugin_registry_proto protoreflect.FileDescriptor -var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ +var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = string([]byte{ 0x0a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, @@ -581,55 +673,68 @@ var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x0a, 0x47, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3a, - 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x2d, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4d, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x64, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x4a, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x66, 0x0a, 0x0a, 0x47, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3a, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x2d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, + 0x6c, 0x6c, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x64, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x4a, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x45, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 0x0a, 0x0e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x55, 0x0a, 0x06, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x22, 0x6c, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, + 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x3a, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x45, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 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, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 0x0a, - 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x55, 0x0a, - 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x22, 0x6c, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x32, 0xf4, 0x02, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, + 0x6d, 0x70, 0x32, 0xf4, 0x02, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, @@ -657,50 +762,53 @@ var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_plugin_registry_plugin_registry_proto_rawDescOnce sync.Once - file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = file_gosdn_plugin_registry_plugin_registry_proto_rawDesc + file_gosdn_plugin_registry_plugin_registry_proto_rawDescData []byte ) func file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP() []byte { file_gosdn_plugin_registry_plugin_registry_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_registry_plugin_registry_proto_rawDescData) + file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc), len(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc))) }) return file_gosdn_plugin_registry_plugin_registry_proto_rawDescData } -var file_gosdn_plugin_registry_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_gosdn_plugin_registry_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_gosdn_plugin_registry_plugin_registry_proto_goTypes = []any{ - (*GetRequest)(nil), // 0: gosdn.plugin_registry.GetRequest - (*GetAllRequest)(nil), // 1: gosdn.plugin_registry.GetAllRequest - (*Query)(nil), // 2: gosdn.plugin_registry.Query - (*GetResponse)(nil), // 3: gosdn.plugin_registry.GetResponse - (*GetDownloadRequest)(nil), // 4: gosdn.plugin_registry.GetDownloadRequest - (*GetDownloadPayload)(nil), // 5: gosdn.plugin_registry.GetDownloadPayload - (*DeleteRequest)(nil), // 6: gosdn.plugin_registry.DeleteRequest - (*DeleteResponse)(nil), // 7: gosdn.plugin_registry.DeleteResponse - (*Plugin)(nil), // 8: gosdn.plugin_registry.Plugin - (*Manifest)(nil), // 9: gosdn.plugin_registry.Manifest + (*GetRequest)(nil), // 0: gosdn.plugin_registry.GetRequest + (*GetAllRequest)(nil), // 1: gosdn.plugin_registry.GetAllRequest + (*Query)(nil), // 2: gosdn.plugin_registry.Query + (*GetResponse)(nil), // 3: gosdn.plugin_registry.GetResponse + (*GetDownloadRequest)(nil), // 4: gosdn.plugin_registry.GetDownloadRequest + (*GetDownloadPayload)(nil), // 5: gosdn.plugin_registry.GetDownloadPayload + (*DeleteRequest)(nil), // 6: gosdn.plugin_registry.DeleteRequest + (*DeleteResponse)(nil), // 7: gosdn.plugin_registry.DeleteResponse + (*Plugin)(nil), // 8: gosdn.plugin_registry.Plugin + (*Manifest)(nil), // 9: gosdn.plugin_registry.Manifest + (*GetAvailablePluginsResponse)(nil), // 10: gosdn.plugin_registry.GetAvailablePluginsResponse + (*GetAvailablePluginsRequest)(nil), // 11: gosdn.plugin_registry.GetAvailablePluginsRequest } var file_gosdn_plugin_registry_plugin_registry_proto_depIdxs = []int32{ 2, // 0: gosdn.plugin_registry.GetRequest.query:type_name -> gosdn.plugin_registry.Query 8, // 1: gosdn.plugin_registry.GetResponse.plugins:type_name -> gosdn.plugin_registry.Plugin 9, // 2: gosdn.plugin_registry.Plugin.manifest:type_name -> gosdn.plugin_registry.Manifest - 0, // 3: gosdn.plugin_registry.PluginRegistryService.Get:input_type -> gosdn.plugin_registry.GetRequest - 1, // 4: gosdn.plugin_registry.PluginRegistryService.GetAll:input_type -> gosdn.plugin_registry.GetAllRequest - 4, // 5: gosdn.plugin_registry.PluginRegistryService.Download:input_type -> gosdn.plugin_registry.GetDownloadRequest - 6, // 6: gosdn.plugin_registry.PluginRegistryService.Delete:input_type -> gosdn.plugin_registry.DeleteRequest - 3, // 7: gosdn.plugin_registry.PluginRegistryService.Get:output_type -> gosdn.plugin_registry.GetResponse - 3, // 8: gosdn.plugin_registry.PluginRegistryService.GetAll:output_type -> gosdn.plugin_registry.GetResponse - 5, // 9: gosdn.plugin_registry.PluginRegistryService.Download:output_type -> gosdn.plugin_registry.GetDownloadPayload - 7, // 10: gosdn.plugin_registry.PluginRegistryService.Delete:output_type -> gosdn.plugin_registry.DeleteResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 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 + 8, // 3: gosdn.plugin_registry.GetAvailablePluginsResponse.plugins:type_name -> gosdn.plugin_registry.Plugin + 0, // 4: gosdn.plugin_registry.PluginRegistryService.Get:input_type -> gosdn.plugin_registry.GetRequest + 1, // 5: gosdn.plugin_registry.PluginRegistryService.GetAll:input_type -> gosdn.plugin_registry.GetAllRequest + 4, // 6: gosdn.plugin_registry.PluginRegistryService.Download:input_type -> gosdn.plugin_registry.GetDownloadRequest + 6, // 7: gosdn.plugin_registry.PluginRegistryService.Delete:input_type -> gosdn.plugin_registry.DeleteRequest + 3, // 8: gosdn.plugin_registry.PluginRegistryService.Get:output_type -> gosdn.plugin_registry.GetResponse + 3, // 9: gosdn.plugin_registry.PluginRegistryService.GetAll:output_type -> gosdn.plugin_registry.GetResponse + 5, // 10: gosdn.plugin_registry.PluginRegistryService.Download:output_type -> gosdn.plugin_registry.GetDownloadPayload + 7, // 11: gosdn.plugin_registry.PluginRegistryService.Delete:output_type -> gosdn.plugin_registry.DeleteResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_gosdn_plugin_registry_plugin_registry_proto_init() } @@ -716,9 +824,9 @@ func file_gosdn_plugin_registry_plugin_registry_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_registry_plugin_registry_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc), len(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc)), NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, @@ -727,7 +835,6 @@ func file_gosdn_plugin_registry_plugin_registry_proto_init() { MessageInfos: file_gosdn_plugin_registry_plugin_registry_proto_msgTypes, }.Build() File_gosdn_plugin_registry_plugin_registry_proto = out.File - file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = nil file_gosdn_plugin_registry_plugin_registry_proto_goTypes = nil file_gosdn_plugin_registry_plugin_registry_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go b/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..bd500348f4ed69ca673f7e0baa3375da080a7188 --- /dev/null +++ b/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin-registry/plugin-registry.proto + +/* +Package plugin_registry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin_registry + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_PluginRegistryService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_PluginRegistryService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client PluginRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginRegistryService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_PluginRegistryService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server PluginRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginRegistryService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAll(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginRegistryServiceHandlerServer registers the http handlers for service PluginRegistryService to "mux". +// UnaryRPC :call PluginRegistryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginRegistryServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginRegistryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginRegistryServiceServer) error { + mux.Handle(http.MethodGet, pattern_PluginRegistryService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin_registry.PluginRegistryService/GetAll", runtime.WithHTTPPathPattern("/plugins/here")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PluginRegistryService_GetAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginRegistryService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginRegistryServiceHandlerFromEndpoint is same as RegisterPluginRegistryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginRegistryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginRegistryServiceHandler(ctx, mux, conn) +} + +// RegisterPluginRegistryServiceHandler registers the http handlers for service PluginRegistryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginRegistryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginRegistryServiceHandlerClient(ctx, mux, NewPluginRegistryServiceClient(conn)) +} + +// RegisterPluginRegistryServiceHandlerClient registers the http handlers for service PluginRegistryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginRegistryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginRegistryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginRegistryServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginRegistryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginRegistryServiceClient) error { + mux.Handle(http.MethodGet, pattern_PluginRegistryService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin_registry.PluginRegistryService/GetAll", runtime.WithHTTPPathPattern("/plugins/here")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PluginRegistryService_GetAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginRegistryService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_PluginRegistryService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"plugins", "here"}, "")) +) + +var ( + forward_PluginRegistryService_GetAll_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin/plugin.pb.go b/api/go/gosdn/plugin/plugin.pb.go index 9193b62ace24201d367cb1c7f0d62dfb3b2a516e..27342526733a8ba07017b3c75ae81af91103d5d6 100755 --- a/api/go/gosdn/plugin/plugin.pb.go +++ b/api/go/gosdn/plugin/plugin.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin/plugin.proto @@ -9,11 +9,14 @@ package plugin import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" networkelement "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" + plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" gnmi "github.com/openconfig/gnmi/proto/gnmi" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,13 +27,12 @@ const ( ) type UnmarshalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UnmarshalRequest) Reset() { @@ -85,11 +87,10 @@ func (x *UnmarshalRequest) GetValue() *gnmi.TypedValue { } type UnmarshalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UnmarshalResponse) Reset() { @@ -130,12 +131,11 @@ func (x *UnmarshalResponse) GetValid() bool { } type SetNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetNodeRequest) Reset() { @@ -183,11 +183,10 @@ func (x *SetNodeRequest) GetValue() *gnmi.TypedValue { } type SetNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetNodeResponse) Reset() { @@ -228,12 +227,11 @@ func (x *SetNodeResponse) GetValid() bool { } type GetNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - RequestForIntendedState bool `protobuf:"varint,3,opt,name=requestForIntendedState,proto3" json:"requestForIntendedState,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + RequestForIntendedState bool `protobuf:"varint,3,opt,name=requestForIntendedState,proto3" json:"requestForIntendedState,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetNodeRequest) Reset() { @@ -281,11 +279,10 @@ func (x *GetNodeRequest) GetRequestForIntendedState() bool { } type GetNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nodes []*gnmi.Notification `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` unknownFields protoimpl.UnknownFields - - Nodes []*gnmi.Notification `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetNodeResponse) Reset() { @@ -326,11 +323,10 @@ func (x *GetNodeResponse) GetNodes() []*gnmi.Notification { } type DeleteNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteNodeRequest) Reset() { @@ -371,11 +367,10 @@ func (x *DeleteNodeRequest) GetPath() *gnmi.Path { } type DeleteNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteNodeResponse) Reset() { @@ -416,11 +411,10 @@ func (x *DeleteNodeResponse) GetValid() bool { } type ModelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FilterReadOnly bool `protobuf:"varint,1,opt,name=filterReadOnly,proto3" json:"filterReadOnly,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FilterReadOnly bool `protobuf:"varint,1,opt,name=filterReadOnly,proto3" json:"filterReadOnly,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ModelRequest) Reset() { @@ -461,11 +455,10 @@ func (x *ModelRequest) GetFilterReadOnly() bool { } type ModelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *ModelResponse) Reset() { @@ -506,12 +499,11 @@ func (x *ModelResponse) GetJson() []byte { } type DiffRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Original []byte `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` // JSON-encoded text per RFC7951. + Modified []byte `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Original []byte `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` // JSON-encoded text per RFC7951. - Modified []byte `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *DiffRequest) Reset() { @@ -559,11 +551,10 @@ func (x *DiffRequest) GetModified() []byte { } type DiffResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Notification *gnmi.Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"` unknownFields protoimpl.UnknownFields - - Notification *gnmi.Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DiffResponse) Reset() { @@ -604,13 +595,12 @@ func (x *DiffResponse) GetNotification() *gnmi.Notification { } type ValidateChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Operation networkelement.ApiOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=gosdn.networkelement.ApiOperation" json:"operation,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Operation networkelement.ApiOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=gosdn.networkelement.ApiOperation" json:"operation,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ValidateChangeRequest) Reset() { @@ -665,11 +655,10 @@ func (x *ValidateChangeRequest) GetValue() *gnmi.TypedValue { } type ValidateChangeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *ValidateChangeResponse) Reset() { @@ -710,11 +699,10 @@ func (x *ValidateChangeResponse) GetModel() []byte { } type PruneConfigFalseRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *PruneConfigFalseRequest) Reset() { @@ -755,11 +743,10 @@ func (x *PruneConfigFalseRequest) GetValue() []byte { } type PruneConfigFalseResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *PruneConfigFalseResponse) Reset() { @@ -800,9 +787,9 @@ func (x *PruneConfigFalseResponse) GetModel() []byte { } type SchemaTreeGzipRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SchemaTreeGzipRequest) Reset() { @@ -836,11 +823,10 @@ func (*SchemaTreeGzipRequest) Descriptor() ([]byte, []int) { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -880,9 +866,53 @@ func (x *Payload) GetChunk() []byte { return nil } +type GetAvailablePluginsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsRequest) Reset() { + *x = GetAvailablePluginsRequest{} + mi := &file_gosdn_plugin_plugin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsRequest) ProtoMessage() {} + +func (x *GetAvailablePluginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_plugin_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsRequest.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsRequest) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_plugin_proto_rawDescGZIP(), []int{18} +} + +func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + var File_gosdn_plugin_plugin_proto protoreflect.FileDescriptor -var file_gosdn_plugin_plugin_proto_rawDesc = []byte{ +var file_gosdn_plugin_plugin_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, @@ -890,188 +920,205 @@ var file_gosdn_plugin_plugin_proto_rawDesc = []byte{ 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x10, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, + 0x0a, 0x10, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, + 0x0a, 0x11, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x0e, 0x53, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x11, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x6c, 0x75, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x7a, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, + 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x68, - 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x22, 0x7a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x17, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, - 0x03, 0xc8, 0x01, 0x01, 0x52, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, - 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x6e, 0x6c, 0x79, 0x22, 0x23, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x08, 0x6d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, - 0x46, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x36, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, - 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, - 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x22, 0x37, 0x0a, 0x17, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x30, 0x0a, 0x18, - 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x3e, + 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x23, + 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, + 0x73, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x0c, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, + 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x17, - 0x0a, 0x15, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0xc8, 0x05, 0x0a, 0x06, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, - 0x65, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, - 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x10, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x61, 0x6c, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x37, + 0x0a, 0x17, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, - 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x22, 0x3a, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, + 0xad, 0x06, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x6e, + 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x44, + 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x23, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x10, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x32, 0x5a, 0x30, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, + 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( file_gosdn_plugin_plugin_proto_rawDescOnce sync.Once - file_gosdn_plugin_plugin_proto_rawDescData = file_gosdn_plugin_plugin_proto_rawDesc + file_gosdn_plugin_plugin_proto_rawDescData []byte ) func file_gosdn_plugin_plugin_proto_rawDescGZIP() []byte { file_gosdn_plugin_plugin_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_plugin_proto_rawDescData) + file_gosdn_plugin_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_plugin_proto_rawDesc), len(file_gosdn_plugin_plugin_proto_rawDesc))) }) return file_gosdn_plugin_plugin_proto_rawDescData } -var file_gosdn_plugin_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_gosdn_plugin_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_gosdn_plugin_plugin_proto_goTypes = []any{ - (*UnmarshalRequest)(nil), // 0: gosdn.plugin.UnmarshalRequest - (*UnmarshalResponse)(nil), // 1: gosdn.plugin.UnmarshalResponse - (*SetNodeRequest)(nil), // 2: gosdn.plugin.SetNodeRequest - (*SetNodeResponse)(nil), // 3: gosdn.plugin.SetNodeResponse - (*GetNodeRequest)(nil), // 4: gosdn.plugin.GetNodeRequest - (*GetNodeResponse)(nil), // 5: gosdn.plugin.GetNodeResponse - (*DeleteNodeRequest)(nil), // 6: gosdn.plugin.DeleteNodeRequest - (*DeleteNodeResponse)(nil), // 7: gosdn.plugin.DeleteNodeResponse - (*ModelRequest)(nil), // 8: gosdn.plugin.ModelRequest - (*ModelResponse)(nil), // 9: gosdn.plugin.ModelResponse - (*DiffRequest)(nil), // 10: gosdn.plugin.DiffRequest - (*DiffResponse)(nil), // 11: gosdn.plugin.DiffResponse - (*ValidateChangeRequest)(nil), // 12: gosdn.plugin.ValidateChangeRequest - (*ValidateChangeResponse)(nil), // 13: gosdn.plugin.ValidateChangeResponse - (*PruneConfigFalseRequest)(nil), // 14: gosdn.plugin.PruneConfigFalseRequest - (*PruneConfigFalseResponse)(nil), // 15: gosdn.plugin.PruneConfigFalseResponse - (*SchemaTreeGzipRequest)(nil), // 16: gosdn.plugin.SchemaTreeGzipRequest - (*Payload)(nil), // 17: gosdn.plugin.Payload - (*gnmi.Path)(nil), // 18: gnmi.Path - (*gnmi.TypedValue)(nil), // 19: gnmi.TypedValue - (*gnmi.Notification)(nil), // 20: gnmi.Notification - (networkelement.ApiOperation)(0), // 21: gosdn.networkelement.ApiOperation + (*UnmarshalRequest)(nil), // 0: gosdn.plugin.UnmarshalRequest + (*UnmarshalResponse)(nil), // 1: gosdn.plugin.UnmarshalResponse + (*SetNodeRequest)(nil), // 2: gosdn.plugin.SetNodeRequest + (*SetNodeResponse)(nil), // 3: gosdn.plugin.SetNodeResponse + (*GetNodeRequest)(nil), // 4: gosdn.plugin.GetNodeRequest + (*GetNodeResponse)(nil), // 5: gosdn.plugin.GetNodeResponse + (*DeleteNodeRequest)(nil), // 6: gosdn.plugin.DeleteNodeRequest + (*DeleteNodeResponse)(nil), // 7: gosdn.plugin.DeleteNodeResponse + (*ModelRequest)(nil), // 8: gosdn.plugin.ModelRequest + (*ModelResponse)(nil), // 9: gosdn.plugin.ModelResponse + (*DiffRequest)(nil), // 10: gosdn.plugin.DiffRequest + (*DiffResponse)(nil), // 11: gosdn.plugin.DiffResponse + (*ValidateChangeRequest)(nil), // 12: gosdn.plugin.ValidateChangeRequest + (*ValidateChangeResponse)(nil), // 13: gosdn.plugin.ValidateChangeResponse + (*PruneConfigFalseRequest)(nil), // 14: gosdn.plugin.PruneConfigFalseRequest + (*PruneConfigFalseResponse)(nil), // 15: gosdn.plugin.PruneConfigFalseResponse + (*SchemaTreeGzipRequest)(nil), // 16: gosdn.plugin.SchemaTreeGzipRequest + (*Payload)(nil), // 17: gosdn.plugin.Payload + (*GetAvailablePluginsRequest)(nil), // 18: gosdn.plugin.GetAvailablePluginsRequest + (*gnmi.Path)(nil), // 19: gnmi.Path + (*gnmi.TypedValue)(nil), // 20: gnmi.TypedValue + (*gnmi.Notification)(nil), // 21: gnmi.Notification + (networkelement.ApiOperation)(0), // 22: gosdn.networkelement.ApiOperation + (*plugin_registry.GetResponse)(nil), // 23: gosdn.plugin_registry.GetResponse } var file_gosdn_plugin_plugin_proto_depIdxs = []int32{ - 18, // 0: gosdn.plugin.UnmarshalRequest.path:type_name -> gnmi.Path - 19, // 1: gosdn.plugin.UnmarshalRequest.value:type_name -> gnmi.TypedValue - 18, // 2: gosdn.plugin.SetNodeRequest.path:type_name -> gnmi.Path - 19, // 3: gosdn.plugin.SetNodeRequest.value:type_name -> gnmi.TypedValue - 18, // 4: gosdn.plugin.GetNodeRequest.path:type_name -> gnmi.Path - 20, // 5: gosdn.plugin.GetNodeResponse.nodes:type_name -> gnmi.Notification - 18, // 6: gosdn.plugin.DeleteNodeRequest.path:type_name -> gnmi.Path - 20, // 7: gosdn.plugin.DiffResponse.notification:type_name -> gnmi.Notification - 21, // 8: gosdn.plugin.ValidateChangeRequest.operation:type_name -> gosdn.networkelement.ApiOperation - 18, // 9: gosdn.plugin.ValidateChangeRequest.path:type_name -> gnmi.Path - 19, // 10: gosdn.plugin.ValidateChangeRequest.value:type_name -> gnmi.TypedValue + 19, // 0: gosdn.plugin.UnmarshalRequest.path:type_name -> gnmi.Path + 20, // 1: gosdn.plugin.UnmarshalRequest.value:type_name -> gnmi.TypedValue + 19, // 2: gosdn.plugin.SetNodeRequest.path:type_name -> gnmi.Path + 20, // 3: gosdn.plugin.SetNodeRequest.value:type_name -> gnmi.TypedValue + 19, // 4: gosdn.plugin.GetNodeRequest.path:type_name -> gnmi.Path + 21, // 5: gosdn.plugin.GetNodeResponse.nodes:type_name -> gnmi.Notification + 19, // 6: gosdn.plugin.DeleteNodeRequest.path:type_name -> gnmi.Path + 21, // 7: gosdn.plugin.DiffResponse.notification:type_name -> gnmi.Notification + 22, // 8: gosdn.plugin.ValidateChangeRequest.operation:type_name -> gosdn.networkelement.ApiOperation + 19, // 9: gosdn.plugin.ValidateChangeRequest.path:type_name -> gnmi.Path + 20, // 10: gosdn.plugin.ValidateChangeRequest.value:type_name -> gnmi.TypedValue 0, // 11: gosdn.plugin.Plugin.Unmarshal:input_type -> gosdn.plugin.UnmarshalRequest 2, // 12: gosdn.plugin.Plugin.SetNode:input_type -> gosdn.plugin.SetNodeRequest 4, // 13: gosdn.plugin.Plugin.GetNode:input_type -> gosdn.plugin.GetNodeRequest @@ -1081,17 +1128,19 @@ var file_gosdn_plugin_plugin_proto_depIdxs = []int32{ 16, // 17: gosdn.plugin.Plugin.SchemaTreeGzip:input_type -> gosdn.plugin.SchemaTreeGzipRequest 12, // 18: gosdn.plugin.Plugin.ValidateChange:input_type -> gosdn.plugin.ValidateChangeRequest 14, // 19: gosdn.plugin.Plugin.PruneConfigFalse:input_type -> gosdn.plugin.PruneConfigFalseRequest - 1, // 20: gosdn.plugin.Plugin.Unmarshal:output_type -> gosdn.plugin.UnmarshalResponse - 3, // 21: gosdn.plugin.Plugin.SetNode:output_type -> gosdn.plugin.SetNodeResponse - 5, // 22: gosdn.plugin.Plugin.GetNode:output_type -> gosdn.plugin.GetNodeResponse - 7, // 23: gosdn.plugin.Plugin.DeleteNode:output_type -> gosdn.plugin.DeleteNodeResponse - 9, // 24: gosdn.plugin.Plugin.Model:output_type -> gosdn.plugin.ModelResponse - 11, // 25: gosdn.plugin.Plugin.Diff:output_type -> gosdn.plugin.DiffResponse - 17, // 26: gosdn.plugin.Plugin.SchemaTreeGzip:output_type -> gosdn.plugin.Payload - 13, // 27: gosdn.plugin.Plugin.ValidateChange:output_type -> gosdn.plugin.ValidateChangeResponse - 15, // 28: gosdn.plugin.Plugin.PruneConfigFalse:output_type -> gosdn.plugin.PruneConfigFalseResponse - 20, // [20:29] is the sub-list for method output_type - 11, // [11:20] is the sub-list for method input_type + 18, // 20: gosdn.plugin.Plugin.GetAvailablePlugins:input_type -> gosdn.plugin.GetAvailablePluginsRequest + 1, // 21: gosdn.plugin.Plugin.Unmarshal:output_type -> gosdn.plugin.UnmarshalResponse + 3, // 22: gosdn.plugin.Plugin.SetNode:output_type -> gosdn.plugin.SetNodeResponse + 5, // 23: gosdn.plugin.Plugin.GetNode:output_type -> gosdn.plugin.GetNodeResponse + 7, // 24: gosdn.plugin.Plugin.DeleteNode:output_type -> gosdn.plugin.DeleteNodeResponse + 9, // 25: gosdn.plugin.Plugin.Model:output_type -> gosdn.plugin.ModelResponse + 11, // 26: gosdn.plugin.Plugin.Diff:output_type -> gosdn.plugin.DiffResponse + 17, // 27: gosdn.plugin.Plugin.SchemaTreeGzip:output_type -> gosdn.plugin.Payload + 13, // 28: gosdn.plugin.Plugin.ValidateChange:output_type -> gosdn.plugin.ValidateChangeResponse + 15, // 29: gosdn.plugin.Plugin.PruneConfigFalse:output_type -> gosdn.plugin.PruneConfigFalseResponse + 23, // 30: gosdn.plugin.Plugin.GetAvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 21, // [21:31] is the sub-list for method output_type + 11, // [11:21] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name @@ -1106,9 +1155,9 @@ func file_gosdn_plugin_plugin_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_plugin_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_plugin_proto_rawDesc), len(file_gosdn_plugin_plugin_proto_rawDesc)), NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, @@ -1117,7 +1166,6 @@ func file_gosdn_plugin_plugin_proto_init() { MessageInfos: file_gosdn_plugin_plugin_proto_msgTypes, }.Build() File_gosdn_plugin_plugin_proto = out.File - file_gosdn_plugin_plugin_proto_rawDesc = nil file_gosdn_plugin_plugin_proto_goTypes = nil file_gosdn_plugin_plugin_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin/plugin.pb.gw.go b/api/go/gosdn/plugin/plugin.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..745f6caddb5b793e5366230c419b3146a0179dbc --- /dev/null +++ b/api/go/gosdn/plugin/plugin.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin/plugin.proto + +/* +Package plugin is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_Plugin_GetAvailablePlugins_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_Plugin_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, client PluginClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Plugin_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAvailablePlugins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Plugin_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, server PluginServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Plugin_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAvailablePlugins(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginHandlerServer registers the http handlers for service Plugin to "mux". +// UnaryRPC :call PluginServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginServer) error { + mux.Handle(http.MethodGet, pattern_Plugin_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin.Plugin/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins/plugin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Plugin_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Plugin_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginHandlerFromEndpoint is same as RegisterPluginHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginHandler(ctx, mux, conn) +} + +// RegisterPluginHandler registers the http handlers for service Plugin to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginHandlerClient(ctx, mux, NewPluginClient(conn)) +} + +// RegisterPluginHandlerClient registers the http handlers for service Plugin +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginClient) error { + mux.Handle(http.MethodGet, pattern_Plugin_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin.Plugin/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins/plugin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Plugin_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Plugin_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_Plugin_GetAvailablePlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"plugins", "plugin"}, "")) +) + +var ( + forward_Plugin_GetAvailablePlugins_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin/plugin_grpc.pb.go b/api/go/gosdn/plugin/plugin_grpc.pb.go index e524b8c4bc2dad4a123d8fd5756c3424320a3427..ec194d82da166cef9fd0e4ffb0a7d404bf10a15d 100755 --- a/api/go/gosdn/plugin/plugin_grpc.pb.go +++ b/api/go/gosdn/plugin/plugin_grpc.pb.go @@ -7,6 +7,7 @@ package plugin import ( + plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -19,15 +20,16 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Plugin_Unmarshal_FullMethodName = "/gosdn.plugin.Plugin/Unmarshal" - Plugin_SetNode_FullMethodName = "/gosdn.plugin.Plugin/SetNode" - Plugin_GetNode_FullMethodName = "/gosdn.plugin.Plugin/GetNode" - Plugin_DeleteNode_FullMethodName = "/gosdn.plugin.Plugin/DeleteNode" - Plugin_Model_FullMethodName = "/gosdn.plugin.Plugin/Model" - Plugin_Diff_FullMethodName = "/gosdn.plugin.Plugin/Diff" - Plugin_SchemaTreeGzip_FullMethodName = "/gosdn.plugin.Plugin/SchemaTreeGzip" - Plugin_ValidateChange_FullMethodName = "/gosdn.plugin.Plugin/ValidateChange" - Plugin_PruneConfigFalse_FullMethodName = "/gosdn.plugin.Plugin/PruneConfigFalse" + Plugin_Unmarshal_FullMethodName = "/gosdn.plugin.Plugin/Unmarshal" + Plugin_SetNode_FullMethodName = "/gosdn.plugin.Plugin/SetNode" + Plugin_GetNode_FullMethodName = "/gosdn.plugin.Plugin/GetNode" + Plugin_DeleteNode_FullMethodName = "/gosdn.plugin.Plugin/DeleteNode" + Plugin_Model_FullMethodName = "/gosdn.plugin.Plugin/Model" + Plugin_Diff_FullMethodName = "/gosdn.plugin.Plugin/Diff" + Plugin_SchemaTreeGzip_FullMethodName = "/gosdn.plugin.Plugin/SchemaTreeGzip" + Plugin_ValidateChange_FullMethodName = "/gosdn.plugin.Plugin/ValidateChange" + Plugin_PruneConfigFalse_FullMethodName = "/gosdn.plugin.Plugin/PruneConfigFalse" + Plugin_GetAvailablePlugins_FullMethodName = "/gosdn.plugin.Plugin/GetAvailablePlugins" ) // PluginClient is the client API for Plugin service. @@ -43,6 +45,7 @@ type PluginClient interface { SchemaTreeGzip(ctx context.Context, in *SchemaTreeGzipRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Payload], error) ValidateChange(ctx context.Context, in *ValidateChangeRequest, opts ...grpc.CallOption) (*ValidateChangeResponse, error) PruneConfigFalse(ctx context.Context, in *PruneConfigFalseRequest, opts ...grpc.CallOption) (*PruneConfigFalseResponse, error) + GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) } type pluginClient struct { @@ -152,6 +155,16 @@ func (c *pluginClient) PruneConfigFalse(ctx context.Context, in *PruneConfigFals return out, nil } +func (c *pluginClient) GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(plugin_registry.GetResponse) + err := c.cc.Invoke(ctx, Plugin_GetAvailablePlugins_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // PluginServer is the server API for Plugin service. // All implementations must embed UnimplementedPluginServer // for forward compatibility. @@ -165,6 +178,7 @@ type PluginServer interface { SchemaTreeGzip(*SchemaTreeGzipRequest, grpc.ServerStreamingServer[Payload]) error ValidateChange(context.Context, *ValidateChangeRequest) (*ValidateChangeResponse, error) PruneConfigFalse(context.Context, *PruneConfigFalseRequest) (*PruneConfigFalseResponse, error) + GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) mustEmbedUnimplementedPluginServer() } @@ -202,6 +216,9 @@ func (UnimplementedPluginServer) ValidateChange(context.Context, *ValidateChange func (UnimplementedPluginServer) PruneConfigFalse(context.Context, *PruneConfigFalseRequest) (*PruneConfigFalseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneConfigFalse not implemented") } +func (UnimplementedPluginServer) GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvailablePlugins not implemented") +} func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {} func (UnimplementedPluginServer) testEmbeddedByValue() {} @@ -378,6 +395,24 @@ func _Plugin_PruneConfigFalse_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Plugin_GetAvailablePlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvailablePluginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginServer).GetAvailablePlugins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Plugin_GetAvailablePlugins_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginServer).GetAvailablePlugins(ctx, req.(*GetAvailablePluginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -417,6 +452,10 @@ var Plugin_ServiceDesc = grpc.ServiceDesc{ MethodName: "PruneConfigFalse", Handler: _Plugin_PruneConfigFalse_Handler, }, + { + MethodName: "GetAvailablePlugins", + Handler: _Plugin_GetAvailablePlugins_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/go/gosdn/pnd/pnd.pb.go b/api/go/gosdn/pnd/pnd.pb.go index 16f5b733deeeeb8eb78537bb099a6ffa2090a5b4..71b33fdd0938f6b0da016056817d5d4cf610e276 100755 --- a/api/go/gosdn/pnd/pnd.pb.go +++ b/api/go/gosdn/pnd/pnd.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/pnd/pnd.proto @@ -17,6 +17,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -27,13 +28,12 @@ const ( ) type PrincipalNetworkDomain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PrincipalNetworkDomain) Reset() { @@ -88,12 +88,11 @@ func (x *PrincipalNetworkDomain) GetDescription() string { } type GetPndRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPndRequest) Reset() { @@ -141,12 +140,11 @@ func (x *GetPndRequest) GetPid() string { } type GetPndResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPndResponse) Reset() { @@ -194,11 +192,10 @@ func (x *GetPndResponse) GetPnd() *PrincipalNetworkDomain { } type GetPndListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *GetPndListRequest) Reset() { @@ -239,12 +236,11 @@ func (x *GetPndListRequest) GetTimestamp() int64 { } type GetPndListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pnd []*PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPndListResponse) Reset() { @@ -292,12 +288,11 @@ func (x *GetPndListResponse) GetPnd() []*PrincipalNetworkDomain { } type CreatePndListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*PndCreateProperties `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pnd []*PndCreateProperties `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreatePndListRequest) Reset() { @@ -345,12 +340,11 @@ func (x *CreatePndListRequest) GetPnd() []*PndCreateProperties { } type PndCreateProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 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"` + sizeCache protoimpl.SizeCache } func (x *PndCreateProperties) Reset() { @@ -398,11 +392,10 @@ func (x *PndCreateProperties) GetDescription() string { } type CreatePndListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *CreatePndListResponse) Reset() { @@ -443,12 +436,11 @@ func (x *CreatePndListResponse) GetTimestamp() int64 { } type DeletePndRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeletePndRequest) Reset() { @@ -496,11 +488,10 @@ func (x *DeletePndRequest) GetPid() string { } type DeletePndResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeletePndResponse) Reset() { @@ -542,7 +533,7 @@ func (x *DeletePndResponse) GetTimestamp() int64 { var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor -var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ +var file_gosdn_pnd_pnd_proto_rawDesc = string([]byte{ 0x0a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, @@ -653,16 +644,16 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 ( file_gosdn_pnd_pnd_proto_rawDescOnce sync.Once - file_gosdn_pnd_pnd_proto_rawDescData = file_gosdn_pnd_pnd_proto_rawDesc + file_gosdn_pnd_pnd_proto_rawDescData []byte ) func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte { file_gosdn_pnd_pnd_proto_rawDescOnce.Do(func() { - file_gosdn_pnd_pnd_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_pnd_pnd_proto_rawDescData) + file_gosdn_pnd_pnd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_pnd_pnd_proto_rawDesc), len(file_gosdn_pnd_pnd_proto_rawDesc))) }) return file_gosdn_pnd_pnd_proto_rawDescData } @@ -708,7 +699,7 @@ func file_gosdn_pnd_pnd_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_pnd_pnd_proto_rawDesc), len(file_gosdn_pnd_pnd_proto_rawDesc)), NumEnums: 0, NumMessages: 10, NumExtensions: 0, @@ -719,7 +710,6 @@ func file_gosdn_pnd_pnd_proto_init() { MessageInfos: file_gosdn_pnd_pnd_proto_msgTypes, }.Build() File_gosdn_pnd_pnd_proto = out.File - file_gosdn_pnd_pnd_proto_rawDesc = nil file_gosdn_pnd_pnd_proto_goTypes = nil file_gosdn_pnd_pnd_proto_depIdxs = nil } diff --git a/api/go/gosdn/pnd/pnd.pb.gw.go b/api/go/gosdn/pnd/pnd.pb.gw.go index 6aace9934260aae883dfaaa34035d355f7a5d95c..7ea08d765b8a059ce77ecde55d9b8130e8de0c5d 100755 --- a/api/go/gosdn/pnd/pnd.pb.gw.go +++ b/api/go/gosdn/pnd/pnd.pb.gw.go @@ -10,6 +10,7 @@ package pnd import ( "context" + "errors" "io" "net/http" @@ -24,213 +25,170 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_PndService_GetPnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndRequest - var metadata runtime.ServerMetadata +var filter_PndService_GetPnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +func request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - val string - ok bool - err error - _ = err + protoReq GetPndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPnd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPnd(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PndService_GetPndList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_PndService_GetPndList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_PndService_GetPndList_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPndListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPndList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPndList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_GetPndList_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPndListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPndList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPndList(ctx, &protoReq) return msg, metadata, err - } func request_PndService_CreatePndList_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePndListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePndListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreatePndList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_CreatePndList_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePndListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePndListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePndList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PndService_DeletePnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_PndService_DeletePnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_DeletePnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePnd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_DeletePnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePnd(ctx, &protoReq) return msg, metadata, err - } // RegisterPndServiceHandlerServer registers the http handlers for service PndService to "mux". @@ -239,16 +197,13 @@ func local_request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPndServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PndServiceServer) error { - - mux.Handle("GET", pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -260,20 +215,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -285,20 +235,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -310,20 +255,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_CreatePndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -335,9 +275,7 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_DeletePnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -364,7 +302,6 @@ func RegisterPndServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser } }() }() - return RegisterPndServiceHandler(ctx, mux, conn) } @@ -380,14 +317,11 @@ func RegisterPndServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PndServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PndServiceClient) error { - - mux.Handle("GET", pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -398,18 +332,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -420,18 +349,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -442,18 +366,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_CreatePndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -464,30 +383,21 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_DeletePnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_PndService_GetPnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnd", "pid"}, "")) - - pattern_PndService_GetPndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) - + pattern_PndService_GetPnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnd", "pid"}, "")) + pattern_PndService_GetPndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) pattern_PndService_CreatePndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) - - pattern_PndService_DeletePnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnds", "pid"}, "")) + pattern_PndService_DeletePnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnds", "pid"}, "")) ) var ( - forward_PndService_GetPnd_0 = runtime.ForwardResponseMessage - - forward_PndService_GetPndList_0 = runtime.ForwardResponseMessage - + forward_PndService_GetPnd_0 = runtime.ForwardResponseMessage + forward_PndService_GetPndList_0 = runtime.ForwardResponseMessage forward_PndService_CreatePndList_0 = runtime.ForwardResponseMessage - - forward_PndService_DeletePnd_0 = runtime.ForwardResponseMessage + forward_PndService_DeletePnd_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/rbac.pb.go b/api/go/gosdn/rbac/rbac.pb.go index 0a98e9ecf9d11c0e3ee670b5bf06bba3aa16daaf..29e570c590d71fcdddf038d7c32bb70fc51d7feb 100755 --- a/api/go/gosdn/rbac/rbac.pb.go +++ b/api/go/gosdn/rbac/rbac.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/rbac.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,13 +27,12 @@ const ( // Login type LoginRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LoginRequest) Reset() { @@ -87,12 +87,11 @@ func (x *LoginRequest) GetPwd() string { } type LoginResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LoginResponse) Reset() { @@ -141,12 +140,11 @@ func (x *LoginResponse) GetToken() string { // Logout type LogoutRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogoutRequest) Reset() { @@ -194,11 +192,10 @@ func (x *LogoutRequest) GetUsername() string { } type LogoutResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogoutResponse) Reset() { @@ -240,7 +237,7 @@ func (x *LogoutResponse) GetTimestamp() int64 { var File_gosdn_rbac_rbac_proto protoreflect.FileDescriptor -var file_gosdn_rbac_rbac_proto_rawDesc = []byte{ +var file_gosdn_rbac_rbac_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -287,16 +284,16 @@ var file_gosdn_rbac_rbac_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_rbac_proto_rawDescOnce sync.Once - file_gosdn_rbac_rbac_proto_rawDescData = file_gosdn_rbac_rbac_proto_rawDesc + file_gosdn_rbac_rbac_proto_rawDescData []byte ) func file_gosdn_rbac_rbac_proto_rawDescGZIP() []byte { file_gosdn_rbac_rbac_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_rbac_proto_rawDescData) + file_gosdn_rbac_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_rbac_proto_rawDesc), len(file_gosdn_rbac_rbac_proto_rawDesc))) }) return file_gosdn_rbac_rbac_proto_rawDescData } @@ -329,7 +326,7 @@ func file_gosdn_rbac_rbac_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_rbac_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_rbac_proto_rawDesc), len(file_gosdn_rbac_rbac_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -340,7 +337,6 @@ func file_gosdn_rbac_rbac_proto_init() { MessageInfos: file_gosdn_rbac_rbac_proto_msgTypes, }.Build() File_gosdn_rbac_rbac_proto = out.File - file_gosdn_rbac_rbac_proto_rawDesc = nil file_gosdn_rbac_rbac_proto_goTypes = nil file_gosdn_rbac_rbac_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/rbac.pb.gw.go b/api/go/gosdn/rbac/rbac.pb.gw.go index 46167531eee76ea0c7ab625884059450dbab5fce..6a89867f048017c68a001f27a26b56a88bd04787 100755 --- a/api/go/gosdn/rbac/rbac.pb.gw.go +++ b/api/go/gosdn/rbac/rbac.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,107 +25,88 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AuthService_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoginRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq LoginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_Login_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoginRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq LoginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Login(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AuthService_Logout_0 = &utilities.DoubleArray{Encoding: map[string]int{"username": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_AuthService_Logout_0 = &utilities.DoubleArray{Encoding: map[string]int{"username": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_AuthService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LogoutRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq LogoutRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["username"] + val, ok := pathParams["username"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "username") } - protoReq.Username, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "username", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Logout_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LogoutRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq LogoutRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["username"] + val, ok := pathParams["username"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "username") } - protoReq.Username, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "username", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Logout_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Logout(ctx, &protoReq) return msg, metadata, err - } // RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". @@ -133,16 +115,13 @@ func local_request_AuthService_Logout_0(ctx context.Context, marshaler runtime.M // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { - - mux.Handle("POST", pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -154,20 +133,15 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -179,9 +153,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -208,7 +180,6 @@ func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterAuthServiceHandler(ctx, mux, conn) } @@ -224,14 +195,11 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { - - mux.Handle("POST", pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -242,18 +210,13 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -264,22 +227,17 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "")) - + pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "")) pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"logout", "username"}, "")) ) var ( - forward_AuthService_Login_0 = runtime.ForwardResponseMessage - + forward_AuthService_Login_0 = runtime.ForwardResponseMessage forward_AuthService_Logout_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/role.pb.go b/api/go/gosdn/rbac/role.pb.go index aacf290351003d487122d6357352395cfa735ea6..66c89c2f788f9fbcfd1b9dde7deec3ad70a002f5 100755 --- a/api/go/gosdn/rbac/role.pb.go +++ b/api/go/gosdn/rbac/role.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/role.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,14 +26,13 @@ const ( ) type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Role) Reset() { @@ -95,12 +95,11 @@ func (x *Role) GetPermissions() []string { // CreateRoles type CreateRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateRolesRequest) Reset() { @@ -148,11 +147,10 @@ func (x *CreateRolesRequest) GetRoles() []*Role { } type CreateRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateRolesResponse) Reset() { @@ -194,13 +192,12 @@ func (x *CreateRolesResponse) GetTimestamp() int64 { // GetRole type GetRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoleRequest) Reset() { @@ -255,12 +252,11 @@ func (x *GetRoleRequest) GetId() string { } type GetRoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoleResponse) Reset() { @@ -309,11 +305,10 @@ func (x *GetRoleResponse) GetRole() *Role { // GetRoles type GetRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRolesRequest) Reset() { @@ -354,12 +349,11 @@ func (x *GetRolesRequest) GetTimestamp() int64 { } type GetRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRolesResponse) Reset() { @@ -408,12 +402,11 @@ func (x *GetRolesResponse) GetRoles() []*Role { // UpdateRoles type UpdateRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateRolesRequest) Reset() { @@ -461,11 +454,10 @@ func (x *UpdateRolesRequest) GetRoles() []*Role { } type UpdateRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateRolesResponse) Reset() { @@ -507,13 +499,12 @@ func (x *UpdateRolesResponse) GetTimestamp() int64 { // DeletePermissionsForRole type DeletePermissionsForRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - PermissionsToDelete []string `protobuf:"bytes,3,rep,name=permissions_to_delete,json=permissionsToDelete,proto3" json:"permissions_to_delete,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + PermissionsToDelete []string `protobuf:"bytes,3,rep,name=permissions_to_delete,json=permissionsToDelete,proto3" json:"permissions_to_delete,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePermissionsForRoleRequest) Reset() { @@ -568,11 +559,10 @@ func (x *DeletePermissionsForRoleRequest) GetPermissionsToDelete() []string { } type DeletePermissionsForRoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeletePermissionsForRoleResponse) Reset() { @@ -614,12 +604,11 @@ func (x *DeletePermissionsForRoleResponse) GetTimestamp() int64 { // DeleteRoles type DeleteRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName []string `protobuf:"bytes,2,rep,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName []string `protobuf:"bytes,2,rep,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRolesRequest) Reset() { @@ -667,11 +656,10 @@ func (x *DeleteRolesRequest) GetRoleName() []string { } type DeleteRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRolesResponse) Reset() { @@ -713,7 +701,7 @@ func (x *DeleteRolesResponse) GetTimestamp() int64 { var File_gosdn_rbac_role_proto protoreflect.FileDescriptor -var file_gosdn_rbac_role_proto_rawDesc = []byte{ +var file_gosdn_rbac_role_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -842,16 +830,16 @@ var file_gosdn_rbac_role_proto_rawDesc = []byte{ 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_role_proto_rawDescOnce sync.Once - file_gosdn_rbac_role_proto_rawDescData = file_gosdn_rbac_role_proto_rawDesc + file_gosdn_rbac_role_proto_rawDescData []byte ) func file_gosdn_rbac_role_proto_rawDescGZIP() []byte { file_gosdn_rbac_role_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_role_proto_rawDescData) + file_gosdn_rbac_role_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_role_proto_rawDesc), len(file_gosdn_rbac_role_proto_rawDesc))) }) return file_gosdn_rbac_role_proto_rawDescData } @@ -906,7 +894,7 @@ func file_gosdn_rbac_role_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_role_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_role_proto_rawDesc), len(file_gosdn_rbac_role_proto_rawDesc)), NumEnums: 0, NumMessages: 13, NumExtensions: 0, @@ -917,7 +905,6 @@ func file_gosdn_rbac_role_proto_init() { MessageInfos: file_gosdn_rbac_role_proto_msgTypes, }.Build() File_gosdn_rbac_role_proto = out.File - file_gosdn_rbac_role_proto_rawDesc = nil file_gosdn_rbac_role_proto_goTypes = nil file_gosdn_rbac_role_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/role.pb.gw.go b/api/go/gosdn/rbac/role.pb.gw.go index 454fe45f0561e8c731b87bf7b7184886f710cc3a..a30fb131d0f59e25d35c58fb4b23b9885fb110d5 100755 --- a/api/go/gosdn/rbac/role.pb.gw.go +++ b/api/go/gosdn/rbac/role.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,207 +25,190 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RoleService_CreateRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_CreateRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRoles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_GetRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_GetRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRoles(ctx, &protoReq) return msg, metadata, err - } func request_RoleService_UpdateRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_UpdateRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateRoles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_DeletePermissionsForRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_DeletePermissionsForRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_DeletePermissionsForRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePermissionsForRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeletePermissionsForRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeletePermissionsForRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePermissionsForRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_DeletePermissionsForRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePermissionsForRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeletePermissionsForRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeletePermissionsForRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePermissionsForRole(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_DeleteRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_DeleteRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeleteRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeleteRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRoles(ctx, &protoReq) return msg, metadata, err - } // RegisterRoleServiceHandlerServer registers the http handlers for service RoleService to "mux". @@ -233,16 +217,13 @@ func local_request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoleServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServiceServer) error { - - mux.Handle("POST", pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -254,20 +235,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_CreateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -279,20 +255,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -304,20 +275,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -329,20 +295,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_UpdateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -354,20 +315,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeletePermissionsForRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -379,9 +335,7 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeleteRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -408,7 +362,6 @@ func RegisterRoleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterRoleServiceHandler(ctx, mux, conn) } @@ -424,14 +377,11 @@ func RegisterRoleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoleServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleServiceClient) error { - - mux.Handle("POST", pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -442,18 +392,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_CreateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -464,18 +409,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -486,18 +426,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -508,18 +443,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_UpdateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -530,18 +460,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeletePermissionsForRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -552,38 +477,25 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeleteRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_RoleService_CreateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "create"}, "")) - - pattern_RoleService_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "get"}, "")) - - pattern_RoleService_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"roles"}, "")) - - pattern_RoleService_UpdateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "update"}, "")) - + pattern_RoleService_CreateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "create"}, "")) + pattern_RoleService_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "get"}, "")) + pattern_RoleService_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"roles"}, "")) + pattern_RoleService_UpdateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "update"}, "")) pattern_RoleService_DeletePermissionsForRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roles", "delete", "permissions"}, "")) - - pattern_RoleService_DeleteRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "delete"}, "")) + pattern_RoleService_DeleteRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "delete"}, "")) ) var ( - forward_RoleService_CreateRoles_0 = runtime.ForwardResponseMessage - - forward_RoleService_GetRole_0 = runtime.ForwardResponseMessage - - forward_RoleService_GetRoles_0 = runtime.ForwardResponseMessage - - forward_RoleService_UpdateRoles_0 = runtime.ForwardResponseMessage - + forward_RoleService_CreateRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_GetRole_0 = runtime.ForwardResponseMessage + forward_RoleService_GetRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_UpdateRoles_0 = runtime.ForwardResponseMessage forward_RoleService_DeletePermissionsForRole_0 = runtime.ForwardResponseMessage - - forward_RoleService_DeleteRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_DeleteRoles_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/user.pb.go b/api/go/gosdn/rbac/user.pb.go index 6c5c74f57c66e20cd6205862dcdeceb5caa0a174..6c413ce8c63e0b7898c44ea9347a02742cc96022 100755 --- a/api/go/gosdn/rbac/user.pb.go +++ b/api/go/gosdn/rbac/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/user.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,16 +27,15 @@ const ( ) type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Key = pnd uuid, value= role name + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Key = pnd uuid, value= role name - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *User) Reset() { @@ -111,16 +111,15 @@ func (x *User) GetMetadata() *conflict.Metadata { } type UpdateUser struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Key = pnd uuid, value= role name + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Key = pnd uuid, value= role name - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUser) Reset() { @@ -197,12 +196,11 @@ func (x *UpdateUser) GetMetadata() *conflict.Metadata { // CreateUsers type CreateUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateUsersRequest) Reset() { @@ -250,11 +248,10 @@ func (x *CreateUsersRequest) GetUser() []*User { } type CreateUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateUsersResponse) Reset() { @@ -296,13 +293,12 @@ func (x *CreateUsersResponse) GetTimestamp() int64 { // GetUser type GetUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // TODO(faseid): reconsider if this is necessary as required, but id is not? + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // TODO(faseid): reconsider if this is necessary as required, but id is not? - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUserRequest) Reset() { @@ -357,12 +353,11 @@ func (x *GetUserRequest) GetId() string { } type GetUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUserResponse) Reset() { @@ -411,11 +406,10 @@ func (x *GetUserResponse) GetUser() *User { // GetUsers type GetUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUsersRequest) Reset() { @@ -456,12 +450,11 @@ func (x *GetUsersRequest) GetTimestamp() int64 { } type GetUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUsersResponse) Reset() { @@ -510,12 +503,11 @@ func (x *GetUsersResponse) GetUser() []*User { // UpdateUsers type UpdateUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*UpdateUser `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*UpdateUser `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUsersRequest) Reset() { @@ -563,11 +555,10 @@ func (x *UpdateUsersRequest) GetUser() []*UpdateUser { } type UpdateUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUsersResponse) Reset() { @@ -609,12 +600,11 @@ func (x *UpdateUsersResponse) GetTimestamp() int64 { // DeleteUsers type DeleteUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username []string `protobuf:"bytes,2,rep,name=username,proto3" json:"username,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username []string `protobuf:"bytes,2,rep,name=username,proto3" json:"username,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteUsersRequest) Reset() { @@ -662,11 +652,10 @@ func (x *DeleteUsersRequest) GetUsername() []string { } type DeleteUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteUsersResponse) Reset() { @@ -708,7 +697,7 @@ func (x *DeleteUsersResponse) GetTimestamp() int64 { var File_gosdn_rbac_user_proto protoreflect.FileDescriptor -var file_gosdn_rbac_user_proto_rawDesc = []byte{ +var file_gosdn_rbac_user_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -841,16 +830,16 @@ var file_gosdn_rbac_user_proto_rawDesc = []byte{ 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_user_proto_rawDescOnce sync.Once - file_gosdn_rbac_user_proto_rawDescData = file_gosdn_rbac_user_proto_rawDesc + file_gosdn_rbac_user_proto_rawDescData []byte ) func file_gosdn_rbac_user_proto_rawDescGZIP() []byte { file_gosdn_rbac_user_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_user_proto_rawDescData) + file_gosdn_rbac_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_user_proto_rawDesc), len(file_gosdn_rbac_user_proto_rawDesc))) }) return file_gosdn_rbac_user_proto_rawDescData } @@ -909,7 +898,7 @@ func file_gosdn_rbac_user_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_user_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_user_proto_rawDesc), len(file_gosdn_rbac_user_proto_rawDesc)), NumEnums: 0, NumMessages: 14, NumExtensions: 0, @@ -920,7 +909,6 @@ func file_gosdn_rbac_user_proto_init() { MessageInfos: file_gosdn_rbac_user_proto_msgTypes, }.Build() File_gosdn_rbac_user_proto = out.File - file_gosdn_rbac_user_proto_rawDesc = nil file_gosdn_rbac_user_proto_goTypes = nil file_gosdn_rbac_user_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/user.pb.gw.go b/api/go/gosdn/rbac/user.pb.gw.go index 2103e85b5af84b6c36bb04fea2d03d752a5848ea..ebe07c3c0ae0161aa45525dd231d67c5efb01338 100755 --- a/api/go/gosdn/rbac/user.pb.gw.go +++ b/api/go/gosdn/rbac/user.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,171 +25,158 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_UserService_CreateUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_CreateUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateUsers(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUserRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUserRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetUsers(ctx, &protoReq) return msg, metadata, err - } func request_UserService_UpdateUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_UpdateUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateUsers(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_DeleteUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_DeleteUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteUsers(ctx, &protoReq) return msg, metadata, err - } // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". @@ -197,16 +185,13 @@ func local_request_UserService_DeleteUsers_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { - - mux.Handle("POST", pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -218,20 +203,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_CreateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -243,20 +223,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -268,20 +243,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -293,20 +263,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_UpdateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -318,9 +283,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_DeleteUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -347,7 +310,6 @@ func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterUserServiceHandler(ctx, mux, conn) } @@ -363,14 +325,11 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { - - mux.Handle("POST", pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -381,18 +340,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_CreateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -403,18 +357,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -425,18 +374,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -447,18 +391,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_UpdateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -469,34 +408,23 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_DeleteUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_UserService_CreateUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "create"}, "")) - - pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "get"}, "")) - - pattern_UserService_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"users"}, "")) - + pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "get"}, "")) + pattern_UserService_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"users"}, "")) pattern_UserService_UpdateUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "update"}, "")) - pattern_UserService_DeleteUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "delete"}, "")) ) var ( forward_UserService_CreateUsers_0 = runtime.ForwardResponseMessage - - forward_UserService_GetUser_0 = runtime.ForwardResponseMessage - - forward_UserService_GetUsers_0 = runtime.ForwardResponseMessage - + forward_UserService_GetUser_0 = runtime.ForwardResponseMessage + forward_UserService_GetUsers_0 = runtime.ForwardResponseMessage forward_UserService_UpdateUsers_0 = runtime.ForwardResponseMessage - forward_UserService_DeleteUsers_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/southbound/southbound.pb.go b/api/go/gosdn/southbound/southbound.pb.go index bf475590f3955554ebb116283b3137a7e813fb8c..ea26197dcfdc2814025fee4c77220fc1ba856c20 100755 --- a/api/go/gosdn/southbound/southbound.pb.go +++ b/api/go/gosdn/southbound/southbound.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/southbound/southbound.proto @@ -12,6 +12,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -76,13 +77,12 @@ func (Type) EnumDescriptor() ([]byte, []int) { } type GetSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Sid string `protobuf:"bytes,3,opt,name=sid,proto3" json:"sid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Sid string `protobuf:"bytes,3,opt,name=sid,proto3" json:"sid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSchemaRequest) Reset() { @@ -137,11 +137,10 @@ func (x *GetSchemaRequest) GetSid() string { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -182,12 +181,11 @@ func (x *Payload) GetChunk() []byte { } type SouthboundInterface struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=gosdn.southbound.Type" json:"type,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=gosdn.southbound.Type" json:"type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SouthboundInterface) Reset() { @@ -236,7 +234,7 @@ func (x *SouthboundInterface) GetType() Type { var File_gosdn_southbound_southbound_proto protoreflect.FileDescriptor -var file_gosdn_southbound_southbound_proto_rawDesc = []byte{ +var file_gosdn_southbound_southbound_proto_rawDesc = string([]byte{ 0x0a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, @@ -271,16 +269,16 @@ var file_gosdn_southbound_southbound_proto_rawDesc = []byte{ 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_southbound_southbound_proto_rawDescOnce sync.Once - file_gosdn_southbound_southbound_proto_rawDescData = file_gosdn_southbound_southbound_proto_rawDesc + file_gosdn_southbound_southbound_proto_rawDescData []byte ) func file_gosdn_southbound_southbound_proto_rawDescGZIP() []byte { file_gosdn_southbound_southbound_proto_rawDescOnce.Do(func() { - file_gosdn_southbound_southbound_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_southbound_southbound_proto_rawDescData) + file_gosdn_southbound_southbound_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_southbound_southbound_proto_rawDesc), len(file_gosdn_southbound_southbound_proto_rawDesc))) }) return file_gosdn_southbound_southbound_proto_rawDescData } @@ -313,7 +311,7 @@ func file_gosdn_southbound_southbound_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_southbound_southbound_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_southbound_southbound_proto_rawDesc), len(file_gosdn_southbound_southbound_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, @@ -325,7 +323,6 @@ func file_gosdn_southbound_southbound_proto_init() { MessageInfos: file_gosdn_southbound_southbound_proto_msgTypes, }.Build() File_gosdn_southbound_southbound_proto = out.File - file_gosdn_southbound_southbound_proto_rawDesc = nil file_gosdn_southbound_southbound_proto_goTypes = nil file_gosdn_southbound_southbound_proto_depIdxs = nil } diff --git a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go index 1691a7cf1951400532e2bae309faf24a18bd43af..6bfb0e28a24cd09f5e36a27b70c8e65d77f06fb4 100755 --- a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go +++ b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/subscriptionmanagement/subscriptionmanagement.proto @@ -14,6 +14,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,16 +25,15 @@ const ( ) type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subid string `protobuf:"bytes,1,opt,name=subid,proto3" json:"subid,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` - MneName string `protobuf:"bytes,4,opt,name=mne_name,json=mneName,proto3" json:"mne_name,omitempty"` - Paths []*Path `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` - SubscribeOptions *SubscribeOptions `protobuf:"bytes,6,opt,name=subscribe_options,json=subscribeOptions,proto3" json:"subscribe_options,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Subid string `protobuf:"bytes,1,opt,name=subid,proto3" json:"subid,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` + MneName string `protobuf:"bytes,4,opt,name=mne_name,json=mneName,proto3" json:"mne_name,omitempty"` + Paths []*Path `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` + SubscribeOptions *SubscribeOptions `protobuf:"bytes,6,opt,name=subscribe_options,json=subscribeOptions,proto3" json:"subscribe_options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -109,11 +109,10 @@ func (x *Subscription) GetSubscribeOptions() *SubscribeOptions { } type Path struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Elem []string `protobuf:"bytes,1,rep,name=elem,proto3" json:"elem,omitempty"` unknownFields protoimpl.UnknownFields - - Elem []string `protobuf:"bytes,1,rep,name=elem,proto3" json:"elem,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Path) Reset() { @@ -154,13 +153,12 @@ func (x *Path) GetElem() []string { } type SubscribeOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GnmiMode string `protobuf:"bytes,1,opt,name=gnmi_mode,json=gnmiMode,proto3" json:"gnmi_mode,omitempty"` - GnmiStreamMode string `protobuf:"bytes,2,opt,name=gnmi_stream_mode,json=gnmiStreamMode,proto3" json:"gnmi_stream_mode,omitempty"` - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + GnmiMode string `protobuf:"bytes,1,opt,name=gnmi_mode,json=gnmiMode,proto3" json:"gnmi_mode,omitempty"` + GnmiStreamMode string `protobuf:"bytes,2,opt,name=gnmi_stream_mode,json=gnmiStreamMode,proto3" json:"gnmi_stream_mode,omitempty"` + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeOptions) Reset() { @@ -215,11 +213,10 @@ func (x *SubscribeOptions) GetSampleInterval() uint64 { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -260,12 +257,11 @@ func (x *GetAllRequest) GetTimestamp() int64 { } type GetAllResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subscriptions []*Subscription `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subscriptions []*Subscription `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllResponse) Reset() { @@ -313,12 +309,11 @@ func (x *GetAllResponse) GetSubscriptions() []*Subscription { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -366,12 +361,11 @@ func (x *GetRequest) GetSubid() string { } type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subscriptions *Subscription `protobuf:"bytes,2,opt,name=subscriptions,proto3" json:"subscriptions,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subscriptions *Subscription `protobuf:"bytes,2,opt,name=subscriptions,proto3" json:"subscriptions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -419,12 +413,11 @@ func (x *GetResponse) GetSubscriptions() *Subscription { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -472,11 +465,10 @@ func (x *DeleteRequest) GetSubid() string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -517,13 +509,12 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type AddRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Subscription *Subscription `protobuf:"bytes,3,opt,name=subscription,proto3" json:"subscription,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Subscription *Subscription `protobuf:"bytes,3,opt,name=subscription,proto3" json:"subscription,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRequest) Reset() { @@ -578,11 +569,10 @@ func (x *AddRequest) GetSubscription() *Subscription { } type AddResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddResponse) Reset() { @@ -623,11 +613,10 @@ func (x *AddResponse) GetTimestamp() int64 { } type ResetAllSubscriptionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResetAllSubscriptionsRequest) Reset() { @@ -668,11 +657,10 @@ func (x *ResetAllSubscriptionsRequest) GetTimestamp() int64 { } type ResetAllSubscriptionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResetAllSubscriptionsResponse) Reset() { @@ -714,7 +702,7 @@ func (x *ResetAllSubscriptionsResponse) GetTimestamp() int64 { var File_gosdn_subscriptionmanagement_subscriptionmanagement_proto protoreflect.FileDescriptor -var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = []byte{ +var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = string([]byte{ 0x0a, 0x39, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, @@ -855,16 +843,16 @@ var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = []b 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescOnce sync.Once - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc + file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData []byte ) func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescGZIP() []byte { file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescOnce.Do(func() { - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData) + file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc), len(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc))) }) return file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData } @@ -917,7 +905,7 @@ func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc), len(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc)), NumEnums: 0, NumMessages: 13, NumExtensions: 0, @@ -928,7 +916,6 @@ func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_init() { MessageInfos: file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_msgTypes, }.Build() File_gosdn_subscriptionmanagement_subscriptionmanagement_proto = out.File - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = nil file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_goTypes = nil file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_depIdxs = nil } diff --git a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go index b7efc5dc07746d8a27ff0b9520939e6d8183f826..40aebfa6eef4249c891936f8ee3fcd7278707692 100755 --- a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go +++ b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go @@ -10,6 +10,7 @@ package submanagement import ( "context" + "errors" "io" "net/http" @@ -24,283 +25,220 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_SubscriptionManagementService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllRequest - var metadata runtime.ServerMetadata +var filter_SubscriptionManagementService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_GetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_GetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAll(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_SubscriptionManagementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_SubscriptionManagementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Get(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_SubscriptionManagementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_SubscriptionManagementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Delete(ctx, &protoReq) return msg, metadata, err - } func request_SubscriptionManagementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq AddRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - msg, err := client.Add(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq AddRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - msg, err := server.Add(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_ResetAllSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_SubscriptionManagementService_ResetAllSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResetAllSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ResetAllSubscriptionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_ResetAllSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ResetAllSubscriptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResetAllSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ResetAllSubscriptionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_ResetAllSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ResetAllSubscriptions(ctx, &protoReq) return msg, metadata, err - } // RegisterSubscriptionManagementServiceHandlerServer registers the http handlers for service SubscriptionManagementService to "mux". @@ -309,16 +247,13 @@ func local_request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx con // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSubscriptionManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubscriptionManagementServiceServer) error { - - mux.Handle("GET", pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -330,20 +265,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -355,20 +285,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -380,20 +305,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -405,20 +325,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Add_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -430,9 +345,7 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_ResetAllSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -459,7 +372,6 @@ func RegisterSubscriptionManagementServiceHandlerFromEndpoint(ctx context.Contex } }() }() - return RegisterSubscriptionManagementServiceHandler(ctx, mux, conn) } @@ -475,14 +387,11 @@ func RegisterSubscriptionManagementServiceHandler(ctx context.Context, mux *runt // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "SubscriptionManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscriptionManagementServiceClient) error { - - mux.Handle("GET", pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -493,18 +402,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -515,18 +419,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -537,18 +436,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -559,18 +453,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Add_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -581,34 +470,23 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_ResetAllSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_SubscriptionManagementService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "subscriptions"}, "")) - - pattern_SubscriptionManagementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) - - pattern_SubscriptionManagementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) - - pattern_SubscriptionManagementService_Add_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "mneid"}, "")) - + pattern_SubscriptionManagementService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "subscriptions"}, "")) + pattern_SubscriptionManagementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) + pattern_SubscriptionManagementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) + pattern_SubscriptionManagementService_Add_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "mneid"}, "")) pattern_SubscriptionManagementService_ResetAllSubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "reset"}, "")) ) var ( - forward_SubscriptionManagementService_GetAll_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Get_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Delete_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Add_0 = runtime.ForwardResponseMessage - + forward_SubscriptionManagementService_GetAll_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Get_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Delete_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Add_0 = runtime.ForwardResponseMessage forward_SubscriptionManagementService_ResetAllSubscriptions_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/topology/link.pb.go b/api/go/gosdn/topology/link.pb.go index 398feb9d9435afadb3a5f1a21b82a92272fc867e..d18acbd1b6898de7f232eb2d8e17c2686c0831b4 100755 --- a/api/go/gosdn/topology/link.pb.go +++ b/api/go/gosdn/topology/link.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/link.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,17 +27,16 @@ const ( ) type Link struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SourceNode *Node `protobuf:"bytes,3,opt,name=sourceNode,proto3" json:"sourceNode,omitempty"` + TargetNode *Node `protobuf:"bytes,4,opt,name=targetNode,proto3" json:"targetNode,omitempty"` + SourcePort *Port `protobuf:"bytes,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` + TargetPort *Port `protobuf:"bytes,6,opt,name=targetPort,proto3" json:"targetPort,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - SourceNode *Node `protobuf:"bytes,3,opt,name=sourceNode,proto3" json:"sourceNode,omitempty"` - TargetNode *Node `protobuf:"bytes,4,opt,name=targetNode,proto3" json:"targetNode,omitempty"` - SourcePort *Port `protobuf:"bytes,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` - TargetPort *Port `protobuf:"bytes,6,opt,name=targetPort,proto3" json:"targetPort,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Link) Reset() { @@ -120,7 +120,7 @@ func (x *Link) GetMetadata() *conflict.Metadata { var File_gosdn_topology_link_proto protoreflect.FileDescriptor -var file_gosdn_topology_link_proto_rawDesc = []byte{ +var file_gosdn_topology_link_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -164,16 +164,16 @@ var file_gosdn_topology_link_proto_rawDesc = []byte{ 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_link_proto_rawDescOnce sync.Once - file_gosdn_topology_link_proto_rawDescData = file_gosdn_topology_link_proto_rawDesc + file_gosdn_topology_link_proto_rawDescData []byte ) func file_gosdn_topology_link_proto_rawDescGZIP() []byte { file_gosdn_topology_link_proto_rawDescOnce.Do(func() { - file_gosdn_topology_link_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_link_proto_rawDescData) + file_gosdn_topology_link_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_link_proto_rawDesc), len(file_gosdn_topology_link_proto_rawDesc))) }) return file_gosdn_topology_link_proto_rawDescData } @@ -209,7 +209,7 @@ func file_gosdn_topology_link_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_link_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_link_proto_rawDesc), len(file_gosdn_topology_link_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -220,7 +220,6 @@ func file_gosdn_topology_link_proto_init() { MessageInfos: file_gosdn_topology_link_proto_msgTypes, }.Build() File_gosdn_topology_link_proto = out.File - file_gosdn_topology_link_proto_rawDesc = nil file_gosdn_topology_link_proto_goTypes = nil file_gosdn_topology_link_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/node.pb.go b/api/go/gosdn/topology/node.pb.go index b65392c17c9b9dc82b871dcdc7d7818f7b40e965..d9c0e5af144917901a95cb18fae8c9f30080a1af 100755 --- a/api/go/gosdn/topology/node.pb.go +++ b/api/go/gosdn/topology/node.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/node.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,13 +27,12 @@ const ( ) type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Node) Reset() { @@ -88,7 +88,7 @@ func (x *Node) GetMetadata() *conflict.Metadata { var File_gosdn_topology_node_proto protoreflect.FileDescriptor -var file_gosdn_topology_node_proto_rawDesc = []byte{ +var file_gosdn_topology_node_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -113,16 +113,16 @@ var file_gosdn_topology_node_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_node_proto_rawDescOnce sync.Once - file_gosdn_topology_node_proto_rawDescData = file_gosdn_topology_node_proto_rawDesc + file_gosdn_topology_node_proto_rawDescData []byte ) func file_gosdn_topology_node_proto_rawDescGZIP() []byte { file_gosdn_topology_node_proto_rawDescOnce.Do(func() { - file_gosdn_topology_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_node_proto_rawDescData) + file_gosdn_topology_node_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_node_proto_rawDesc), len(file_gosdn_topology_node_proto_rawDesc))) }) return file_gosdn_topology_node_proto_rawDescData } @@ -150,7 +150,7 @@ func file_gosdn_topology_node_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_node_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_node_proto_rawDesc), len(file_gosdn_topology_node_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -161,7 +161,6 @@ func file_gosdn_topology_node_proto_init() { MessageInfos: file_gosdn_topology_node_proto_msgTypes, }.Build() File_gosdn_topology_node_proto = out.File - file_gosdn_topology_node_proto_rawDesc = nil file_gosdn_topology_node_proto_goTypes = nil file_gosdn_topology_node_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/port.pb.go b/api/go/gosdn/topology/port.pb.go index de83b8af4238e0be3681a46aa67087d98b1d173f..3834525729e16fdd2be533fbce9eed32c1af9075 100755 --- a/api/go/gosdn/topology/port.pb.go +++ b/api/go/gosdn/topology/port.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/port.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,12 +27,11 @@ const ( ) type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PrefixLength int64 `protobuf:"varint,2,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"` unknownFields protoimpl.UnknownFields - - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` - PrefixLength int64 `protobuf:"varint,2,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -79,14 +79,13 @@ func (x *Configuration) GetPrefixLength() int64 { } type Port struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Configuration *Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Configuration *Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Port) Reset() { @@ -149,7 +148,7 @@ func (x *Port) GetMetadata() *conflict.Metadata { var File_gosdn_topology_port_proto protoreflect.FileDescriptor -var file_gosdn_topology_port_proto_rawDesc = []byte{ +var file_gosdn_topology_port_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -185,16 +184,16 @@ var file_gosdn_topology_port_proto_rawDesc = []byte{ 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_port_proto_rawDescOnce sync.Once - file_gosdn_topology_port_proto_rawDescData = file_gosdn_topology_port_proto_rawDesc + file_gosdn_topology_port_proto_rawDescData []byte ) func file_gosdn_topology_port_proto_rawDescGZIP() []byte { file_gosdn_topology_port_proto_rawDescOnce.Do(func() { - file_gosdn_topology_port_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_port_proto_rawDescData) + file_gosdn_topology_port_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_port_proto_rawDesc), len(file_gosdn_topology_port_proto_rawDesc))) }) return file_gosdn_topology_port_proto_rawDescData } @@ -224,7 +223,7 @@ func file_gosdn_topology_port_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_port_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_port_proto_rawDesc), len(file_gosdn_topology_port_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -235,7 +234,6 @@ func file_gosdn_topology_port_proto_init() { MessageInfos: file_gosdn_topology_port_proto_msgTypes, }.Build() File_gosdn_topology_port_proto = out.File - file_gosdn_topology_port_proto_rawDesc = nil file_gosdn_topology_port_proto_goTypes = nil file_gosdn_topology_port_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/route.pb.go b/api/go/gosdn/topology/route.pb.go index 9627c2df6fdc4187247d3290048fc740b25e24a1..f4472000e79d0d3ea76c7465f6f39dbfd0946a0f 100755 --- a/api/go/gosdn/topology/route.pb.go +++ b/api/go/gosdn/topology/route.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/route.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,15 +27,14 @@ const ( ) type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TargetIPRange string `protobuf:"bytes,2,opt,name=targetIPRange,proto3" json:"targetIPRange,omitempty"` + NextHopIP string `protobuf:"bytes,3,opt,name=nextHopIP,proto3" json:"nextHopIP,omitempty"` + PortID string `protobuf:"bytes,4,opt,name=portID,proto3" json:"portID,omitempty"` + Metric string `protobuf:"bytes,5,opt,name=metric,proto3" json:"metric,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - TargetIPRange string `protobuf:"bytes,2,opt,name=targetIPRange,proto3" json:"targetIPRange,omitempty"` - NextHopIP string `protobuf:"bytes,3,opt,name=nextHopIP,proto3" json:"nextHopIP,omitempty"` - PortID string `protobuf:"bytes,4,opt,name=portID,proto3" json:"portID,omitempty"` - Metric string `protobuf:"bytes,5,opt,name=metric,proto3" json:"metric,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Route) Reset() { @@ -103,14 +103,13 @@ func (x *Route) GetMetric() string { } type RoutingTable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NodeID string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"` + Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NodeID string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"` - Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RoutingTable) Reset() { @@ -173,7 +172,7 @@ func (x *RoutingTable) GetMetadata() *conflict.Metadata { var File_gosdn_topology_route_proto protoreflect.FileDescriptor -var file_gosdn_topology_route_proto_rawDesc = []byte{ +var file_gosdn_topology_route_proto_rawDesc = string([]byte{ 0x0a, 0x1a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, @@ -213,16 +212,16 @@ var file_gosdn_topology_route_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_route_proto_rawDescOnce sync.Once - file_gosdn_topology_route_proto_rawDescData = file_gosdn_topology_route_proto_rawDesc + file_gosdn_topology_route_proto_rawDescData []byte ) func file_gosdn_topology_route_proto_rawDescGZIP() []byte { file_gosdn_topology_route_proto_rawDescOnce.Do(func() { - file_gosdn_topology_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_route_proto_rawDescData) + file_gosdn_topology_route_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_route_proto_rawDesc), len(file_gosdn_topology_route_proto_rawDesc))) }) return file_gosdn_topology_route_proto_rawDescData } @@ -252,7 +251,7 @@ func file_gosdn_topology_route_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_route_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_route_proto_rawDesc), len(file_gosdn_topology_route_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -263,7 +262,6 @@ func file_gosdn_topology_route_proto_init() { MessageInfos: file_gosdn_topology_route_proto_msgTypes, }.Build() File_gosdn_topology_route_proto = out.File - file_gosdn_topology_route_proto_rawDesc = nil file_gosdn_topology_route_proto_goTypes = nil file_gosdn_topology_route_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/routingTable.pb.go b/api/go/gosdn/topology/routingTable.pb.go index 1b9638cb3470fdffd020197419fe0a4f293557f9..d7b791f349a84ae3418f59de78bb5be625253aba 100755 --- a/api/go/gosdn/topology/routingTable.pb.go +++ b/api/go/gosdn/topology/routingTable.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/routingTable.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,12 +27,11 @@ const ( ) type AddRoutingTableRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoutingTable *RoutingTable `protobuf:"bytes,2,opt,name=routingTable,proto3" json:"routingTable,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoutingTable *RoutingTable `protobuf:"bytes,2,opt,name=routingTable,proto3" json:"routingTable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRoutingTableRequest) Reset() { @@ -79,11 +79,10 @@ func (x *AddRoutingTableRequest) GetRoutingTable() *RoutingTable { } type AddRoutingTableResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRoutingTableResponse) Reset() { @@ -124,11 +123,10 @@ func (x *AddRoutingTableResponse) GetTimestamp() int64 { } type GetRoutesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoutesRequest) Reset() { @@ -169,12 +167,11 @@ func (x *GetRoutesRequest) GetTimestamp() int64 { } type GetRoutesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoutingTables []*RoutingTable `protobuf:"bytes,2,rep,name=routingTables,proto3" json:"routingTables,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoutingTables []*RoutingTable `protobuf:"bytes,2,rep,name=routingTables,proto3" json:"routingTables,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoutesResponse) Reset() { @@ -222,12 +219,11 @@ func (x *GetRoutesResponse) GetRoutingTables() []*RoutingTable { } type DeleteRoutesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRoutesRequest) Reset() { @@ -275,11 +271,10 @@ func (x *DeleteRoutesRequest) GetId() string { } type DeleteRoutesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRoutesResponse) Reset() { @@ -321,7 +316,7 @@ func (x *DeleteRoutesResponse) GetTimestamp() int64 { var File_gosdn_topology_routingTable_proto protoreflect.FileDescriptor -var file_gosdn_topology_routingTable_proto_rawDesc = []byte{ +var file_gosdn_topology_routingTable_proto_rawDesc = string([]byte{ 0x0a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, @@ -397,16 +392,16 @@ var file_gosdn_topology_routingTable_proto_rawDesc = []byte{ 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_routingTable_proto_rawDescOnce sync.Once - file_gosdn_topology_routingTable_proto_rawDescData = file_gosdn_topology_routingTable_proto_rawDesc + file_gosdn_topology_routingTable_proto_rawDescData []byte ) func file_gosdn_topology_routingTable_proto_rawDescGZIP() []byte { file_gosdn_topology_routingTable_proto_rawDescOnce.Do(func() { - file_gosdn_topology_routingTable_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_routingTable_proto_rawDescData) + file_gosdn_topology_routingTable_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_routingTable_proto_rawDesc), len(file_gosdn_topology_routingTable_proto_rawDesc))) }) return file_gosdn_topology_routingTable_proto_rawDescData } @@ -448,7 +443,7 @@ func file_gosdn_topology_routingTable_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_routingTable_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_routingTable_proto_rawDesc), len(file_gosdn_topology_routingTable_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, @@ -459,7 +454,6 @@ func file_gosdn_topology_routingTable_proto_init() { MessageInfos: file_gosdn_topology_routingTable_proto_msgTypes, }.Build() File_gosdn_topology_routingTable_proto = out.File - file_gosdn_topology_routingTable_proto_rawDesc = nil file_gosdn_topology_routingTable_proto_goTypes = nil file_gosdn_topology_routingTable_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/routingTable.pb.gw.go b/api/go/gosdn/topology/routingTable.pb.gw.go index 2b736a2f523e3d725b33cfcb905e6d58a920503d..4bcd1b743003bcc67b1b224e9052e369e05f1154 100755 --- a/api/go/gosdn/topology/routingTable.pb.gw.go +++ b/api/go/gosdn/topology/routingTable.pb.gw.go @@ -10,6 +10,7 @@ package topology import ( "context" + "errors" "io" "net/http" @@ -24,109 +25,102 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RoutingTableService_AddRoutingTable_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRoutingTableRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddRoutingTableRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddRoutingTable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_AddRoutingTable_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRoutingTableRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddRoutingTableRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddRoutingTable(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoutingTableService_GetRoutes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoutingTableService_GetRoutes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoutingTableService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_GetRoutes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_GetRoutes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRoutes(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoutingTableService_DeleteRoute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoutingTableService_DeleteRoute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoutingTableService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_DeleteRoute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRoute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_DeleteRoute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRoute(ctx, &protoReq) return msg, metadata, err - } // RegisterRoutingTableServiceHandlerServer registers the http handlers for service RoutingTableService to "mux". @@ -135,16 +129,13 @@ func local_request_RoutingTableService_DeleteRoute_0(ctx context.Context, marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoutingTableServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoutingTableServiceServer) error { - - mux.Handle("POST", pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -156,20 +147,15 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_AddRoutingTable_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -181,20 +167,15 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -206,9 +187,7 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -235,7 +214,6 @@ func RegisterRoutingTableServiceHandlerFromEndpoint(ctx context.Context, mux *ru } }() }() - return RegisterRoutingTableServiceHandler(ctx, mux, conn) } @@ -251,14 +229,11 @@ func RegisterRoutingTableServiceHandler(ctx context.Context, mux *runtime.ServeM // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoutingTableServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoutingTableServiceClient) error { - - mux.Handle("POST", pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -269,18 +244,13 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_AddRoutingTable_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -291,18 +261,13 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -313,26 +278,19 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_RoutingTableService_AddRoutingTable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "create"}, "")) - - pattern_RoutingTableService_GetRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"routing"}, "")) - - pattern_RoutingTableService_DeleteRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "delete"}, "")) + pattern_RoutingTableService_GetRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"routing"}, "")) + pattern_RoutingTableService_DeleteRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "delete"}, "")) ) var ( forward_RoutingTableService_AddRoutingTable_0 = runtime.ForwardResponseMessage - - forward_RoutingTableService_GetRoutes_0 = runtime.ForwardResponseMessage - - forward_RoutingTableService_DeleteRoute_0 = runtime.ForwardResponseMessage + forward_RoutingTableService_GetRoutes_0 = runtime.ForwardResponseMessage + forward_RoutingTableService_DeleteRoute_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/topology/topology.pb.go b/api/go/gosdn/topology/topology.pb.go index 6d85ea4add02f62f424d03354ffb74e7c7403d01..073a288f80b13a78e268694e66278a579844fe8a 100755 --- a/api/go/gosdn/topology/topology.pb.go +++ b/api/go/gosdn/topology/topology.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/topology.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,11 +26,10 @@ const ( ) type Topology struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Links []*Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` unknownFields protoimpl.UnknownFields - - Links []*Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Topology) Reset() { @@ -70,12 +70,11 @@ func (x *Topology) GetLinks() []*Link { } type AddLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddLinkRequest) Reset() { @@ -123,11 +122,10 @@ func (x *AddLinkRequest) GetLink() *Link { } type AddLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddLinkResponse) Reset() { @@ -168,11 +166,10 @@ func (x *AddLinkResponse) GetTimestamp() int64 { } type GetTopologyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTopologyRequest) Reset() { @@ -213,12 +210,11 @@ func (x *GetTopologyRequest) GetTimestamp() int64 { } type GetTopologyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Toplogy *Topology `protobuf:"bytes,2,opt,name=toplogy,proto3" json:"toplogy,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Toplogy *Topology `protobuf:"bytes,2,opt,name=toplogy,proto3" json:"toplogy,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTopologyResponse) Reset() { @@ -266,12 +262,11 @@ func (x *GetTopologyResponse) GetToplogy() *Topology { } type UpdateLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateLinkRequest) Reset() { @@ -319,11 +314,10 @@ func (x *UpdateLinkRequest) GetLink() *Link { } type UpdateLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateLinkResponse) Reset() { @@ -364,12 +358,11 @@ func (x *UpdateLinkResponse) GetTimestamp() int64 { } type DeleteLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteLinkRequest) Reset() { @@ -417,11 +410,10 @@ func (x *DeleteLinkRequest) GetId() string { } type DeleteLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteLinkResponse) Reset() { @@ -463,7 +455,7 @@ func (x *DeleteLinkResponse) GetTimestamp() int64 { var File_gosdn_topology_topology_proto protoreflect.FileDescriptor -var file_gosdn_topology_topology_proto_rawDesc = []byte{ +var file_gosdn_topology_topology_proto_rawDesc = string([]byte{ 0x0a, 0x1d, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, @@ -552,16 +544,16 @@ var file_gosdn_topology_topology_proto_rawDesc = []byte{ 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_topology_proto_rawDescOnce sync.Once - file_gosdn_topology_topology_proto_rawDescData = file_gosdn_topology_topology_proto_rawDesc + file_gosdn_topology_topology_proto_rawDescData []byte ) func file_gosdn_topology_topology_proto_rawDescGZIP() []byte { file_gosdn_topology_topology_proto_rawDescOnce.Do(func() { - file_gosdn_topology_topology_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_topology_proto_rawDescData) + file_gosdn_topology_topology_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_topology_proto_rawDesc), len(file_gosdn_topology_topology_proto_rawDesc))) }) return file_gosdn_topology_topology_proto_rawDescData } @@ -610,7 +602,7 @@ func file_gosdn_topology_topology_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_topology_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_topology_proto_rawDesc), len(file_gosdn_topology_topology_proto_rawDesc)), NumEnums: 0, NumMessages: 9, NumExtensions: 0, @@ -621,7 +613,6 @@ func file_gosdn_topology_topology_proto_init() { MessageInfos: file_gosdn_topology_topology_proto_msgTypes, }.Build() File_gosdn_topology_topology_proto = out.File - file_gosdn_topology_topology_proto_rawDesc = nil file_gosdn_topology_topology_proto_goTypes = nil file_gosdn_topology_topology_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/topology.pb.gw.go b/api/go/gosdn/topology/topology.pb.gw.go index 93edbd2fd86ddd2bb2deb3acbfbbc3d7911569bc..d4587d5046951bfc72b52e80b8b0635402ab8535 100755 --- a/api/go/gosdn/topology/topology.pb.gw.go +++ b/api/go/gosdn/topology/topology.pb.gw.go @@ -10,6 +10,7 @@ package topology import ( "context" + "errors" "io" "net/http" @@ -24,135 +25,126 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddLink(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_TopologyService_GetTopology_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_TopologyService_GetTopology_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTopologyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTopologyRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetTopology(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTopologyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTopologyRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetTopology(ctx, &protoReq) return msg, metadata, err - } func request_TopologyService_UpdateLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_UpdateLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateLink(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_TopologyService_DeleteLink_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_TopologyService_DeleteLink_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_TopologyService_DeleteLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLinkRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteLinkRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_DeleteLink_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_DeleteLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLinkRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteLinkRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_DeleteLink_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteLink(ctx, &protoReq) return msg, metadata, err - } // RegisterTopologyServiceHandlerServer registers the http handlers for service TopologyService to "mux". @@ -161,16 +153,13 @@ func local_request_TopologyService_DeleteLink_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTopologyServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TopologyServiceServer) error { - - mux.Handle("POST", pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -182,20 +171,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_AddLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -207,20 +191,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_GetTopology_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -232,20 +211,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_UpdateLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -257,9 +231,7 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_DeleteLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -286,7 +258,6 @@ func RegisterTopologyServiceHandlerFromEndpoint(ctx context.Context, mux *runtim } }() }() - return RegisterTopologyServiceHandler(ctx, mux, conn) } @@ -302,14 +273,11 @@ func RegisterTopologyServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "TopologyServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopologyServiceClient) error { - - mux.Handle("POST", pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -320,18 +288,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_AddLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -342,18 +305,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_GetTopology_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -364,18 +322,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_UpdateLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -386,30 +339,21 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_DeleteLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_TopologyService_AddLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "create"}, "")) - + pattern_TopologyService_AddLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "create"}, "")) pattern_TopologyService_GetTopology_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"topology"}, "")) - - pattern_TopologyService_UpdateLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "update"}, "")) - - pattern_TopologyService_DeleteLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "delete"}, "")) + pattern_TopologyService_UpdateLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "update"}, "")) + pattern_TopologyService_DeleteLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "delete"}, "")) ) var ( - forward_TopologyService_AddLink_0 = runtime.ForwardResponseMessage - + forward_TopologyService_AddLink_0 = runtime.ForwardResponseMessage forward_TopologyService_GetTopology_0 = runtime.ForwardResponseMessage - - forward_TopologyService_UpdateLink_0 = runtime.ForwardResponseMessage - - forward_TopologyService_DeleteLink_0 = runtime.ForwardResponseMessage + forward_TopologyService_UpdateLink_0 = runtime.ForwardResponseMessage + forward_TopologyService_DeleteLink_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/transport/transport.pb.go b/api/go/gosdn/transport/transport.pb.go index 24ebcfbe09b7eb100bad29430501e336bb707bb2..22768e44c662bd29f5bb747370864bb485389e5f 100755 --- a/api/go/gosdn/transport/transport.pb.go +++ b/api/go/gosdn/transport/transport.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/transport/transport.proto @@ -14,6 +14,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,20 +25,19 @@ const ( ) type TransportOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - Tls bool `protobuf:"varint,4,opt,name=tls,proto3" json:"tls,omitempty"` - // Types that are assignable to TransportOption: + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Tls bool `protobuf:"varint,4,opt,name=tls,proto3" json:"tls,omitempty"` + // Types that are valid to be assigned to TransportOption: // // *TransportOption_GnmiTransportOption // *TransportOption_RestconfTransportOption TransportOption isTransportOption_TransportOption `protobuf_oneof:"transport_option"` Type southbound.Type `protobuf:"varint,7,opt,name=type,proto3,enum=gosdn.southbound.Type" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransportOption) Reset() { @@ -98,23 +98,27 @@ func (x *TransportOption) GetTls() bool { return false } -func (m *TransportOption) GetTransportOption() isTransportOption_TransportOption { - if m != nil { - return m.TransportOption +func (x *TransportOption) GetTransportOption() isTransportOption_TransportOption { + if x != nil { + return x.TransportOption } return nil } func (x *TransportOption) GetGnmiTransportOption() *GnmiTransportOption { - if x, ok := x.GetTransportOption().(*TransportOption_GnmiTransportOption); ok { - return x.GnmiTransportOption + if x != nil { + if x, ok := x.TransportOption.(*TransportOption_GnmiTransportOption); ok { + return x.GnmiTransportOption + } } return nil } func (x *TransportOption) GetRestconfTransportOption() *RestconfTransportOption { - if x, ok := x.GetTransportOption().(*TransportOption_RestconfTransportOption); ok { - return x.RestconfTransportOption + if x != nil { + if x, ok := x.TransportOption.(*TransportOption_RestconfTransportOption); ok { + return x.RestconfTransportOption + } } return nil } @@ -143,14 +147,13 @@ func (*TransportOption_GnmiTransportOption) isTransportOption_TransportOption() func (*TransportOption_RestconfTransportOption) isTransportOption_TransportOption() {} type GnmiTransportOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Compression string `protobuf:"bytes,1,opt,name=compression,proto3" json:"compression,omitempty"` - GrpcDialOptions map[string]string `protobuf:"bytes,2,rep,name=grpc_dial_options,json=grpcDialOptions,proto3" json:"grpc_dial_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - Encoding gnmi.Encoding `protobuf:"varint,4,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Compression string `protobuf:"bytes,1,opt,name=compression,proto3" json:"compression,omitempty"` + GrpcDialOptions map[string]string `protobuf:"bytes,2,rep,name=grpc_dial_options,json=grpcDialOptions,proto3" json:"grpc_dial_options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Encoding gnmi.Encoding `protobuf:"varint,4,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GnmiTransportOption) Reset() { @@ -212,9 +215,9 @@ func (x *GnmiTransportOption) GetEncoding() gnmi.Encoding { } type RestconfTransportOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RestconfTransportOption) Reset() { @@ -249,7 +252,7 @@ func (*RestconfTransportOption) Descriptor() ([]byte, []int) { var File_gosdn_transport_transport_proto protoreflect.FileDescriptor -var file_gosdn_transport_transport_proto_rawDesc = []byte{ +var file_gosdn_transport_transport_proto_rawDesc = string([]byte{ 0x0a, 0x1f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, @@ -309,16 +312,16 @@ var file_gosdn_transport_transport_proto_rawDesc = []byte{ 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_transport_transport_proto_rawDescOnce sync.Once - file_gosdn_transport_transport_proto_rawDescData = file_gosdn_transport_transport_proto_rawDesc + file_gosdn_transport_transport_proto_rawDescData []byte ) func file_gosdn_transport_transport_proto_rawDescGZIP() []byte { file_gosdn_transport_transport_proto_rawDescOnce.Do(func() { - file_gosdn_transport_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_transport_transport_proto_rawDescData) + file_gosdn_transport_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_transport_transport_proto_rawDesc), len(file_gosdn_transport_transport_proto_rawDesc))) }) return file_gosdn_transport_transport_proto_rawDescData } @@ -358,7 +361,7 @@ func file_gosdn_transport_transport_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_transport_transport_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_transport_transport_proto_rawDesc), len(file_gosdn_transport_transport_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -369,7 +372,6 @@ func file_gosdn_transport_transport_proto_init() { MessageInfos: file_gosdn_transport_transport_proto_msgTypes, }.Build() File_gosdn_transport_transport_proto = out.File - file_gosdn_transport_transport_proto_rawDesc = nil file_gosdn_transport_transport_proto_goTypes = nil file_gosdn_transport_transport_proto_depIdxs = nil } diff --git a/api/openapiv2/gosdn_northbound.swagger.json b/api/openapiv2/gosdn_northbound.swagger.json index faefcc2b96bda7930228529cdd30906868d51621..a000de65c354fb96bb867d8c2867925b103d319a 100755 --- a/api/openapiv2/gosdn_northbound.swagger.json +++ b/api/openapiv2/gosdn_northbound.swagger.json @@ -709,6 +709,37 @@ ] } }, + "/plugins": { + "get": { + "operationId": "PluginInternalService_GetAvailablePlugins", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gosdnplugin_registryGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "timestamp", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "PluginInternalService" + ] + } + }, "/pnd/{pid}": { "get": { "summary": "Allows to request a specific Principal Network Domain.", diff --git a/api/proto/gosdn/networkelement/networkelement.proto b/api/proto/gosdn/networkelement/networkelement.proto index b2a14817b101e44e9f4ee0ea4e94dccd4a659d53..e893c00f264c1f673f4d47283ff0ea0b27c89ac6 100755 --- a/api/proto/gosdn/networkelement/networkelement.proto +++ b/api/proto/gosdn/networkelement/networkelement.proto @@ -407,4 +407,4 @@ message SubscribePathRequest { message SubscribePathResponse { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. repeated gnmi.Notification mne_notification = 2; -} +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin-internal/plugin-internal.proto b/api/proto/gosdn/plugin-internal/plugin-internal.proto index 85b72157234827aaa58c56c2d979bc572bc051f4..70ad2e22fc69b93035e186520f7a04218bad6483 100755 --- a/api/proto/gosdn/plugin-internal/plugin-internal.proto +++ b/api/proto/gosdn/plugin-internal/plugin-internal.proto @@ -4,21 +4,21 @@ package gosdn.plugin_internal; import "buf/validate/validate.proto"; import "gosdn/plugin-registry/plugin-registry.proto"; +import "google/api/annotations.proto"; + option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-internal"; service PluginInternalService { rpc AvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse); rpc GetPluginSchema(GetPluginSchemaRequest) returns (stream PluginSchemaPayload); + rpc GetAvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse) { + option (google.api.http) = {get: "/plugins"}; } - -message GetAvailablePluginsRequest { - int64 timestamp = 1; } -message GetAvailablePluginsResponse { +message GetAvailablePluginsRequest { int64 timestamp = 1; - repeated gosdn.plugin_registry.Plugin plugins = 2; } message GetPluginSchemaRequest { @@ -29,3 +29,8 @@ message GetPluginSchemaRequest { message PluginSchemaPayload { bytes chunk = 1; } + +message GetAvailablePluginsResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated gosdn.plugin_registry.Plugin plugins = 2; +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin-registry/plugin-registry.proto b/api/proto/gosdn/plugin-registry/plugin-registry.proto index ee4040c58be9f9972f8a58f7878bbe05fc867074..1210ab99c50858be92448026e0b17bc1c1c4d566 100755 --- a/api/proto/gosdn/plugin-registry/plugin-registry.proto +++ b/api/proto/gosdn/plugin-registry/plugin-registry.proto @@ -4,6 +4,8 @@ package gosdn.plugin_registry; import "google/protobuf/timestamp.proto"; import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; + option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry"; @@ -64,3 +66,12 @@ message Manifest { string author = 3; string version = 4; } + +message GetAvailablePluginsResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated gosdn.plugin_registry.Plugin plugins = 2; +} + +message GetAvailablePluginsRequest { + int64 timestamp = 1; +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin/plugin.proto b/api/proto/gosdn/plugin/plugin.proto index 80b6bec342f0e4702a212b70e99306174a582d8f..6d7ca844709641343758d05f2259f4b23bb268a1 100755 --- a/api/proto/gosdn/plugin/plugin.proto +++ b/api/proto/gosdn/plugin/plugin.proto @@ -4,8 +4,11 @@ package gosdn.plugin; import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; + import "gosdn/networkelement/networkelement.proto"; +import "gosdn/plugin-registry/plugin-registry.proto"; option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin"; @@ -20,6 +23,7 @@ service Plugin { rpc SchemaTreeGzip(SchemaTreeGzipRequest) returns (stream Payload); rpc ValidateChange(ValidateChangeRequest) returns (ValidateChangeResponse); rpc PruneConfigFalse(PruneConfigFalseRequest) returns (PruneConfigFalseResponse); + rpc GetAvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse); } message UnmarshalRequest { @@ -99,3 +103,7 @@ message SchemaTreeGzipRequest { message Payload { bytes chunk = 1; } + +message GetAvailablePluginsRequest { + int64 timestamp = 1; + } \ No newline at end of file diff --git a/controller/controller.go b/controller/controller.go index 32adf35867c562c55a819f9ecb6d9b37123613e8..3b339bd5204cbe9fffefbd571619d0dd4ac19820 100755 --- a/controller/controller.go +++ b/controller/controller.go @@ -349,6 +349,7 @@ func ensureAdminRoleExists() error { "/gosdn.networkelement.NetworkElementService/ParseYang", "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins", "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema", + "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", "/gosdn.app.AppService/Register", "/gosdn.app.AppService/Deregister", "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", diff --git a/controller/http.go b/controller/http.go index 394b7a0b06099a59cc2947a83e0e29fa0be7c1f6..684b8f83f39ccb0deb201799e5ac555c377b9380 100755 --- a/controller/http.go +++ b/controller/http.go @@ -16,6 +16,7 @@ import ( "google.golang.org/grpc/status" mnegw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" + plg "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-internal" pgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" agw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" tgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" @@ -85,6 +86,11 @@ func setupHttpServer() error { return err } + err = plg.RegisterPluginInternalServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts) + if err != nil { + return err + } + // Set the HTTP server of core to the new server c.httpServer = &http.Server{Addr: ":8080", Handler: mux, diff --git a/controller/northbound/server/plugin.go b/controller/northbound/server/plugin.go index 3338520da281bf8817f39f7134ac4c6c141b6368..8e73994d3e3a829e4c26a58fb1436736692ffba7 100755 --- a/controller/northbound/server/plugin.go +++ b/controller/northbound/server/plugin.go @@ -55,6 +55,22 @@ func (pis *PluginInternalServer) AvailablePlugins(ctx context.Context, request * return pis.pluginRegistryClient.GetAll(ctx, getAllRequest) } +func (pis *PluginInternalServer) GetAvailablePlugins(ctx context.Context, request *pipb.GetAvailablePluginsRequest) (*rpb.GetResponse, error) { + ctx, cancel := context.WithTimeout(ctx, time.Minute*1) + defer cancel() + + if err := pis.protoValidator.Validate(request); err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + getAllRequest := &rpb.GetAllRequest{ + Timestamp: time.Now().UnixNano(), + } + + return pis.pluginRegistryClient.GetAll(ctx, getAllRequest) + +} + func (pis *PluginInternalServer) GetPluginSchema(request *pipb.GetPluginSchemaRequest, stream pipb.PluginInternalService_GetPluginSchemaServer) error { labels := prometheus.Labels{"service": "plugin", "rpc": "get plugin schema"} start := metrics.StartHook(labels, grpcRequestsTotal) diff --git a/react-ui/src/components/login/view/login.view.tsx b/react-ui/src/components/login/view/login.view.tsx index 62c84eeb8b07dae2c3e2aa180d36a14d8761e18f..6b782e8779abdd754158d9b565fd78fdec5c4344 100755 --- a/react-ui/src/components/login/view/login.view.tsx +++ b/react-ui/src/components/login/view/login.view.tsx @@ -31,7 +31,7 @@ const LoginView: React.FC<BasicProp> = () => { <Image src={logo} alt="logo" height={150} /> </Row> <Row className="mt-2 justify-content-center"> - <Col md={6} sm={10} className="c-box p-4"> + <Col md={6} sm={10} className="c-box p-4 bg-white"> <h1 className="text-center h2">goSDN - Web</h1> {handleErrorMessageRendering(invalidForm, invalidCredentials)}