|
|
@@ -0,0 +1,318 @@
|
|
|
+// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
+// source: network.proto
|
|
|
+
|
|
|
+package pb
|
|
|
+
|
|
|
+import proto "github.com/golang/protobuf/proto"
|
|
|
+import fmt "fmt"
|
|
|
+import math "math"
|
|
|
+
|
|
|
+import (
|
|
|
+ context "golang.org/x/net/context"
|
|
|
+ grpc "google.golang.org/grpc"
|
|
|
+)
|
|
|
+
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
+var _ = proto.Marshal
|
|
|
+var _ = fmt.Errorf
|
|
|
+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"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkCreateRequest) Reset() { *m = NetworkCreateRequest{} }
|
|
|
+func (m *NetworkCreateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*NetworkCreateRequest) ProtoMessage() {}
|
|
|
+func (*NetworkCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
|
|
+
|
|
|
+func (m *NetworkCreateRequest) GetName() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Name
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkCreateRequest) GetCIDR() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.CIDR
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+type NetworkListRequest struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkListRequest) Reset() { *m = NetworkListRequest{} }
|
|
|
+func (m *NetworkListRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*NetworkListRequest) ProtoMessage() {}
|
|
|
+func (*NetworkListRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
|
|
+
|
|
|
+type NetworkDeleteRequest struct {
|
|
|
+ Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *NetworkDeleteRequest) Reset() { *m = NetworkDeleteRequest{} }
|
|
|
+func (m *NetworkDeleteRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*NetworkDeleteRequest) ProtoMessage() {}
|
|
|
+func (*NetworkDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
|
|
|
+
|
|
|
+func (m *NetworkDeleteRequest) GetName() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Name
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+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"`
|
|
|
+}
|
|
|
+
|
|
|
+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 (m *Network) GetName() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Name
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Network) GetCIDR() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.CIDR
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Network) GetCreatedAt() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.CreatedAt
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+type NetworkCreateResponse struct {
|
|
|
+ Network *Network `protobuf:"bytes,1,opt,name=Network" json:"Network,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+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 (m *NetworkCreateResponse) GetNetwork() *Network {
|
|
|
+ if m != nil {
|
|
|
+ return m.Network
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type NetworkListResponse struct {
|
|
|
+ Networks []*Network `protobuf:"bytes,1,rep,name=Networks" json:"Networks,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+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 (m *NetworkListResponse) GetNetworks() []*Network {
|
|
|
+ if m != nil {
|
|
|
+ return m.Networks
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type NetworkDeleteResponse struct {
|
|
|
+ Network *Network `protobuf:"bytes,1,opt,name=Network" json:"Network,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+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 (m *NetworkDeleteResponse) GetNetwork() *Network {
|
|
|
+ if m != nil {
|
|
|
+ return m.Network
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ proto.RegisterType((*NetworkCreateRequest)(nil), "pb.NetworkCreateRequest")
|
|
|
+ proto.RegisterType((*NetworkListRequest)(nil), "pb.NetworkListRequest")
|
|
|
+ proto.RegisterType((*NetworkDeleteRequest)(nil), "pb.NetworkDeleteRequest")
|
|
|
+ proto.RegisterType((*Network)(nil), "pb.Network")
|
|
|
+ proto.RegisterType((*NetworkCreateResponse)(nil), "pb.NetworkCreateResponse")
|
|
|
+ proto.RegisterType((*NetworkListResponse)(nil), "pb.NetworkListResponse")
|
|
|
+ proto.RegisterType((*NetworkDeleteResponse)(nil), "pb.NetworkDeleteResponse")
|
|
|
+}
|
|
|
+
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
+var _ context.Context
|
|
|
+var _ grpc.ClientConn
|
|
|
+
|
|
|
+// 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.SupportPackageIsVersion4
|
|
|
+
|
|
|
+// Client API for NetworkService service
|
|
|
+
|
|
|
+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)
|
|
|
+}
|
|
|
+
|
|
|
+type networkServiceClient struct {
|
|
|
+ cc *grpc.ClientConn
|
|
|
+}
|
|
|
+
|
|
|
+func NewNetworkServiceClient(cc *grpc.ClientConn) NetworkServiceClient {
|
|
|
+ return &networkServiceClient{cc}
|
|
|
+}
|
|
|
+
|
|
|
+func (c *networkServiceClient) Create(ctx context.Context, in *NetworkCreateRequest, opts ...grpc.CallOption) (*NetworkCreateResponse, error) {
|
|
|
+ out := new(NetworkCreateResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/pb.NetworkService/Create", in, out, c.cc, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *networkServiceClient) List(ctx context.Context, in *NetworkListRequest, opts ...grpc.CallOption) (*NetworkListResponse, error) {
|
|
|
+ out := new(NetworkListResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/pb.NetworkService/List", in, out, c.cc, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *networkServiceClient) Delete(ctx context.Context, in *NetworkDeleteRequest, opts ...grpc.CallOption) (*NetworkDeleteResponse, error) {
|
|
|
+ out := new(NetworkDeleteResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/pb.NetworkService/Delete", 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)
|
|
|
+}
|
|
|
+
|
|
|
+func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer) {
|
|
|
+ s.RegisterService(&_NetworkService_serviceDesc, srv)
|
|
|
+}
|
|
|
+
|
|
|
+func _NetworkService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(NetworkCreateRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(NetworkServiceServer).Create(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/pb.NetworkService/Create",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(NetworkServiceServer).Create(ctx, req.(*NetworkCreateRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _NetworkService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(NetworkListRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(NetworkServiceServer).List(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/pb.NetworkService/List",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(NetworkServiceServer).List(ctx, req.(*NetworkListRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _NetworkService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(NetworkDeleteRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(NetworkServiceServer).Delete(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/pb.NetworkService/Delete",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(NetworkServiceServer).Delete(ctx, req.(*NetworkDeleteRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+var _NetworkService_serviceDesc = grpc.ServiceDesc{
|
|
|
+ ServiceName: "pb.NetworkService",
|
|
|
+ HandlerType: (*NetworkServiceServer)(nil),
|
|
|
+ Methods: []grpc.MethodDesc{
|
|
|
+ {
|
|
|
+ MethodName: "Create",
|
|
|
+ Handler: _NetworkService_Create_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "List",
|
|
|
+ Handler: _NetworkService_List_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "Delete",
|
|
|
+ Handler: _NetworkService_Delete_Handler,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Streams: []grpc.StreamDesc{},
|
|
|
+ Metadata: "network.proto",
|
|
|
+}
|
|
|
+
|
|
|
+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,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