vpn.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: vpn.proto
  3. package pb
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "google.golang.org/genproto/googleapis/api/annotations"
  8. import (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. type VPNProto int32
  17. const (
  18. VPNProto_NOPREF VPNProto = 0
  19. VPNProto_UDP VPNProto = 1
  20. VPNProto_TCP VPNProto = 2
  21. )
  22. var VPNProto_name = map[int32]string{
  23. 0: "NOPREF",
  24. 1: "UDP",
  25. 2: "TCP",
  26. }
  27. var VPNProto_value = map[string]int32{
  28. "NOPREF": 0,
  29. "UDP": 1,
  30. "TCP": 2,
  31. }
  32. func (x VPNProto) String() string {
  33. return proto.EnumName(VPNProto_name, int32(x))
  34. }
  35. func (VPNProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
  36. type VPNStatusRequest struct {
  37. }
  38. func (m *VPNStatusRequest) Reset() { *m = VPNStatusRequest{} }
  39. func (m *VPNStatusRequest) String() string { return proto.CompactTextString(m) }
  40. func (*VPNStatusRequest) ProtoMessage() {}
  41. func (*VPNStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
  42. type VPNInitRequest struct {
  43. Hostname string `protobuf:"bytes,1,opt,name=Hostname" json:"Hostname,omitempty"`
  44. Port string `protobuf:"bytes,2,opt,name=Port" json:"Port,omitempty"`
  45. Protopref VPNProto `protobuf:"varint,3,opt,name=Protopref,enum=pb.VPNProto" json:"Protopref,omitempty"`
  46. }
  47. func (m *VPNInitRequest) Reset() { *m = VPNInitRequest{} }
  48. func (m *VPNInitRequest) String() string { return proto.CompactTextString(m) }
  49. func (*VPNInitRequest) ProtoMessage() {}
  50. func (*VPNInitRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
  51. func (m *VPNInitRequest) GetHostname() string {
  52. if m != nil {
  53. return m.Hostname
  54. }
  55. return ""
  56. }
  57. func (m *VPNInitRequest) GetPort() string {
  58. if m != nil {
  59. return m.Port
  60. }
  61. return ""
  62. }
  63. func (m *VPNInitRequest) GetProtopref() VPNProto {
  64. if m != nil {
  65. return m.Protopref
  66. }
  67. return VPNProto_NOPREF
  68. }
  69. type VPNStatusResponse struct {
  70. Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
  71. SerialNumber string `protobuf:"bytes,2,opt,name=SerialNumber" json:"SerialNumber,omitempty"`
  72. Hostname string `protobuf:"bytes,3,opt,name=Hostname" json:"Hostname,omitempty"`
  73. Port string `protobuf:"bytes,4,opt,name=Port" json:"Port,omitempty"`
  74. Cert string `protobuf:"bytes,5,opt,name=Cert" json:"Cert,omitempty"`
  75. CACert string `protobuf:"bytes,6,opt,name=CACert" json:"CACert,omitempty"`
  76. Net string `protobuf:"bytes,7,opt,name=Net" json:"Net,omitempty"`
  77. Mask string `protobuf:"bytes,8,opt,name=Mask" json:"Mask,omitempty"`
  78. CreatedAt string `protobuf:"bytes,9,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
  79. Proto string `protobuf:"bytes,10,opt,name=Proto" json:"Proto,omitempty"`
  80. }
  81. func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
  82. func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
  83. func (*VPNStatusResponse) ProtoMessage() {}
  84. func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  85. func (m *VPNStatusResponse) GetName() string {
  86. if m != nil {
  87. return m.Name
  88. }
  89. return ""
  90. }
  91. func (m *VPNStatusResponse) GetSerialNumber() string {
  92. if m != nil {
  93. return m.SerialNumber
  94. }
  95. return ""
  96. }
  97. func (m *VPNStatusResponse) GetHostname() string {
  98. if m != nil {
  99. return m.Hostname
  100. }
  101. return ""
  102. }
  103. func (m *VPNStatusResponse) GetPort() string {
  104. if m != nil {
  105. return m.Port
  106. }
  107. return ""
  108. }
  109. func (m *VPNStatusResponse) GetCert() string {
  110. if m != nil {
  111. return m.Cert
  112. }
  113. return ""
  114. }
  115. func (m *VPNStatusResponse) GetCACert() string {
  116. if m != nil {
  117. return m.CACert
  118. }
  119. return ""
  120. }
  121. func (m *VPNStatusResponse) GetNet() string {
  122. if m != nil {
  123. return m.Net
  124. }
  125. return ""
  126. }
  127. func (m *VPNStatusResponse) GetMask() string {
  128. if m != nil {
  129. return m.Mask
  130. }
  131. return ""
  132. }
  133. func (m *VPNStatusResponse) GetCreatedAt() string {
  134. if m != nil {
  135. return m.CreatedAt
  136. }
  137. return ""
  138. }
  139. func (m *VPNStatusResponse) GetProto() string {
  140. if m != nil {
  141. return m.Proto
  142. }
  143. return ""
  144. }
  145. type VPNInitResponse struct {
  146. }
  147. func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
  148. func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
  149. func (*VPNInitResponse) ProtoMessage() {}
  150. func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  151. func init() {
  152. proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
  153. proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
  154. proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
  155. proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
  156. proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
  157. }
  158. // Reference imports to suppress errors if they are not otherwise used.
  159. var _ context.Context
  160. var _ grpc.ClientConn
  161. // This is a compile-time assertion to ensure that this generated file
  162. // is compatible with the grpc package it is being compiled against.
  163. const _ = grpc.SupportPackageIsVersion4
  164. // Client API for VPNService service
  165. type VPNServiceClient interface {
  166. Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
  167. Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
  168. }
  169. type vPNServiceClient struct {
  170. cc *grpc.ClientConn
  171. }
  172. func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
  173. return &vPNServiceClient{cc}
  174. }
  175. func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
  176. out := new(VPNStatusResponse)
  177. err := grpc.Invoke(ctx, "/pb.VPNService/Status", in, out, c.cc, opts...)
  178. if err != nil {
  179. return nil, err
  180. }
  181. return out, nil
  182. }
  183. func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
  184. out := new(VPNInitResponse)
  185. err := grpc.Invoke(ctx, "/pb.VPNService/Init", in, out, c.cc, opts...)
  186. if err != nil {
  187. return nil, err
  188. }
  189. return out, nil
  190. }
  191. // Server API for VPNService service
  192. type VPNServiceServer interface {
  193. Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
  194. Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
  195. }
  196. func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
  197. s.RegisterService(&_VPNService_serviceDesc, srv)
  198. }
  199. func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  200. in := new(VPNStatusRequest)
  201. if err := dec(in); err != nil {
  202. return nil, err
  203. }
  204. if interceptor == nil {
  205. return srv.(VPNServiceServer).Status(ctx, in)
  206. }
  207. info := &grpc.UnaryServerInfo{
  208. Server: srv,
  209. FullMethod: "/pb.VPNService/Status",
  210. }
  211. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  212. return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
  213. }
  214. return interceptor(ctx, in, info, handler)
  215. }
  216. func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  217. in := new(VPNInitRequest)
  218. if err := dec(in); err != nil {
  219. return nil, err
  220. }
  221. if interceptor == nil {
  222. return srv.(VPNServiceServer).Init(ctx, in)
  223. }
  224. info := &grpc.UnaryServerInfo{
  225. Server: srv,
  226. FullMethod: "/pb.VPNService/Init",
  227. }
  228. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  229. return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
  230. }
  231. return interceptor(ctx, in, info, handler)
  232. }
  233. var _VPNService_serviceDesc = grpc.ServiceDesc{
  234. ServiceName: "pb.VPNService",
  235. HandlerType: (*VPNServiceServer)(nil),
  236. Methods: []grpc.MethodDesc{
  237. {
  238. MethodName: "Status",
  239. Handler: _VPNService_Status_Handler,
  240. },
  241. {
  242. MethodName: "Init",
  243. Handler: _VPNService_Init_Handler,
  244. },
  245. },
  246. Streams: []grpc.StreamDesc{},
  247. Metadata: "vpn.proto",
  248. }
  249. func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
  250. var fileDescriptor1 = []byte{
  251. // 406 bytes of a gzipped FileDescriptorProto
  252. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x72, 0xd3, 0x30,
  253. 0x10, 0x86, 0xb1, 0x93, 0xba, 0xf1, 0x4e, 0x26, 0x38, 0xdb, 0x02, 0x22, 0xd3, 0x43, 0x47, 0xa7,
  254. 0x4c, 0x0e, 0xf1, 0x50, 0x6e, 0xbd, 0x75, 0x0c, 0x4c, 0x39, 0x60, 0x34, 0x2e, 0xe4, 0x2e, 0x83,
  255. 0xe8, 0x78, 0x48, 0x25, 0x21, 0x29, 0xbe, 0xc3, 0x2b, 0xf0, 0x12, 0xbc, 0x0f, 0xaf, 0xc0, 0x83,
  256. 0x30, 0x92, 0xdd, 0x26, 0x66, 0x86, 0xdb, 0xbf, 0xdf, 0x66, 0x77, 0xff, 0xfc, 0x16, 0xa4, 0xad,
  257. 0x96, 0x6b, 0x6d, 0x94, 0x53, 0x18, 0xeb, 0x7a, 0x71, 0x76, 0xab, 0xd4, 0xed, 0x56, 0xe4, 0x5c,
  258. 0x37, 0x39, 0x97, 0x52, 0x39, 0xee, 0x1a, 0x25, 0x6d, 0xf7, 0x0b, 0x8a, 0x90, 0x6d, 0x58, 0x79,
  259. 0xe3, 0xb8, 0xdb, 0xd9, 0x4a, 0x7c, 0xdb, 0x09, 0xeb, 0xe8, 0x16, 0x66, 0x1b, 0x56, 0xbe, 0x95,
  260. 0x8d, 0xeb, 0x09, 0x2e, 0x60, 0x72, 0xad, 0xac, 0x93, 0xfc, 0x4e, 0x90, 0xe8, 0x3c, 0x5a, 0xa6,
  261. 0xd5, 0x43, 0x8d, 0x08, 0x63, 0xa6, 0x8c, 0x23, 0x71, 0xe0, 0x41, 0xe3, 0x0a, 0x52, 0xe6, 0xd7,
  262. 0x6b, 0x23, 0xbe, 0x90, 0xd1, 0x79, 0xb4, 0x9c, 0x5d, 0x4c, 0xd7, 0xba, 0x5e, 0x6f, 0x58, 0x19,
  263. 0x78, 0xb5, 0x6f, 0xd3, 0xef, 0x31, 0xcc, 0x0f, 0x2c, 0x58, 0xad, 0xa4, 0x0d, 0x5b, 0xcb, 0xfd,
  264. 0xb5, 0xa0, 0x91, 0xc2, 0xf4, 0x46, 0x98, 0x86, 0x6f, 0xcb, 0xdd, 0x5d, 0x2d, 0x4c, 0x7f, 0x71,
  265. 0xc0, 0x06, 0x4e, 0x47, 0xff, 0x71, 0x3a, 0x3e, 0x70, 0x8a, 0x30, 0x2e, 0x84, 0x71, 0xe4, 0xa8,
  266. 0x63, 0x5e, 0xe3, 0x53, 0x48, 0x8a, 0xab, 0x40, 0x93, 0x40, 0xfb, 0x0a, 0x33, 0x18, 0x95, 0xc2,
  267. 0x91, 0xe3, 0x00, 0xbd, 0xf4, 0xd3, 0xef, 0xb8, 0xfd, 0x4a, 0x26, 0xdd, 0xb4, 0xd7, 0x78, 0x06,
  268. 0x69, 0x61, 0x04, 0x77, 0xe2, 0xf3, 0x95, 0x23, 0x69, 0x68, 0xec, 0x01, 0x9e, 0xc2, 0x51, 0xf8,
  269. 0xeb, 0x04, 0x42, 0xa7, 0x2b, 0xe8, 0x1c, 0x1e, 0x3f, 0x24, 0xde, 0x05, 0xb0, 0x5a, 0xc2, 0xe4,
  270. 0x3e, 0x2d, 0x04, 0x48, 0xca, 0xf7, 0xac, 0x7a, 0xfd, 0x26, 0x7b, 0x84, 0xc7, 0x30, 0xfa, 0xf8,
  271. 0x8a, 0x65, 0x91, 0x17, 0x1f, 0x0a, 0x96, 0xc5, 0x17, 0xbf, 0x22, 0x00, 0x1f, 0xa0, 0x30, 0x6d,
  272. 0xf3, 0x49, 0x20, 0x83, 0xa4, 0xcb, 0x12, 0x4f, 0xfb, 0xc8, 0x07, 0x5f, 0x77, 0xf1, 0xe4, 0x1f,
  273. 0xda, 0xdd, 0xa3, 0xcf, 0x7f, 0xfc, 0xfe, 0xf3, 0x33, 0x3e, 0xa1, 0xb3, 0xbc, 0x7d, 0x91, 0xb7,
  274. 0x5a, 0xe6, 0x36, 0xf4, 0x2f, 0xa3, 0x15, 0x5e, 0xc3, 0xd8, 0x5b, 0x43, 0xec, 0x27, 0x0f, 0x5e,
  275. 0xc6, 0xe2, 0x64, 0xc0, 0xfa, 0x5d, 0xcf, 0xc2, 0xae, 0x39, 0x9d, 0xde, 0xef, 0x6a, 0x64, 0xe3,
  276. 0x2e, 0xa3, 0x55, 0x9d, 0x84, 0x47, 0xf7, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x94,
  277. 0xe6, 0xba, 0xa3, 0x02, 0x00, 0x00,
  278. }