vpn.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  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. IPBlock string `protobuf:"bytes,4,opt,name=IPBlock" json:"IPBlock,omitempty"`
  47. DNS string `protobuf:"bytes,5,opt,name=DNS" json:"DNS,omitempty"`
  48. }
  49. func (m *VPNInitRequest) Reset() { *m = VPNInitRequest{} }
  50. func (m *VPNInitRequest) String() string { return proto.CompactTextString(m) }
  51. func (*VPNInitRequest) ProtoMessage() {}
  52. func (*VPNInitRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
  53. func (m *VPNInitRequest) GetHostname() string {
  54. if m != nil {
  55. return m.Hostname
  56. }
  57. return ""
  58. }
  59. func (m *VPNInitRequest) GetPort() string {
  60. if m != nil {
  61. return m.Port
  62. }
  63. return ""
  64. }
  65. func (m *VPNInitRequest) GetProtopref() VPNProto {
  66. if m != nil {
  67. return m.Protopref
  68. }
  69. return VPNProto_NOPREF
  70. }
  71. func (m *VPNInitRequest) GetIPBlock() string {
  72. if m != nil {
  73. return m.IPBlock
  74. }
  75. return ""
  76. }
  77. func (m *VPNInitRequest) GetDNS() string {
  78. if m != nil {
  79. return m.DNS
  80. }
  81. return ""
  82. }
  83. type VPNUpdateRequest struct {
  84. IPBlock string `protobuf:"bytes,1,opt,name=IPBlock" json:"IPBlock,omitempty"`
  85. DNS string `protobuf:"bytes,2,opt,name=DNS" json:"DNS,omitempty"`
  86. }
  87. func (m *VPNUpdateRequest) Reset() { *m = VPNUpdateRequest{} }
  88. func (m *VPNUpdateRequest) String() string { return proto.CompactTextString(m) }
  89. func (*VPNUpdateRequest) ProtoMessage() {}
  90. func (*VPNUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  91. func (m *VPNUpdateRequest) GetIPBlock() string {
  92. if m != nil {
  93. return m.IPBlock
  94. }
  95. return ""
  96. }
  97. func (m *VPNUpdateRequest) GetDNS() string {
  98. if m != nil {
  99. return m.DNS
  100. }
  101. return ""
  102. }
  103. type VPNStatusResponse struct {
  104. Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
  105. SerialNumber string `protobuf:"bytes,2,opt,name=SerialNumber" json:"SerialNumber,omitempty"`
  106. Hostname string `protobuf:"bytes,3,opt,name=Hostname" json:"Hostname,omitempty"`
  107. Port string `protobuf:"bytes,4,opt,name=Port" json:"Port,omitempty"`
  108. Cert string `protobuf:"bytes,5,opt,name=Cert" json:"Cert,omitempty"`
  109. CACert string `protobuf:"bytes,6,opt,name=CACert" json:"CACert,omitempty"`
  110. Net string `protobuf:"bytes,7,opt,name=Net" json:"Net,omitempty"`
  111. Mask string `protobuf:"bytes,8,opt,name=Mask" json:"Mask,omitempty"`
  112. CreatedAt string `protobuf:"bytes,9,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
  113. Proto string `protobuf:"bytes,10,opt,name=Proto" json:"Proto,omitempty"`
  114. DNS string `protobuf:"bytes,11,opt,name=DNS" json:"DNS,omitempty"`
  115. }
  116. func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
  117. func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
  118. func (*VPNStatusResponse) ProtoMessage() {}
  119. func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  120. func (m *VPNStatusResponse) GetName() string {
  121. if m != nil {
  122. return m.Name
  123. }
  124. return ""
  125. }
  126. func (m *VPNStatusResponse) GetSerialNumber() string {
  127. if m != nil {
  128. return m.SerialNumber
  129. }
  130. return ""
  131. }
  132. func (m *VPNStatusResponse) GetHostname() string {
  133. if m != nil {
  134. return m.Hostname
  135. }
  136. return ""
  137. }
  138. func (m *VPNStatusResponse) GetPort() string {
  139. if m != nil {
  140. return m.Port
  141. }
  142. return ""
  143. }
  144. func (m *VPNStatusResponse) GetCert() string {
  145. if m != nil {
  146. return m.Cert
  147. }
  148. return ""
  149. }
  150. func (m *VPNStatusResponse) GetCACert() string {
  151. if m != nil {
  152. return m.CACert
  153. }
  154. return ""
  155. }
  156. func (m *VPNStatusResponse) GetNet() string {
  157. if m != nil {
  158. return m.Net
  159. }
  160. return ""
  161. }
  162. func (m *VPNStatusResponse) GetMask() string {
  163. if m != nil {
  164. return m.Mask
  165. }
  166. return ""
  167. }
  168. func (m *VPNStatusResponse) GetCreatedAt() string {
  169. if m != nil {
  170. return m.CreatedAt
  171. }
  172. return ""
  173. }
  174. func (m *VPNStatusResponse) GetProto() string {
  175. if m != nil {
  176. return m.Proto
  177. }
  178. return ""
  179. }
  180. func (m *VPNStatusResponse) GetDNS() string {
  181. if m != nil {
  182. return m.DNS
  183. }
  184. return ""
  185. }
  186. type VPNInitResponse struct {
  187. }
  188. func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
  189. func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
  190. func (*VPNInitResponse) ProtoMessage() {}
  191. func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
  192. type VPNUpdateResponse struct {
  193. }
  194. func (m *VPNUpdateResponse) Reset() { *m = VPNUpdateResponse{} }
  195. func (m *VPNUpdateResponse) String() string { return proto.CompactTextString(m) }
  196. func (*VPNUpdateResponse) ProtoMessage() {}
  197. func (*VPNUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
  198. func init() {
  199. proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
  200. proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
  201. proto.RegisterType((*VPNUpdateRequest)(nil), "pb.VPNUpdateRequest")
  202. proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
  203. proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
  204. proto.RegisterType((*VPNUpdateResponse)(nil), "pb.VPNUpdateResponse")
  205. proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
  206. }
  207. // Reference imports to suppress errors if they are not otherwise used.
  208. var _ context.Context
  209. var _ grpc.ClientConn
  210. // This is a compile-time assertion to ensure that this generated file
  211. // is compatible with the grpc package it is being compiled against.
  212. const _ = grpc.SupportPackageIsVersion4
  213. // Client API for VPNService service
  214. type VPNServiceClient interface {
  215. Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
  216. Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
  217. Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error)
  218. }
  219. type vPNServiceClient struct {
  220. cc *grpc.ClientConn
  221. }
  222. func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
  223. return &vPNServiceClient{cc}
  224. }
  225. func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
  226. out := new(VPNStatusResponse)
  227. err := grpc.Invoke(ctx, "/pb.VPNService/Status", in, out, c.cc, opts...)
  228. if err != nil {
  229. return nil, err
  230. }
  231. return out, nil
  232. }
  233. func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
  234. out := new(VPNInitResponse)
  235. err := grpc.Invoke(ctx, "/pb.VPNService/Init", in, out, c.cc, opts...)
  236. if err != nil {
  237. return nil, err
  238. }
  239. return out, nil
  240. }
  241. func (c *vPNServiceClient) Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error) {
  242. out := new(VPNUpdateResponse)
  243. err := grpc.Invoke(ctx, "/pb.VPNService/Update", in, out, c.cc, opts...)
  244. if err != nil {
  245. return nil, err
  246. }
  247. return out, nil
  248. }
  249. // Server API for VPNService service
  250. type VPNServiceServer interface {
  251. Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
  252. Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
  253. Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error)
  254. }
  255. func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
  256. s.RegisterService(&_VPNService_serviceDesc, srv)
  257. }
  258. func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  259. in := new(VPNStatusRequest)
  260. if err := dec(in); err != nil {
  261. return nil, err
  262. }
  263. if interceptor == nil {
  264. return srv.(VPNServiceServer).Status(ctx, in)
  265. }
  266. info := &grpc.UnaryServerInfo{
  267. Server: srv,
  268. FullMethod: "/pb.VPNService/Status",
  269. }
  270. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  271. return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
  272. }
  273. return interceptor(ctx, in, info, handler)
  274. }
  275. func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  276. in := new(VPNInitRequest)
  277. if err := dec(in); err != nil {
  278. return nil, err
  279. }
  280. if interceptor == nil {
  281. return srv.(VPNServiceServer).Init(ctx, in)
  282. }
  283. info := &grpc.UnaryServerInfo{
  284. Server: srv,
  285. FullMethod: "/pb.VPNService/Init",
  286. }
  287. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  288. return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
  289. }
  290. return interceptor(ctx, in, info, handler)
  291. }
  292. func _VPNService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  293. in := new(VPNUpdateRequest)
  294. if err := dec(in); err != nil {
  295. return nil, err
  296. }
  297. if interceptor == nil {
  298. return srv.(VPNServiceServer).Update(ctx, in)
  299. }
  300. info := &grpc.UnaryServerInfo{
  301. Server: srv,
  302. FullMethod: "/pb.VPNService/Update",
  303. }
  304. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  305. return srv.(VPNServiceServer).Update(ctx, req.(*VPNUpdateRequest))
  306. }
  307. return interceptor(ctx, in, info, handler)
  308. }
  309. var _VPNService_serviceDesc = grpc.ServiceDesc{
  310. ServiceName: "pb.VPNService",
  311. HandlerType: (*VPNServiceServer)(nil),
  312. Methods: []grpc.MethodDesc{
  313. {
  314. MethodName: "Status",
  315. Handler: _VPNService_Status_Handler,
  316. },
  317. {
  318. MethodName: "Init",
  319. Handler: _VPNService_Init_Handler,
  320. },
  321. {
  322. MethodName: "Update",
  323. Handler: _VPNService_Update_Handler,
  324. },
  325. },
  326. Streams: []grpc.StreamDesc{},
  327. Metadata: "vpn.proto",
  328. }
  329. func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
  330. var fileDescriptor1 = []byte{
  331. // 478 bytes of a gzipped FileDescriptorProto
  332. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
  333. 0x10, 0xc6, 0x8e, 0xeb, 0xc6, 0x43, 0x14, 0x9c, 0x49, 0x81, 0x25, 0xea, 0xa1, 0xf2, 0x29, 0xca,
  334. 0x21, 0x16, 0xe5, 0xd6, 0x03, 0x52, 0x49, 0x41, 0xed, 0x01, 0xb3, 0x4a, 0x68, 0xee, 0x9b, 0x76,
  335. 0xa9, 0xac, 0xa6, 0xbb, 0x8b, 0xbd, 0xc9, 0x03, 0xf0, 0x0a, 0xbd, 0xf0, 0x5e, 0xbc, 0x02, 0x4f,
  336. 0xc1, 0x09, 0x79, 0x6c, 0xc7, 0x31, 0x3f, 0xb7, 0x99, 0x6f, 0xfc, 0x7d, 0xfa, 0xe6, 0xdb, 0x31,
  337. 0x04, 0x5b, 0xa3, 0xa6, 0x26, 0xd3, 0x56, 0xa3, 0x6b, 0x56, 0xa3, 0xe3, 0x3b, 0xad, 0xef, 0xd6,
  338. 0x32, 0x16, 0x26, 0x8d, 0x85, 0x52, 0xda, 0x0a, 0x9b, 0x6a, 0x95, 0x97, 0x5f, 0x44, 0x08, 0xe1,
  339. 0x92, 0x27, 0x0b, 0x2b, 0xec, 0x26, 0x9f, 0xcb, 0xaf, 0x1b, 0x99, 0xdb, 0xe8, 0xbb, 0x03, 0xfd,
  340. 0x25, 0x4f, 0xae, 0x54, 0x6a, 0x2b, 0x08, 0x47, 0xd0, 0xbd, 0xd4, 0xb9, 0x55, 0xe2, 0x41, 0x32,
  341. 0xe7, 0xc4, 0x19, 0x07, 0xf3, 0x5d, 0x8f, 0x08, 0x1e, 0xd7, 0x99, 0x65, 0x2e, 0xe1, 0x54, 0xe3,
  342. 0x04, 0x02, 0x5e, 0xe8, 0x9b, 0x4c, 0x7e, 0x61, 0x9d, 0x13, 0x67, 0xdc, 0x3f, 0xed, 0x4d, 0xcd,
  343. 0x6a, 0xba, 0xe4, 0x09, 0xe1, 0xf3, 0x66, 0x8c, 0x0c, 0x0e, 0xaf, 0xf8, 0xbb, 0xb5, 0xbe, 0xb9,
  344. 0x67, 0x1e, 0x49, 0xd4, 0x2d, 0x86, 0xd0, 0xb9, 0x48, 0x16, 0xec, 0x80, 0xd0, 0xa2, 0x8c, 0xde,
  345. 0x92, 0xdd, 0x6b, 0x73, 0x2b, 0xac, 0xac, 0xbd, 0xed, 0xf1, 0x9d, 0x7f, 0xf2, 0xdd, 0x86, 0xff,
  346. 0xe8, 0xc2, 0x60, 0x6f, 0xdf, 0xdc, 0x68, 0x95, 0xd3, 0x06, 0x49, 0xb3, 0x19, 0xd5, 0x18, 0x41,
  347. 0x6f, 0x21, 0xb3, 0x54, 0xac, 0x93, 0xcd, 0xc3, 0x4a, 0x66, 0x95, 0x48, 0x0b, 0x6b, 0xa5, 0xd2,
  348. 0xf9, 0x4f, 0x2a, 0xde, 0x5e, 0x2a, 0x08, 0xde, 0x4c, 0x66, 0xb6, 0x5a, 0x88, 0x6a, 0x7c, 0x01,
  349. 0xfe, 0xec, 0x9c, 0x50, 0x9f, 0xd0, 0xaa, 0x2b, 0xbc, 0x27, 0xd2, 0xb2, 0xc3, 0xd2, 0x7b, 0x22,
  350. 0x89, 0xfd, 0x51, 0xe4, 0xf7, 0xac, 0x5b, 0xb2, 0x8b, 0x1a, 0x8f, 0x21, 0x98, 0x65, 0x52, 0x58,
  351. 0x79, 0x7b, 0x6e, 0x59, 0x40, 0x83, 0x06, 0xc0, 0x23, 0x38, 0xa0, 0x98, 0x19, 0xd0, 0xa4, 0x6c,
  352. 0xea, 0x54, 0x9e, 0x36, 0xa9, 0x0c, 0xe0, 0xd9, 0xee, 0xbd, 0xcb, 0x48, 0xa2, 0x21, 0xe5, 0x54,
  353. 0x07, 0x5d, 0x82, 0x93, 0x31, 0x74, 0xeb, 0x07, 0x44, 0x00, 0x3f, 0xf9, 0xc4, 0xe7, 0xef, 0x3f,
  354. 0x84, 0x4f, 0xf0, 0x10, 0x3a, 0xd7, 0x17, 0x3c, 0x74, 0x8a, 0xe2, 0xf3, 0x8c, 0x87, 0xee, 0xe9,
  355. 0x2f, 0x07, 0xa0, 0xc8, 0x59, 0x66, 0xdb, 0xf4, 0x46, 0x22, 0x07, 0xbf, 0x8c, 0x1c, 0x8f, 0xaa,
  356. 0x2b, 0x68, 0x5d, 0xdc, 0xe8, 0xf9, 0x1f, 0x68, 0x65, 0xe2, 0xd5, 0xb7, 0x1f, 0x3f, 0x1f, 0xdd,
  357. 0x61, 0xd4, 0x8f, 0xb7, 0xaf, 0xe3, 0xad, 0x51, 0x71, 0x4e, 0xf3, 0x33, 0x67, 0x82, 0x97, 0xe0,
  358. 0x15, 0x7e, 0x11, 0x2b, 0xe6, 0xde, 0xb1, 0x8e, 0x86, 0x2d, 0xac, 0xd2, 0x7a, 0x49, 0x5a, 0x83,
  359. 0xa8, 0x57, 0x6b, 0xa5, 0x2a, 0xb5, 0x85, 0x12, 0x07, 0xbf, 0x5c, 0x73, 0xe7, 0xad, 0x75, 0x5e,
  360. 0x3b, 0x6f, 0xed, 0x2c, 0xfe, 0xf6, 0xb6, 0xa1, 0xf9, 0x99, 0x33, 0x59, 0xf9, 0xf4, 0x6b, 0xbd,
  361. 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x98, 0x14, 0x2a, 0x0b, 0x89, 0x03, 0x00, 0x00,
  362. }