vpn.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 VPNStatusResponse struct {
  84. Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
  85. SerialNumber string `protobuf:"bytes,2,opt,name=SerialNumber" json:"SerialNumber,omitempty"`
  86. Hostname string `protobuf:"bytes,3,opt,name=Hostname" json:"Hostname,omitempty"`
  87. Port string `protobuf:"bytes,4,opt,name=Port" json:"Port,omitempty"`
  88. Cert string `protobuf:"bytes,5,opt,name=Cert" json:"Cert,omitempty"`
  89. CACert string `protobuf:"bytes,6,opt,name=CACert" json:"CACert,omitempty"`
  90. Net string `protobuf:"bytes,7,opt,name=Net" json:"Net,omitempty"`
  91. Mask string `protobuf:"bytes,8,opt,name=Mask" json:"Mask,omitempty"`
  92. CreatedAt string `protobuf:"bytes,9,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
  93. Proto string `protobuf:"bytes,10,opt,name=Proto" json:"Proto,omitempty"`
  94. DNS string `protobuf:"bytes,11,opt,name=DNS" json:"DNS,omitempty"`
  95. }
  96. func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
  97. func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
  98. func (*VPNStatusResponse) ProtoMessage() {}
  99. func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  100. func (m *VPNStatusResponse) GetName() string {
  101. if m != nil {
  102. return m.Name
  103. }
  104. return ""
  105. }
  106. func (m *VPNStatusResponse) GetSerialNumber() string {
  107. if m != nil {
  108. return m.SerialNumber
  109. }
  110. return ""
  111. }
  112. func (m *VPNStatusResponse) GetHostname() string {
  113. if m != nil {
  114. return m.Hostname
  115. }
  116. return ""
  117. }
  118. func (m *VPNStatusResponse) GetPort() string {
  119. if m != nil {
  120. return m.Port
  121. }
  122. return ""
  123. }
  124. func (m *VPNStatusResponse) GetCert() string {
  125. if m != nil {
  126. return m.Cert
  127. }
  128. return ""
  129. }
  130. func (m *VPNStatusResponse) GetCACert() string {
  131. if m != nil {
  132. return m.CACert
  133. }
  134. return ""
  135. }
  136. func (m *VPNStatusResponse) GetNet() string {
  137. if m != nil {
  138. return m.Net
  139. }
  140. return ""
  141. }
  142. func (m *VPNStatusResponse) GetMask() string {
  143. if m != nil {
  144. return m.Mask
  145. }
  146. return ""
  147. }
  148. func (m *VPNStatusResponse) GetCreatedAt() string {
  149. if m != nil {
  150. return m.CreatedAt
  151. }
  152. return ""
  153. }
  154. func (m *VPNStatusResponse) GetProto() string {
  155. if m != nil {
  156. return m.Proto
  157. }
  158. return ""
  159. }
  160. func (m *VPNStatusResponse) GetDNS() string {
  161. if m != nil {
  162. return m.DNS
  163. }
  164. return ""
  165. }
  166. type VPNInitResponse struct {
  167. }
  168. func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
  169. func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
  170. func (*VPNInitResponse) ProtoMessage() {}
  171. func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  172. func init() {
  173. proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
  174. proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
  175. proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
  176. proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
  177. proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
  178. }
  179. // Reference imports to suppress errors if they are not otherwise used.
  180. var _ context.Context
  181. var _ grpc.ClientConn
  182. // This is a compile-time assertion to ensure that this generated file
  183. // is compatible with the grpc package it is being compiled against.
  184. const _ = grpc.SupportPackageIsVersion4
  185. // Client API for VPNService service
  186. type VPNServiceClient interface {
  187. Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
  188. Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
  189. }
  190. type vPNServiceClient struct {
  191. cc *grpc.ClientConn
  192. }
  193. func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
  194. return &vPNServiceClient{cc}
  195. }
  196. func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
  197. out := new(VPNStatusResponse)
  198. err := grpc.Invoke(ctx, "/pb.VPNService/Status", in, out, c.cc, opts...)
  199. if err != nil {
  200. return nil, err
  201. }
  202. return out, nil
  203. }
  204. func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
  205. out := new(VPNInitResponse)
  206. err := grpc.Invoke(ctx, "/pb.VPNService/Init", in, out, c.cc, opts...)
  207. if err != nil {
  208. return nil, err
  209. }
  210. return out, nil
  211. }
  212. // Server API for VPNService service
  213. type VPNServiceServer interface {
  214. Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
  215. Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
  216. }
  217. func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
  218. s.RegisterService(&_VPNService_serviceDesc, srv)
  219. }
  220. func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  221. in := new(VPNStatusRequest)
  222. if err := dec(in); err != nil {
  223. return nil, err
  224. }
  225. if interceptor == nil {
  226. return srv.(VPNServiceServer).Status(ctx, in)
  227. }
  228. info := &grpc.UnaryServerInfo{
  229. Server: srv,
  230. FullMethod: "/pb.VPNService/Status",
  231. }
  232. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  233. return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
  234. }
  235. return interceptor(ctx, in, info, handler)
  236. }
  237. func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  238. in := new(VPNInitRequest)
  239. if err := dec(in); err != nil {
  240. return nil, err
  241. }
  242. if interceptor == nil {
  243. return srv.(VPNServiceServer).Init(ctx, in)
  244. }
  245. info := &grpc.UnaryServerInfo{
  246. Server: srv,
  247. FullMethod: "/pb.VPNService/Init",
  248. }
  249. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  250. return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
  251. }
  252. return interceptor(ctx, in, info, handler)
  253. }
  254. var _VPNService_serviceDesc = grpc.ServiceDesc{
  255. ServiceName: "pb.VPNService",
  256. HandlerType: (*VPNServiceServer)(nil),
  257. Methods: []grpc.MethodDesc{
  258. {
  259. MethodName: "Status",
  260. Handler: _VPNService_Status_Handler,
  261. },
  262. {
  263. MethodName: "Init",
  264. Handler: _VPNService_Init_Handler,
  265. },
  266. },
  267. Streams: []grpc.StreamDesc{},
  268. Metadata: "vpn.proto",
  269. }
  270. func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
  271. var fileDescriptor1 = []byte{
  272. // 434 bytes of a gzipped FileDescriptorProto
  273. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcd, 0x6e, 0xd3, 0x40,
  274. 0x10, 0xc6, 0x8e, 0xeb, 0xc4, 0x43, 0x14, 0x9c, 0x69, 0x81, 0x25, 0xea, 0xa1, 0xf2, 0x29, 0xca,
  275. 0x21, 0x16, 0xe5, 0xd6, 0x5b, 0x49, 0x41, 0xed, 0x81, 0x65, 0x95, 0x40, 0xee, 0x4e, 0x59, 0x2a,
  276. 0xab, 0xe9, 0xee, 0xb2, 0xbb, 0xc9, 0x03, 0xf0, 0x0a, 0xbd, 0xf0, 0x08, 0xbc, 0x0f, 0xaf, 0xc0,
  277. 0x83, 0x20, 0x8f, 0x9d, 0x3f, 0xa4, 0xde, 0xbe, 0xf9, 0xc6, 0xf3, 0xf9, 0x9b, 0x6f, 0x07, 0x92,
  278. 0xb5, 0x51, 0x63, 0x63, 0xb5, 0xd7, 0x18, 0x9a, 0xc5, 0xe0, 0xf4, 0x4e, 0xeb, 0xbb, 0xa5, 0xcc,
  279. 0x0b, 0x53, 0xe6, 0x85, 0x52, 0xda, 0x17, 0xbe, 0xd4, 0xca, 0xd5, 0x5f, 0x64, 0x08, 0xe9, 0x5c,
  280. 0xf0, 0x99, 0x2f, 0xfc, 0xca, 0x4d, 0xe5, 0x8f, 0x95, 0x74, 0x3e, 0xfb, 0x15, 0x40, 0x6f, 0x2e,
  281. 0xf8, 0x8d, 0x2a, 0x7d, 0x43, 0xe1, 0x00, 0x3a, 0xd7, 0xda, 0x79, 0x55, 0x3c, 0x48, 0x16, 0x9c,
  282. 0x05, 0xc3, 0x64, 0xba, 0xad, 0x11, 0x21, 0x12, 0xda, 0x7a, 0x16, 0x12, 0x4f, 0x18, 0x47, 0x90,
  283. 0x88, 0x4a, 0xdf, 0x58, 0xf9, 0x9d, 0xb5, 0xce, 0x82, 0x61, 0xef, 0xbc, 0x3b, 0x36, 0x8b, 0xf1,
  284. 0x5c, 0x70, 0xe2, 0xa7, 0xbb, 0x36, 0x32, 0x68, 0xdf, 0x88, 0xf7, 0x4b, 0x7d, 0x7b, 0xcf, 0x22,
  285. 0x92, 0xd8, 0x94, 0x98, 0x42, 0xeb, 0x8a, 0xcf, 0xd8, 0x11, 0xb1, 0x15, 0xcc, 0x1e, 0x43, 0xe8,
  286. 0xef, 0xf9, 0x75, 0x46, 0x2b, 0x47, 0x0e, 0xf8, 0xce, 0x19, 0x61, 0xcc, 0xa0, 0x3b, 0x93, 0xb6,
  287. 0x2c, 0x96, 0x7c, 0xf5, 0xb0, 0x90, 0xb6, 0x71, 0x77, 0xc0, 0x1d, 0x6c, 0xd5, 0x7a, 0x62, 0xab,
  288. 0x68, 0x6f, 0x2b, 0x84, 0x68, 0x22, 0xad, 0x6f, 0x0c, 0x11, 0xc6, 0x57, 0x10, 0x4f, 0x2e, 0x89,
  289. 0x8d, 0x89, 0x6d, 0xaa, 0xca, 0x3b, 0x97, 0x9e, 0xb5, 0x6b, 0xef, 0x5c, 0xd2, 0xf4, 0xa7, 0xc2,
  290. 0xdd, 0xb3, 0x4e, 0x3d, 0x5d, 0x61, 0x3c, 0x85, 0x64, 0x62, 0x65, 0xe1, 0xe5, 0xb7, 0x4b, 0xcf,
  291. 0x12, 0x6a, 0xec, 0x08, 0x3c, 0x81, 0x23, 0x8a, 0x89, 0x01, 0x75, 0xea, 0x62, 0x93, 0xca, 0xf3,
  292. 0x5d, 0x2a, 0x7d, 0x78, 0xb1, 0x7d, 0xaf, 0x3a, 0x92, 0xd1, 0x10, 0x3a, 0x9b, 0xac, 0x11, 0x20,
  293. 0xe6, 0x9f, 0xc5, 0xf4, 0xc3, 0xc7, 0xf4, 0x19, 0xb6, 0xa1, 0xf5, 0xf5, 0x4a, 0xa4, 0x41, 0x05,
  294. 0xbe, 0x4c, 0x44, 0x1a, 0x9e, 0xff, 0x0e, 0x00, 0xaa, 0x48, 0xa5, 0x5d, 0x97, 0xb7, 0x12, 0x05,
  295. 0xc4, 0x75, 0xba, 0x78, 0xd2, 0x3c, 0xd8, 0xc1, 0x71, 0x0c, 0x5e, 0xfe, 0xc7, 0xd6, 0xff, 0xcb,
  296. 0xde, 0xfc, 0xfc, 0xf3, 0xf7, 0x31, 0x3c, 0xce, 0x7a, 0xf9, 0xfa, 0x6d, 0xbe, 0x36, 0x2a, 0x77,
  297. 0xd4, 0xbf, 0x08, 0x46, 0x78, 0x0d, 0x51, 0x65, 0x0d, 0xb1, 0x99, 0xdc, 0xbb, 0xab, 0xc1, 0xf1,
  298. 0x01, 0xd7, 0x68, 0xbd, 0x26, 0xad, 0x7e, 0xd6, 0xdd, 0x68, 0x95, 0xaa, 0xf4, 0x17, 0xc1, 0x68,
  299. 0x11, 0xd3, 0xcd, 0xbe, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, 0x72, 0x2f, 0x46, 0x3c, 0xe2, 0x02,
  300. 0x00, 0x00,
  301. }