| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: vpn.proto
- package pb
- import proto "github.com/golang/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import _ "google.golang.org/genproto/googleapis/api/annotations"
- 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 VPNProto int32
- const (
- VPNProto_NOPREF VPNProto = 0
- VPNProto_UDP VPNProto = 1
- VPNProto_TCP VPNProto = 2
- )
- var VPNProto_name = map[int32]string{
- 0: "NOPREF",
- 1: "UDP",
- 2: "TCP",
- }
- var VPNProto_value = map[string]int32{
- "NOPREF": 0,
- "UDP": 1,
- "TCP": 2,
- }
- func (x VPNProto) String() string {
- return proto.EnumName(VPNProto_name, int32(x))
- }
- func (VPNProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
- type VPNStatusRequest struct {
- }
- func (m *VPNStatusRequest) Reset() { *m = VPNStatusRequest{} }
- func (m *VPNStatusRequest) String() string { return proto.CompactTextString(m) }
- func (*VPNStatusRequest) ProtoMessage() {}
- func (*VPNStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
- type VPNInitRequest struct {
- Hostname string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"`
- Port string `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"`
- ProtoPref VPNProto `protobuf:"varint,3,opt,name=proto_pref,json=protoPref,enum=pb.VPNProto" json:"proto_pref,omitempty"`
- IpBlock string `protobuf:"bytes,4,opt,name=ip_block,json=ipBlock" json:"ip_block,omitempty"`
- Dns string `protobuf:"bytes,5,opt,name=dns" json:"dns,omitempty"`
- }
- func (m *VPNInitRequest) Reset() { *m = VPNInitRequest{} }
- func (m *VPNInitRequest) String() string { return proto.CompactTextString(m) }
- func (*VPNInitRequest) ProtoMessage() {}
- func (*VPNInitRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
- func (m *VPNInitRequest) GetHostname() string {
- if m != nil {
- return m.Hostname
- }
- return ""
- }
- func (m *VPNInitRequest) GetPort() string {
- if m != nil {
- return m.Port
- }
- return ""
- }
- func (m *VPNInitRequest) GetProtoPref() VPNProto {
- if m != nil {
- return m.ProtoPref
- }
- return VPNProto_NOPREF
- }
- func (m *VPNInitRequest) GetIpBlock() string {
- if m != nil {
- return m.IpBlock
- }
- return ""
- }
- func (m *VPNInitRequest) GetDns() string {
- if m != nil {
- return m.Dns
- }
- return ""
- }
- type VPNUpdateRequest struct {
- IpBlock string `protobuf:"bytes,1,opt,name=ip_block,json=ipBlock" json:"ip_block,omitempty"`
- Dns string `protobuf:"bytes,2,opt,name=dns" json:"dns,omitempty"`
- }
- func (m *VPNUpdateRequest) Reset() { *m = VPNUpdateRequest{} }
- func (m *VPNUpdateRequest) String() string { return proto.CompactTextString(m) }
- func (*VPNUpdateRequest) ProtoMessage() {}
- func (*VPNUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
- func (m *VPNUpdateRequest) GetIpBlock() string {
- if m != nil {
- return m.IpBlock
- }
- return ""
- }
- func (m *VPNUpdateRequest) GetDns() string {
- if m != nil {
- return m.Dns
- }
- return ""
- }
- type VPNStatusResponse struct {
- Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber" json:"serial_number,omitempty"`
- Hostname string `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"`
- Port string `protobuf:"bytes,4,opt,name=port" json:"port,omitempty"`
- Cert string `protobuf:"bytes,5,opt,name=cert" json:"cert,omitempty"`
- CaCert string `protobuf:"bytes,6,opt,name=ca_cert,json=caCert" json:"ca_cert,omitempty"`
- Net string `protobuf:"bytes,7,opt,name=net" json:"net,omitempty"`
- Mask string `protobuf:"bytes,8,opt,name=mask" json:"mask,omitempty"`
- CreatedAt string `protobuf:"bytes,9,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
- Proto string `protobuf:"bytes,10,opt,name=proto" json:"proto,omitempty"`
- Dns string `protobuf:"bytes,11,opt,name=dns" json:"dns,omitempty"`
- }
- func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
- func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
- func (*VPNStatusResponse) ProtoMessage() {}
- func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
- func (m *VPNStatusResponse) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
- func (m *VPNStatusResponse) GetSerialNumber() string {
- if m != nil {
- return m.SerialNumber
- }
- return ""
- }
- func (m *VPNStatusResponse) GetHostname() string {
- if m != nil {
- return m.Hostname
- }
- return ""
- }
- func (m *VPNStatusResponse) GetPort() string {
- if m != nil {
- return m.Port
- }
- return ""
- }
- func (m *VPNStatusResponse) GetCert() string {
- if m != nil {
- return m.Cert
- }
- return ""
- }
- func (m *VPNStatusResponse) GetCaCert() string {
- if m != nil {
- return m.CaCert
- }
- return ""
- }
- func (m *VPNStatusResponse) GetNet() string {
- if m != nil {
- return m.Net
- }
- return ""
- }
- func (m *VPNStatusResponse) GetMask() string {
- if m != nil {
- return m.Mask
- }
- return ""
- }
- func (m *VPNStatusResponse) GetCreatedAt() string {
- if m != nil {
- return m.CreatedAt
- }
- return ""
- }
- func (m *VPNStatusResponse) GetProto() string {
- if m != nil {
- return m.Proto
- }
- return ""
- }
- func (m *VPNStatusResponse) GetDns() string {
- if m != nil {
- return m.Dns
- }
- return ""
- }
- type VPNInitResponse struct {
- }
- func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
- func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
- func (*VPNInitResponse) ProtoMessage() {}
- func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
- type VPNUpdateResponse struct {
- }
- func (m *VPNUpdateResponse) Reset() { *m = VPNUpdateResponse{} }
- func (m *VPNUpdateResponse) String() string { return proto.CompactTextString(m) }
- func (*VPNUpdateResponse) ProtoMessage() {}
- func (*VPNUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
- func init() {
- proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
- proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
- proto.RegisterType((*VPNUpdateRequest)(nil), "pb.VPNUpdateRequest")
- proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
- proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
- proto.RegisterType((*VPNUpdateResponse)(nil), "pb.VPNUpdateResponse")
- proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
- }
- // 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 VPNService service
- type VPNServiceClient interface {
- Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
- Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
- Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error)
- }
- type vPNServiceClient struct {
- cc *grpc.ClientConn
- }
- func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
- return &vPNServiceClient{cc}
- }
- func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
- out := new(VPNStatusResponse)
- err := grpc.Invoke(ctx, "/pb.VPNService/Status", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
- out := new(VPNInitResponse)
- err := grpc.Invoke(ctx, "/pb.VPNService/Init", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *vPNServiceClient) Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error) {
- out := new(VPNUpdateResponse)
- err := grpc.Invoke(ctx, "/pb.VPNService/Update", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for VPNService service
- type VPNServiceServer interface {
- Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
- Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
- Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error)
- }
- func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
- s.RegisterService(&_VPNService_serviceDesc, srv)
- }
- func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VPNStatusRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(VPNServiceServer).Status(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.VPNService/Status",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VPNInitRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(VPNServiceServer).Init(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.VPNService/Init",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _VPNService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VPNUpdateRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(VPNServiceServer).Update(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.VPNService/Update",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(VPNServiceServer).Update(ctx, req.(*VPNUpdateRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _VPNService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.VPNService",
- HandlerType: (*VPNServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Status",
- Handler: _VPNService_Status_Handler,
- },
- {
- MethodName: "Init",
- Handler: _VPNService_Init_Handler,
- },
- {
- MethodName: "Update",
- Handler: _VPNService_Update_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "vpn.proto",
- }
- func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
- var fileDescriptor1 = []byte{
- // 502 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74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