vpn.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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. }
  48. func (m *VPNInitRequest) Reset() { *m = VPNInitRequest{} }
  49. func (m *VPNInitRequest) String() string { return proto.CompactTextString(m) }
  50. func (*VPNInitRequest) ProtoMessage() {}
  51. func (*VPNInitRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
  52. func (m *VPNInitRequest) GetHostname() string {
  53. if m != nil {
  54. return m.Hostname
  55. }
  56. return ""
  57. }
  58. func (m *VPNInitRequest) GetPort() string {
  59. if m != nil {
  60. return m.Port
  61. }
  62. return ""
  63. }
  64. func (m *VPNInitRequest) GetProtopref() VPNProto {
  65. if m != nil {
  66. return m.Protopref
  67. }
  68. return VPNProto_NOPREF
  69. }
  70. func (m *VPNInitRequest) GetIPBlock() string {
  71. if m != nil {
  72. return m.IPBlock
  73. }
  74. return ""
  75. }
  76. type VPNStatusResponse struct {
  77. Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
  78. SerialNumber string `protobuf:"bytes,2,opt,name=SerialNumber" json:"SerialNumber,omitempty"`
  79. Hostname string `protobuf:"bytes,3,opt,name=Hostname" json:"Hostname,omitempty"`
  80. Port string `protobuf:"bytes,4,opt,name=Port" json:"Port,omitempty"`
  81. Cert string `protobuf:"bytes,5,opt,name=Cert" json:"Cert,omitempty"`
  82. CACert string `protobuf:"bytes,6,opt,name=CACert" json:"CACert,omitempty"`
  83. Net string `protobuf:"bytes,7,opt,name=Net" json:"Net,omitempty"`
  84. Mask string `protobuf:"bytes,8,opt,name=Mask" json:"Mask,omitempty"`
  85. CreatedAt string `protobuf:"bytes,9,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
  86. Proto string `protobuf:"bytes,10,opt,name=Proto" json:"Proto,omitempty"`
  87. }
  88. func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
  89. func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
  90. func (*VPNStatusResponse) ProtoMessage() {}
  91. func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  92. func (m *VPNStatusResponse) GetName() string {
  93. if m != nil {
  94. return m.Name
  95. }
  96. return ""
  97. }
  98. func (m *VPNStatusResponse) GetSerialNumber() string {
  99. if m != nil {
  100. return m.SerialNumber
  101. }
  102. return ""
  103. }
  104. func (m *VPNStatusResponse) GetHostname() string {
  105. if m != nil {
  106. return m.Hostname
  107. }
  108. return ""
  109. }
  110. func (m *VPNStatusResponse) GetPort() string {
  111. if m != nil {
  112. return m.Port
  113. }
  114. return ""
  115. }
  116. func (m *VPNStatusResponse) GetCert() string {
  117. if m != nil {
  118. return m.Cert
  119. }
  120. return ""
  121. }
  122. func (m *VPNStatusResponse) GetCACert() string {
  123. if m != nil {
  124. return m.CACert
  125. }
  126. return ""
  127. }
  128. func (m *VPNStatusResponse) GetNet() string {
  129. if m != nil {
  130. return m.Net
  131. }
  132. return ""
  133. }
  134. func (m *VPNStatusResponse) GetMask() string {
  135. if m != nil {
  136. return m.Mask
  137. }
  138. return ""
  139. }
  140. func (m *VPNStatusResponse) GetCreatedAt() string {
  141. if m != nil {
  142. return m.CreatedAt
  143. }
  144. return ""
  145. }
  146. func (m *VPNStatusResponse) GetProto() string {
  147. if m != nil {
  148. return m.Proto
  149. }
  150. return ""
  151. }
  152. type VPNInitResponse struct {
  153. }
  154. func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
  155. func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
  156. func (*VPNInitResponse) ProtoMessage() {}
  157. func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  158. func init() {
  159. proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
  160. proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
  161. proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
  162. proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
  163. proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
  164. }
  165. // Reference imports to suppress errors if they are not otherwise used.
  166. var _ context.Context
  167. var _ grpc.ClientConn
  168. // This is a compile-time assertion to ensure that this generated file
  169. // is compatible with the grpc package it is being compiled against.
  170. const _ = grpc.SupportPackageIsVersion4
  171. // Client API for VPNService service
  172. type VPNServiceClient interface {
  173. Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
  174. Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
  175. }
  176. type vPNServiceClient struct {
  177. cc *grpc.ClientConn
  178. }
  179. func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
  180. return &vPNServiceClient{cc}
  181. }
  182. func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
  183. out := new(VPNStatusResponse)
  184. err := grpc.Invoke(ctx, "/pb.VPNService/Status", in, out, c.cc, opts...)
  185. if err != nil {
  186. return nil, err
  187. }
  188. return out, nil
  189. }
  190. func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
  191. out := new(VPNInitResponse)
  192. err := grpc.Invoke(ctx, "/pb.VPNService/Init", in, out, c.cc, opts...)
  193. if err != nil {
  194. return nil, err
  195. }
  196. return out, nil
  197. }
  198. // Server API for VPNService service
  199. type VPNServiceServer interface {
  200. Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
  201. Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
  202. }
  203. func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
  204. s.RegisterService(&_VPNService_serviceDesc, srv)
  205. }
  206. func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  207. in := new(VPNStatusRequest)
  208. if err := dec(in); err != nil {
  209. return nil, err
  210. }
  211. if interceptor == nil {
  212. return srv.(VPNServiceServer).Status(ctx, in)
  213. }
  214. info := &grpc.UnaryServerInfo{
  215. Server: srv,
  216. FullMethod: "/pb.VPNService/Status",
  217. }
  218. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  219. return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
  220. }
  221. return interceptor(ctx, in, info, handler)
  222. }
  223. func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  224. in := new(VPNInitRequest)
  225. if err := dec(in); err != nil {
  226. return nil, err
  227. }
  228. if interceptor == nil {
  229. return srv.(VPNServiceServer).Init(ctx, in)
  230. }
  231. info := &grpc.UnaryServerInfo{
  232. Server: srv,
  233. FullMethod: "/pb.VPNService/Init",
  234. }
  235. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  236. return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
  237. }
  238. return interceptor(ctx, in, info, handler)
  239. }
  240. var _VPNService_serviceDesc = grpc.ServiceDesc{
  241. ServiceName: "pb.VPNService",
  242. HandlerType: (*VPNServiceServer)(nil),
  243. Methods: []grpc.MethodDesc{
  244. {
  245. MethodName: "Status",
  246. Handler: _VPNService_Status_Handler,
  247. },
  248. {
  249. MethodName: "Init",
  250. Handler: _VPNService_Init_Handler,
  251. },
  252. },
  253. Streams: []grpc.StreamDesc{},
  254. Metadata: "vpn.proto",
  255. }
  256. func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
  257. var fileDescriptor1 = []byte{
  258. // 423 bytes of a gzipped FileDescriptorProto
  259. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x72, 0xd3, 0x30,
  260. 0x10, 0xc6, 0xb1, 0xe3, 0x3a, 0xf1, 0x4e, 0x26, 0x38, 0xdb, 0x02, 0x22, 0xd3, 0x43, 0x47, 0xa7,
  261. 0x4c, 0x0e, 0xf1, 0x50, 0x6e, 0xbd, 0x95, 0x00, 0xd3, 0x1e, 0x30, 0x9a, 0x14, 0x72, 0x57, 0x8a,
  262. 0xe8, 0x78, 0x9a, 0x4a, 0x42, 0x52, 0x72, 0x87, 0x03, 0x2f, 0xc0, 0x4b, 0xf0, 0x3e, 0xbc, 0x02,
  263. 0x0f, 0xc2, 0x48, 0x76, 0xfe, 0x98, 0x99, 0xde, 0xbe, 0xfd, 0xad, 0x77, 0xbd, 0xfb, 0xad, 0x20,
  264. 0xdb, 0x68, 0x39, 0xd5, 0x46, 0x39, 0x85, 0xb1, 0x5e, 0x8e, 0x4e, 0xef, 0x94, 0xba, 0x5b, 0x89,
  265. 0x82, 0xeb, 0xaa, 0xe0, 0x52, 0x2a, 0xc7, 0x5d, 0xa5, 0xa4, 0xad, 0xbf, 0xa0, 0x08, 0xf9, 0x82,
  266. 0x95, 0x37, 0x8e, 0xbb, 0xb5, 0x9d, 0x8b, 0x6f, 0x6b, 0x61, 0x1d, 0xfd, 0x19, 0xc1, 0x60, 0xc1,
  267. 0xca, 0x6b, 0x59, 0xb9, 0x06, 0xe1, 0x08, 0x7a, 0x57, 0xca, 0x3a, 0xc9, 0x1f, 0x04, 0x89, 0xce,
  268. 0xa2, 0x71, 0x36, 0xdf, 0xc5, 0x88, 0x90, 0x30, 0x65, 0x1c, 0x89, 0x03, 0x0f, 0x1a, 0x27, 0x90,
  269. 0x31, 0xdf, 0x5f, 0x1b, 0xf1, 0x95, 0x74, 0xce, 0xa2, 0xf1, 0xe0, 0xbc, 0x3f, 0xd5, 0xcb, 0xe9,
  270. 0x82, 0x95, 0x81, 0xcf, 0xf7, 0x69, 0x24, 0xd0, 0xbd, 0x66, 0x6f, 0x56, 0xea, 0xf6, 0x9e, 0x24,
  271. 0xa1, 0xc5, 0x36, 0xa4, 0xdf, 0x63, 0x18, 0x1e, 0x4c, 0x67, 0xb5, 0x92, 0x36, 0xfc, 0xaf, 0xdc,
  272. 0xcf, 0x11, 0x34, 0x52, 0xe8, 0xdf, 0x08, 0x53, 0xf1, 0x55, 0xb9, 0x7e, 0x58, 0x0a, 0xd3, 0xcc,
  273. 0xd2, 0x62, 0xad, 0x1d, 0x3a, 0x8f, 0xec, 0x90, 0x1c, 0xec, 0x80, 0x90, 0xcc, 0x84, 0x71, 0xe4,
  274. 0xa8, 0x66, 0x5e, 0xe3, 0x73, 0x48, 0x67, 0x97, 0x81, 0xa6, 0x81, 0x36, 0x11, 0xe6, 0xd0, 0x29,
  275. 0x85, 0x23, 0xdd, 0x00, 0xbd, 0xf4, 0xd5, 0x1f, 0xb8, 0xbd, 0x27, 0xbd, 0xba, 0xda, 0x6b, 0x3c,
  276. 0x85, 0x6c, 0x66, 0x04, 0x77, 0xe2, 0xcb, 0xa5, 0x23, 0x59, 0x48, 0xec, 0x01, 0x9e, 0xc0, 0x51,
  277. 0x30, 0x85, 0x40, 0xc8, 0xd4, 0x01, 0x1d, 0xc2, 0xd3, 0xdd, 0x2d, 0x6a, 0x03, 0x26, 0x63, 0xe8,
  278. 0x6d, 0x7d, 0x44, 0x80, 0xb4, 0xfc, 0xc8, 0xe6, 0xef, 0xde, 0xe7, 0x4f, 0xb0, 0x0b, 0x9d, 0xcf,
  279. 0x6f, 0x59, 0x1e, 0x79, 0xf1, 0x69, 0xc6, 0xf2, 0xf8, 0xfc, 0x77, 0x04, 0xe0, 0x0d, 0x14, 0x66,
  280. 0x53, 0xdd, 0x0a, 0x64, 0x90, 0xd6, 0x5e, 0xe2, 0x49, 0x73, 0x8c, 0xd6, 0xe1, 0x47, 0xcf, 0xfe,
  281. 0xa3, 0xf5, 0xff, 0xe8, 0xcb, 0x1f, 0x7f, 0xfe, 0xfe, 0x8a, 0x8f, 0xe9, 0xa0, 0xd8, 0xbc, 0x2a,
  282. 0x36, 0x5a, 0x16, 0x36, 0xe4, 0x2f, 0xa2, 0x09, 0x5e, 0x41, 0xe2, 0x47, 0x43, 0x6c, 0x2a, 0x0f,
  283. 0xde, 0xcc, 0xe8, 0xb8, 0xc5, 0x9a, 0x5e, 0x2f, 0x42, 0xaf, 0x21, 0xed, 0x6f, 0x7b, 0x55, 0xb2,
  284. 0x72, 0x17, 0xd1, 0x64, 0x99, 0x86, 0xf7, 0xf8, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93,
  285. 0x52, 0x74, 0x1b, 0xbe, 0x02, 0x00, 0x00,
  286. }