|
|
@@ -20,6 +20,7 @@ var _ = math.Inf
|
|
|
type NetworkCreateRequest struct {
|
|
|
Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
|
|
|
CIDR string `protobuf:"bytes,2,opt,name=CIDR" json:"CIDR,omitempty"`
|
|
|
+ Type string `protobuf:"bytes,3,opt,name=Type" json:"Type,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (m *NetworkCreateRequest) Reset() { *m = NetworkCreateRequest{} }
|
|
|
@@ -41,6 +42,13 @@ func (m *NetworkCreateRequest) GetCIDR() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+func (m *NetworkCreateRequest) GetType() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Type
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
type NetworkListRequest struct {
|
|
|
}
|
|
|
|
|
|
@@ -65,16 +73,25 @@ func (m *NetworkDeleteRequest) GetName() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+type NetworkGetAllTypesRequest struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkGetAllTypesRequest) Reset() { *m = NetworkGetAllTypesRequest{} }
|
|
|
+func (m *NetworkGetAllTypesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*NetworkGetAllTypesRequest) ProtoMessage() {}
|
|
|
+func (*NetworkGetAllTypesRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
|
|
|
+
|
|
|
type Network struct {
|
|
|
Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
|
|
|
CIDR string `protobuf:"bytes,2,opt,name=CIDR" json:"CIDR,omitempty"`
|
|
|
- CreatedAt string `protobuf:"bytes,3,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
|
|
|
+ Type string `protobuf:"bytes,3,opt,name=Type" json:"Type,omitempty"`
|
|
|
+ CreatedAt string `protobuf:"bytes,4,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (m *Network) Reset() { *m = Network{} }
|
|
|
func (m *Network) String() string { return proto.CompactTextString(m) }
|
|
|
func (*Network) ProtoMessage() {}
|
|
|
-func (*Network) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
|
|
|
+func (*Network) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
|
|
|
|
|
|
func (m *Network) GetName() string {
|
|
|
if m != nil {
|
|
|
@@ -90,6 +107,13 @@ func (m *Network) GetCIDR() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+func (m *Network) GetType() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Type
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
func (m *Network) GetCreatedAt() string {
|
|
|
if m != nil {
|
|
|
return m.CreatedAt
|
|
|
@@ -104,7 +128,7 @@ type NetworkCreateResponse struct {
|
|
|
func (m *NetworkCreateResponse) Reset() { *m = NetworkCreateResponse{} }
|
|
|
func (m *NetworkCreateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
func (*NetworkCreateResponse) ProtoMessage() {}
|
|
|
-func (*NetworkCreateResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
|
|
|
+func (*NetworkCreateResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
|
|
|
|
|
|
func (m *NetworkCreateResponse) GetNetwork() *Network {
|
|
|
if m != nil {
|
|
|
@@ -120,7 +144,7 @@ type NetworkListResponse struct {
|
|
|
func (m *NetworkListResponse) Reset() { *m = NetworkListResponse{} }
|
|
|
func (m *NetworkListResponse) String() string { return proto.CompactTextString(m) }
|
|
|
func (*NetworkListResponse) ProtoMessage() {}
|
|
|
-func (*NetworkListResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
|
|
|
+func (*NetworkListResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
|
|
|
|
|
|
func (m *NetworkListResponse) GetNetworks() []*Network {
|
|
|
if m != nil {
|
|
|
@@ -136,7 +160,7 @@ type NetworkDeleteResponse struct {
|
|
|
func (m *NetworkDeleteResponse) Reset() { *m = NetworkDeleteResponse{} }
|
|
|
func (m *NetworkDeleteResponse) String() string { return proto.CompactTextString(m) }
|
|
|
func (*NetworkDeleteResponse) ProtoMessage() {}
|
|
|
-func (*NetworkDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
|
|
|
+func (*NetworkDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} }
|
|
|
|
|
|
func (m *NetworkDeleteResponse) GetNetwork() *Network {
|
|
|
if m != nil {
|
|
|
@@ -145,14 +169,32 @@ func (m *NetworkDeleteResponse) GetNetwork() *Network {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+type NetworkGetAllTypesResponse struct {
|
|
|
+ Types []string `protobuf:"bytes,1,rep,name=Types" json:"Types,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkGetAllTypesResponse) Reset() { *m = NetworkGetAllTypesResponse{} }
|
|
|
+func (m *NetworkGetAllTypesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*NetworkGetAllTypesResponse) ProtoMessage() {}
|
|
|
+func (*NetworkGetAllTypesResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{8} }
|
|
|
+
|
|
|
+func (m *NetworkGetAllTypesResponse) GetTypes() []string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Types
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
func init() {
|
|
|
proto.RegisterType((*NetworkCreateRequest)(nil), "pb.NetworkCreateRequest")
|
|
|
proto.RegisterType((*NetworkListRequest)(nil), "pb.NetworkListRequest")
|
|
|
proto.RegisterType((*NetworkDeleteRequest)(nil), "pb.NetworkDeleteRequest")
|
|
|
+ proto.RegisterType((*NetworkGetAllTypesRequest)(nil), "pb.NetworkGetAllTypesRequest")
|
|
|
proto.RegisterType((*Network)(nil), "pb.Network")
|
|
|
proto.RegisterType((*NetworkCreateResponse)(nil), "pb.NetworkCreateResponse")
|
|
|
proto.RegisterType((*NetworkListResponse)(nil), "pb.NetworkListResponse")
|
|
|
proto.RegisterType((*NetworkDeleteResponse)(nil), "pb.NetworkDeleteResponse")
|
|
|
+ proto.RegisterType((*NetworkGetAllTypesResponse)(nil), "pb.NetworkGetAllTypesResponse")
|
|
|
}
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
@@ -169,6 +211,7 @@ type NetworkServiceClient interface {
|
|
|
Create(ctx context.Context, in *NetworkCreateRequest, opts ...grpc.CallOption) (*NetworkCreateResponse, error)
|
|
|
List(ctx context.Context, in *NetworkListRequest, opts ...grpc.CallOption) (*NetworkListResponse, error)
|
|
|
Delete(ctx context.Context, in *NetworkDeleteRequest, opts ...grpc.CallOption) (*NetworkDeleteResponse, error)
|
|
|
+ GetAllTypes(ctx context.Context, in *NetworkGetAllTypesRequest, opts ...grpc.CallOption) (*NetworkGetAllTypesResponse, error)
|
|
|
}
|
|
|
|
|
|
type networkServiceClient struct {
|
|
|
@@ -206,12 +249,22 @@ func (c *networkServiceClient) Delete(ctx context.Context, in *NetworkDeleteRequ
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *networkServiceClient) GetAllTypes(ctx context.Context, in *NetworkGetAllTypesRequest, opts ...grpc.CallOption) (*NetworkGetAllTypesResponse, error) {
|
|
|
+ out := new(NetworkGetAllTypesResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/pb.NetworkService/GetAllTypes", in, out, c.cc, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
// Server API for NetworkService service
|
|
|
|
|
|
type NetworkServiceServer interface {
|
|
|
Create(context.Context, *NetworkCreateRequest) (*NetworkCreateResponse, error)
|
|
|
List(context.Context, *NetworkListRequest) (*NetworkListResponse, error)
|
|
|
Delete(context.Context, *NetworkDeleteRequest) (*NetworkDeleteResponse, error)
|
|
|
+ GetAllTypes(context.Context, *NetworkGetAllTypesRequest) (*NetworkGetAllTypesResponse, error)
|
|
|
}
|
|
|
|
|
|
func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer) {
|
|
|
@@ -272,6 +325,24 @@ func _NetworkService_Delete_Handler(srv interface{}, ctx context.Context, dec fu
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _NetworkService_GetAllTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(NetworkGetAllTypesRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(NetworkServiceServer).GetAllTypes(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/pb.NetworkService/GetAllTypes",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(NetworkServiceServer).GetAllTypes(ctx, req.(*NetworkGetAllTypesRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
var _NetworkService_serviceDesc = grpc.ServiceDesc{
|
|
|
ServiceName: "pb.NetworkService",
|
|
|
HandlerType: (*NetworkServiceServer)(nil),
|
|
|
@@ -288,6 +359,10 @@ var _NetworkService_serviceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "Delete",
|
|
|
Handler: _NetworkService_Delete_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "GetAllTypes",
|
|
|
+ Handler: _NetworkService_GetAllTypes_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "network.proto",
|
|
|
@@ -296,23 +371,26 @@ var _NetworkService_serviceDesc = grpc.ServiceDesc{
|
|
|
func init() { proto.RegisterFile("network.proto", fileDescriptor2) }
|
|
|
|
|
|
var fileDescriptor2 = []byte{
|
|
|
- // 273 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x4b, 0x2d, 0x29,
|
|
|
- 0xcf, 0x2f, 0xca, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0xb2, 0xe3,
|
|
|
- 0x12, 0xf1, 0x83, 0x08, 0x3a, 0x17, 0xa5, 0x26, 0x96, 0xa4, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16,
|
|
|
- 0x97, 0x08, 0x09, 0x71, 0xb1, 0xf8, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06,
|
|
|
- 0x81, 0xd9, 0x20, 0x31, 0x67, 0x4f, 0x97, 0x20, 0x09, 0x26, 0x88, 0x18, 0x88, 0xad, 0x24, 0xc2,
|
|
|
- 0x25, 0x04, 0xd5, 0xef, 0x93, 0x59, 0x5c, 0x02, 0xd5, 0xad, 0xa4, 0x05, 0x37, 0xd5, 0x25, 0x35,
|
|
|
- 0x27, 0x15, 0xaf, 0xa9, 0x4a, 0xfe, 0x5c, 0xec, 0x50, 0xb5, 0xc4, 0x5a, 0x2a, 0x24, 0xc3, 0xc5,
|
|
|
- 0x09, 0x71, 0x6d, 0x8a, 0x63, 0x89, 0x04, 0x33, 0x58, 0x02, 0x21, 0xa0, 0x64, 0xc7, 0x25, 0x8a,
|
|
|
- 0xe6, 0xa5, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x55, 0xb8, 0x4d, 0x60, 0x1b, 0xb8, 0x8d,
|
|
|
- 0xb8, 0xf5, 0x0a, 0x92, 0xf4, 0xa0, 0x42, 0x41, 0x30, 0x39, 0x25, 0x3b, 0x2e, 0x61, 0x14, 0x2f,
|
|
|
- 0x41, 0x75, 0xab, 0x73, 0x71, 0x40, 0x85, 0x8b, 0x25, 0x18, 0x15, 0x98, 0xd1, 0xb5, 0xc3, 0x25,
|
|
|
- 0x91, 0xec, 0x87, 0x79, 0x9e, 0x24, 0xfb, 0x8d, 0xce, 0x32, 0x72, 0xf1, 0x41, 0xd9, 0xc1, 0xa9,
|
|
|
- 0x45, 0x65, 0x99, 0xc9, 0xa9, 0x42, 0xf6, 0x5c, 0x6c, 0x10, 0xbf, 0x08, 0x49, 0x20, 0x69, 0x41,
|
|
|
- 0x89, 0x31, 0x29, 0x49, 0x2c, 0x32, 0x10, 0x8b, 0x95, 0x18, 0x84, 0x2c, 0xb9, 0x58, 0x40, 0x9e,
|
|
|
- 0x11, 0x12, 0x43, 0x52, 0x84, 0x14, 0x61, 0x52, 0xe2, 0x18, 0xe2, 0x70, 0xad, 0xf6, 0x5c, 0x6c,
|
|
|
- 0x10, 0x7f, 0xa0, 0xd8, 0x8d, 0x12, 0xaf, 0x28, 0x76, 0xa3, 0x7a, 0x5a, 0x89, 0x21, 0x89, 0x0d,
|
|
|
- 0x9c, 0xda, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x5e, 0xe8, 0x7e, 0x02, 0x00,
|
|
|
- 0x00,
|
|
|
+ // 334 bytes of a gzipped FileDescriptorProto
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x4e, 0x32, 0x41,
|
|
|
+ 0x10, 0xe4, 0xef, 0xe3, 0x93, 0x26, 0x7a, 0x68, 0x51, 0x87, 0xf5, 0x27, 0x64, 0x12, 0xa3, 0xf1,
|
|
|
+ 0xc0, 0x01, 0x4f, 0x5e, 0x20, 0x04, 0x12, 0x63, 0x62, 0x38, 0x8c, 0xbe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