diff --git a/go/gosdn/core/core.pb.go b/go/gosdn/core/core.pb.go index 47251058ea303989abe461277654d2492e4a2637..9b30267d9885304ab4ee41129977b078a4b22373 100644 --- a/go/gosdn/core/core.pb.go +++ b/go/gosdn/core/core.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.17.2 // source: gosdn/core/core.proto package core diff --git a/go/gosdn/csbi/csbi.pb.go b/go/gosdn/csbi/csbi.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..a7887b09ea4cda4c4213100facde9a95ef405615 --- /dev/null +++ b/go/gosdn/csbi/csbi.pb.go @@ -0,0 +1,615 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/csbi/csbi.proto + +package csbi + +import ( + pnd "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DeleteResponseStatus int32 + +const ( + DeleteResponse_OK DeleteResponseStatus = 0 + DeleteResponse_ERROR DeleteResponseStatus = 1 +) + +// Enum value maps for DeleteResponseStatus. +var ( + DeleteResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + DeleteResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x DeleteResponseStatus) Enum() *DeleteResponseStatus { + p := new(DeleteResponseStatus) + *p = x + return p +} + +func (x DeleteResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_csbi_csbi_proto_enumTypes[0].Descriptor() +} + +func (DeleteResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_csbi_csbi_proto_enumTypes[0] +} + +func (x DeleteResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteResponseStatus.Descriptor instead. +func (DeleteResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{5, 0} +} + +type GetRequest 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. + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` + Pid []string `protobuf:"bytes,3,rep,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{0} +} + +func (x *GetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetRequest) GetPid() []string { + if x != nil { + return x.Pid + } + return nil +} + +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. + Pnd []*pnd.PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{1} +} + +func (x *GetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetResponse) GetPnd() []*pnd.PrincipalNetworkDomain { + if x != nil { + return x.Pnd + } + return nil +} + +type CreateRequest 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. + Device []*pnd.OrchestratedNetworkingDevice `protobuf:"bytes,2,rep,name=device,proto3" json:"device,omitempty"` +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *CreateRequest) GetDevice() []*pnd.OrchestratedNetworkingDevice { + if x != nil { + return x.Device + } + return nil +} + +type CreateResponse 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. + Device []*pnd.OrchestratedNetworkingDevice `protobuf:"bytes,2,rep,name=device,proto3" json:"device,omitempty"` +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *CreateResponse) GetDevice() []*pnd.OrchestratedNetworkingDevice { + if x != nil { + return x.Device + } + return nil +} + +type DeleteRequest 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. + Device []*pnd.OrchestratedNetworkingDevice `protobuf:"bytes,2,rep,name=device,proto3" json:"device,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteRequest) GetDevice() []*pnd.OrchestratedNetworkingDevice { + if x != nil { + return x.Device + } + return nil +} + +type DeleteResponse 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. + Status DeleteResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.csbi.DeleteResponseStatus" json:"Status,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteResponse) GetStatus() DeleteResponseStatus { + if x != nil { + return x.Status + } + return DeleteResponse_OK +} + +var File_gosdn_csbi_csbi_proto protoreflect.FileDescriptor + +var file_gosdn_csbi_csbi_proto_rawDesc = []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, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, + 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 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, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x60, 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, 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x6e, 0x0a, 0x0d, 0x43, 0x72, + 0x65, 0x61, 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, 0x3f, 0x0a, 0x06, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x6f, 0x0a, 0x0e, 0x43, 0x72, + 0x65, 0x61, 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, 0x12, 0x3f, 0x0a, 0x06, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x6e, 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, 0x3f, 0x0a, 0x06, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x86, 0x01, 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, 0x12, 0x39, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x01, 0x32, 0xc0, 0x01, 0x0a, 0x04, 0x63, 0x73, 0x62, 0x69, 0x12, 0x36, 0x0a, + 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, + 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, + 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2e, + 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, + 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, + 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 +) + +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) + }) + return file_gosdn_csbi_csbi_proto_rawDescData +} + +var file_gosdn_csbi_csbi_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gosdn_csbi_csbi_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_gosdn_csbi_csbi_proto_goTypes = []interface{}{ + (DeleteResponseStatus)(0), // 0: gosdn.csbi.DeleteResponse.status + (*GetRequest)(nil), // 1: gosdn.csbi.GetRequest + (*GetResponse)(nil), // 2: gosdn.csbi.GetResponse + (*CreateRequest)(nil), // 3: gosdn.csbi.CreateRequest + (*CreateResponse)(nil), // 4: gosdn.csbi.CreateResponse + (*DeleteRequest)(nil), // 5: gosdn.csbi.DeleteRequest + (*DeleteResponse)(nil), // 6: gosdn.csbi.DeleteResponse + (*pnd.PrincipalNetworkDomain)(nil), // 7: gosdn.pnd.PrincipalNetworkDomain + (*pnd.OrchestratedNetworkingDevice)(nil), // 8: gosdn.pnd.OrchestratedNetworkingDevice +} +var file_gosdn_csbi_csbi_proto_depIdxs = []int32{ + 7, // 0: gosdn.csbi.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain + 8, // 1: gosdn.csbi.CreateRequest.device:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 8, // 2: gosdn.csbi.CreateResponse.device:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 8, // 3: gosdn.csbi.DeleteRequest.device:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 0, // 4: gosdn.csbi.DeleteResponse.Status:type_name -> gosdn.csbi.DeleteResponse.status + 1, // 5: gosdn.csbi.csbi.Get:input_type -> gosdn.csbi.GetRequest + 3, // 6: gosdn.csbi.csbi.Create:input_type -> gosdn.csbi.CreateRequest + 5, // 7: gosdn.csbi.csbi.Delete:input_type -> gosdn.csbi.DeleteRequest + 2, // 8: gosdn.csbi.csbi.Get:output_type -> gosdn.csbi.GetResponse + 4, // 9: gosdn.csbi.csbi.Create:output_type -> gosdn.csbi.CreateResponse + 6, // 10: gosdn.csbi.csbi.Delete:output_type -> gosdn.csbi.DeleteResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_gosdn_csbi_csbi_proto_init() } +func file_gosdn_csbi_csbi_proto_init() { + if File_gosdn_csbi_csbi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_csbi_csbi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_csbi_csbi_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_csbi_csbi_proto_goTypes, + DependencyIndexes: file_gosdn_csbi_csbi_proto_depIdxs, + EnumInfos: file_gosdn_csbi_csbi_proto_enumTypes, + 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/go/gosdn/csbi/csbi_grpc.pb.go b/go/gosdn/csbi/csbi_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..74028ead4e3ee7df759752ec30371bea07760e42 --- /dev/null +++ b/go/gosdn/csbi/csbi_grpc.pb.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package csbi + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// CsbiClient is the client API for Csbi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CsbiClient interface { + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) +} + +type csbiClient struct { + cc grpc.ClientConnInterface +} + +func NewCsbiClient(cc grpc.ClientConnInterface) CsbiClient { + return &csbiClient{cc} +} + +func (c *csbiClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { + out := new(GetResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *csbiClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + out := new(CreateResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *csbiClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CsbiServer is the server API for Csbi service. +// All implementations must embed UnimplementedCsbiServer +// for forward compatibility +type CsbiServer interface { + Get(context.Context, *GetRequest) (*GetResponse, error) + Create(context.Context, *CreateRequest) (*CreateResponse, error) + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + mustEmbedUnimplementedCsbiServer() +} + +// UnimplementedCsbiServer must be embedded to have forward compatible implementations. +type UnimplementedCsbiServer struct { +} + +func (*UnimplementedCsbiServer) Get(context.Context, *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedCsbiServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedCsbiServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedCsbiServer) mustEmbedUnimplementedCsbiServer() {} + +func RegisterCsbiServer(s *grpc.Server, srv CsbiServer) { + s.RegisterService(&_Csbi_serviceDesc, srv) +} + +func _Csbi_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Get(ctx, req.(*GetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Csbi_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Csbi_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Csbi_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.csbi.csbi", + HandlerType: (*CsbiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _Csbi_Get_Handler, + }, + { + MethodName: "Create", + Handler: _Csbi_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _Csbi_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/csbi/csbi.proto", +} diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go index 1d33294337581bd6cc16b8665f708971d37420f7..c9bb0e275367e840e75d1710a404cc45933da7a8 100644 --- a/go/gosdn/pnd/pnd.pb.go +++ b/go/gosdn/pnd/pnd.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.17.2 // source: gosdn/pnd/pnd.proto package pnd diff --git a/go/gosdn/southbound/southbound.pb.go b/go/gosdn/southbound/southbound.pb.go index e7d6677ce1dd6f14b026338e64f9d9f0ceb8260e..73e17e806a6fa0ab3dd920c35b15e70ff2fc52e5 100644 --- a/go/gosdn/southbound/southbound.pb.go +++ b/go/gosdn/southbound/southbound.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.17.2 // source: gosdn/southbound/southbound.proto package southbound diff --git a/go/gosdn/transport/transport.pb.go b/go/gosdn/transport/transport.pb.go index c58abfee6312272f17cac71bcc5bd0a865eb582b..2cba6ef7f49f25abe33137c7d2b220a22d131e74 100644 --- a/go/gosdn/transport/transport.pb.go +++ b/go/gosdn/transport/transport.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.17.2 // source: gosdn/transport/transport.proto package transport diff --git a/proto/gosdn/csbi/csbi.proto b/proto/gosdn/csbi/csbi.proto new file mode 100644 index 0000000000000000000000000000000000000000..c789b9bf49633f159e99e63da568fda6d2ac30fe --- /dev/null +++ b/proto/gosdn/csbi/csbi.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +package gosdn.csbi; + +import "gosdn/pnd/pnd.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/csbi"; + +service csbi { + rpc Get(GetRequest) returns (GetResponse); + rpc Create(CreateRequest) returns (CreateResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); +} + +message GetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + bool all = 2; + repeated string pid = 3; +} +message GetResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.pnd.PrincipalNetworkDomain pnd = 2; +} +message CreateRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.pnd.OrchestratedNetworkingDevice device = 2; +} + +message CreateResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.pnd.OrchestratedNetworkingDevice device = 2; +} + +message DeleteRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.pnd.OrchestratedNetworkingDevice device = 2; +} + +message DeleteResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; +}