1
0

vpn.pb.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  21. type VPNProto int32
  22. const (
  23. VPNProto_NOPREF VPNProto = 0
  24. VPNProto_UDP VPNProto = 1
  25. VPNProto_TCP VPNProto = 2
  26. )
  27. var VPNProto_name = map[int32]string{
  28. 0: "NOPREF",
  29. 1: "UDP",
  30. 2: "TCP",
  31. }
  32. var VPNProto_value = map[string]int32{
  33. "NOPREF": 0,
  34. "UDP": 1,
  35. "TCP": 2,
  36. }
  37. func (x VPNProto) String() string {
  38. return proto.EnumName(VPNProto_name, int32(x))
  39. }
  40. func (VPNProto) EnumDescriptor() ([]byte, []int) {
  41. return fileDescriptor_vpn_a36938fb10df2565, []int{0}
  42. }
  43. type VPNStatusRequest struct {
  44. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  45. XXX_unrecognized []byte `json:"-"`
  46. XXX_sizecache int32 `json:"-"`
  47. }
  48. func (m *VPNStatusRequest) Reset() { *m = VPNStatusRequest{} }
  49. func (m *VPNStatusRequest) String() string { return proto.CompactTextString(m) }
  50. func (*VPNStatusRequest) ProtoMessage() {}
  51. func (*VPNStatusRequest) Descriptor() ([]byte, []int) {
  52. return fileDescriptor_vpn_a36938fb10df2565, []int{0}
  53. }
  54. func (m *VPNStatusRequest) XXX_Unmarshal(b []byte) error {
  55. return xxx_messageInfo_VPNStatusRequest.Unmarshal(m, b)
  56. }
  57. func (m *VPNStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  58. return xxx_messageInfo_VPNStatusRequest.Marshal(b, m, deterministic)
  59. }
  60. func (dst *VPNStatusRequest) XXX_Merge(src proto.Message) {
  61. xxx_messageInfo_VPNStatusRequest.Merge(dst, src)
  62. }
  63. func (m *VPNStatusRequest) XXX_Size() int {
  64. return xxx_messageInfo_VPNStatusRequest.Size(m)
  65. }
  66. func (m *VPNStatusRequest) XXX_DiscardUnknown() {
  67. xxx_messageInfo_VPNStatusRequest.DiscardUnknown(m)
  68. }
  69. var xxx_messageInfo_VPNStatusRequest proto.InternalMessageInfo
  70. type VPNInitRequest struct {
  71. Hostname string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"`
  72. Port string `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"`
  73. ProtoPref VPNProto `protobuf:"varint,3,opt,name=proto_pref,json=protoPref,enum=pb.VPNProto" json:"proto_pref,omitempty"`
  74. IpBlock string `protobuf:"bytes,4,opt,name=ip_block,json=ipBlock" json:"ip_block,omitempty"`
  75. Dns string `protobuf:"bytes,5,opt,name=dns" json:"dns,omitempty"`
  76. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  77. XXX_unrecognized []byte `json:"-"`
  78. XXX_sizecache int32 `json:"-"`
  79. }
  80. func (m *VPNInitRequest) Reset() { *m = VPNInitRequest{} }
  81. func (m *VPNInitRequest) String() string { return proto.CompactTextString(m) }
  82. func (*VPNInitRequest) ProtoMessage() {}
  83. func (*VPNInitRequest) Descriptor() ([]byte, []int) {
  84. return fileDescriptor_vpn_a36938fb10df2565, []int{1}
  85. }
  86. func (m *VPNInitRequest) XXX_Unmarshal(b []byte) error {
  87. return xxx_messageInfo_VPNInitRequest.Unmarshal(m, b)
  88. }
  89. func (m *VPNInitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  90. return xxx_messageInfo_VPNInitRequest.Marshal(b, m, deterministic)
  91. }
  92. func (dst *VPNInitRequest) XXX_Merge(src proto.Message) {
  93. xxx_messageInfo_VPNInitRequest.Merge(dst, src)
  94. }
  95. func (m *VPNInitRequest) XXX_Size() int {
  96. return xxx_messageInfo_VPNInitRequest.Size(m)
  97. }
  98. func (m *VPNInitRequest) XXX_DiscardUnknown() {
  99. xxx_messageInfo_VPNInitRequest.DiscardUnknown(m)
  100. }
  101. var xxx_messageInfo_VPNInitRequest proto.InternalMessageInfo
  102. func (m *VPNInitRequest) GetHostname() string {
  103. if m != nil {
  104. return m.Hostname
  105. }
  106. return ""
  107. }
  108. func (m *VPNInitRequest) GetPort() string {
  109. if m != nil {
  110. return m.Port
  111. }
  112. return ""
  113. }
  114. func (m *VPNInitRequest) GetProtoPref() VPNProto {
  115. if m != nil {
  116. return m.ProtoPref
  117. }
  118. return VPNProto_NOPREF
  119. }
  120. func (m *VPNInitRequest) GetIpBlock() string {
  121. if m != nil {
  122. return m.IpBlock
  123. }
  124. return ""
  125. }
  126. func (m *VPNInitRequest) GetDns() string {
  127. if m != nil {
  128. return m.Dns
  129. }
  130. return ""
  131. }
  132. type VPNUpdateRequest struct {
  133. IpBlock string `protobuf:"bytes,1,opt,name=ip_block,json=ipBlock" json:"ip_block,omitempty"`
  134. Dns string `protobuf:"bytes,2,opt,name=dns" json:"dns,omitempty"`
  135. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  136. XXX_unrecognized []byte `json:"-"`
  137. XXX_sizecache int32 `json:"-"`
  138. }
  139. func (m *VPNUpdateRequest) Reset() { *m = VPNUpdateRequest{} }
  140. func (m *VPNUpdateRequest) String() string { return proto.CompactTextString(m) }
  141. func (*VPNUpdateRequest) ProtoMessage() {}
  142. func (*VPNUpdateRequest) Descriptor() ([]byte, []int) {
  143. return fileDescriptor_vpn_a36938fb10df2565, []int{2}
  144. }
  145. func (m *VPNUpdateRequest) XXX_Unmarshal(b []byte) error {
  146. return xxx_messageInfo_VPNUpdateRequest.Unmarshal(m, b)
  147. }
  148. func (m *VPNUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  149. return xxx_messageInfo_VPNUpdateRequest.Marshal(b, m, deterministic)
  150. }
  151. func (dst *VPNUpdateRequest) XXX_Merge(src proto.Message) {
  152. xxx_messageInfo_VPNUpdateRequest.Merge(dst, src)
  153. }
  154. func (m *VPNUpdateRequest) XXX_Size() int {
  155. return xxx_messageInfo_VPNUpdateRequest.Size(m)
  156. }
  157. func (m *VPNUpdateRequest) XXX_DiscardUnknown() {
  158. xxx_messageInfo_VPNUpdateRequest.DiscardUnknown(m)
  159. }
  160. var xxx_messageInfo_VPNUpdateRequest proto.InternalMessageInfo
  161. func (m *VPNUpdateRequest) GetIpBlock() string {
  162. if m != nil {
  163. return m.IpBlock
  164. }
  165. return ""
  166. }
  167. func (m *VPNUpdateRequest) GetDns() string {
  168. if m != nil {
  169. return m.Dns
  170. }
  171. return ""
  172. }
  173. type VPNRestartRequest struct {
  174. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  175. XXX_unrecognized []byte `json:"-"`
  176. XXX_sizecache int32 `json:"-"`
  177. }
  178. func (m *VPNRestartRequest) Reset() { *m = VPNRestartRequest{} }
  179. func (m *VPNRestartRequest) String() string { return proto.CompactTextString(m) }
  180. func (*VPNRestartRequest) ProtoMessage() {}
  181. func (*VPNRestartRequest) Descriptor() ([]byte, []int) {
  182. return fileDescriptor_vpn_a36938fb10df2565, []int{3}
  183. }
  184. func (m *VPNRestartRequest) XXX_Unmarshal(b []byte) error {
  185. return xxx_messageInfo_VPNRestartRequest.Unmarshal(m, b)
  186. }
  187. func (m *VPNRestartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  188. return xxx_messageInfo_VPNRestartRequest.Marshal(b, m, deterministic)
  189. }
  190. func (dst *VPNRestartRequest) XXX_Merge(src proto.Message) {
  191. xxx_messageInfo_VPNRestartRequest.Merge(dst, src)
  192. }
  193. func (m *VPNRestartRequest) XXX_Size() int {
  194. return xxx_messageInfo_VPNRestartRequest.Size(m)
  195. }
  196. func (m *VPNRestartRequest) XXX_DiscardUnknown() {
  197. xxx_messageInfo_VPNRestartRequest.DiscardUnknown(m)
  198. }
  199. var xxx_messageInfo_VPNRestartRequest proto.InternalMessageInfo
  200. type VPNStatusResponse struct {
  201. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  202. SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber" json:"serial_number,omitempty"`
  203. Hostname string `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"`
  204. Port string `protobuf:"bytes,4,opt,name=port" json:"port,omitempty"`
  205. Cert string `protobuf:"bytes,5,opt,name=cert" json:"cert,omitempty"`
  206. CaCert string `protobuf:"bytes,6,opt,name=ca_cert,json=caCert" json:"ca_cert,omitempty"`
  207. Net string `protobuf:"bytes,7,opt,name=net" json:"net,omitempty"`
  208. Mask string `protobuf:"bytes,8,opt,name=mask" json:"mask,omitempty"`
  209. CreatedAt string `protobuf:"bytes,9,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
  210. Proto string `protobuf:"bytes,10,opt,name=proto" json:"proto,omitempty"`
  211. Dns string `protobuf:"bytes,11,opt,name=dns" json:"dns,omitempty"`
  212. ExpiresAt string `protobuf:"bytes,12,opt,name=expires_at,json=expiresAt" json:"expires_at,omitempty"`
  213. CaExpiresAt string `protobuf:"bytes,13,opt,name=ca_expires_at,json=caExpiresAt" json:"ca_expires_at,omitempty"`
  214. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  215. XXX_unrecognized []byte `json:"-"`
  216. XXX_sizecache int32 `json:"-"`
  217. }
  218. func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
  219. func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
  220. func (*VPNStatusResponse) ProtoMessage() {}
  221. func (*VPNStatusResponse) Descriptor() ([]byte, []int) {
  222. return fileDescriptor_vpn_a36938fb10df2565, []int{4}
  223. }
  224. func (m *VPNStatusResponse) XXX_Unmarshal(b []byte) error {
  225. return xxx_messageInfo_VPNStatusResponse.Unmarshal(m, b)
  226. }
  227. func (m *VPNStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  228. return xxx_messageInfo_VPNStatusResponse.Marshal(b, m, deterministic)
  229. }
  230. func (dst *VPNStatusResponse) XXX_Merge(src proto.Message) {
  231. xxx_messageInfo_VPNStatusResponse.Merge(dst, src)
  232. }
  233. func (m *VPNStatusResponse) XXX_Size() int {
  234. return xxx_messageInfo_VPNStatusResponse.Size(m)
  235. }
  236. func (m *VPNStatusResponse) XXX_DiscardUnknown() {
  237. xxx_messageInfo_VPNStatusResponse.DiscardUnknown(m)
  238. }
  239. var xxx_messageInfo_VPNStatusResponse proto.InternalMessageInfo
  240. func (m *VPNStatusResponse) GetName() string {
  241. if m != nil {
  242. return m.Name
  243. }
  244. return ""
  245. }
  246. func (m *VPNStatusResponse) GetSerialNumber() string {
  247. if m != nil {
  248. return m.SerialNumber
  249. }
  250. return ""
  251. }
  252. func (m *VPNStatusResponse) GetHostname() string {
  253. if m != nil {
  254. return m.Hostname
  255. }
  256. return ""
  257. }
  258. func (m *VPNStatusResponse) GetPort() string {
  259. if m != nil {
  260. return m.Port
  261. }
  262. return ""
  263. }
  264. func (m *VPNStatusResponse) GetCert() string {
  265. if m != nil {
  266. return m.Cert
  267. }
  268. return ""
  269. }
  270. func (m *VPNStatusResponse) GetCaCert() string {
  271. if m != nil {
  272. return m.CaCert
  273. }
  274. return ""
  275. }
  276. func (m *VPNStatusResponse) GetNet() string {
  277. if m != nil {
  278. return m.Net
  279. }
  280. return ""
  281. }
  282. func (m *VPNStatusResponse) GetMask() string {
  283. if m != nil {
  284. return m.Mask
  285. }
  286. return ""
  287. }
  288. func (m *VPNStatusResponse) GetCreatedAt() string {
  289. if m != nil {
  290. return m.CreatedAt
  291. }
  292. return ""
  293. }
  294. func (m *VPNStatusResponse) GetProto() string {
  295. if m != nil {
  296. return m.Proto
  297. }
  298. return ""
  299. }
  300. func (m *VPNStatusResponse) GetDns() string {
  301. if m != nil {
  302. return m.Dns
  303. }
  304. return ""
  305. }
  306. func (m *VPNStatusResponse) GetExpiresAt() string {
  307. if m != nil {
  308. return m.ExpiresAt
  309. }
  310. return ""
  311. }
  312. func (m *VPNStatusResponse) GetCaExpiresAt() string {
  313. if m != nil {
  314. return m.CaExpiresAt
  315. }
  316. return ""
  317. }
  318. type VPNInitResponse struct {
  319. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  320. XXX_unrecognized []byte `json:"-"`
  321. XXX_sizecache int32 `json:"-"`
  322. }
  323. func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
  324. func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
  325. func (*VPNInitResponse) ProtoMessage() {}
  326. func (*VPNInitResponse) Descriptor() ([]byte, []int) {
  327. return fileDescriptor_vpn_a36938fb10df2565, []int{5}
  328. }
  329. func (m *VPNInitResponse) XXX_Unmarshal(b []byte) error {
  330. return xxx_messageInfo_VPNInitResponse.Unmarshal(m, b)
  331. }
  332. func (m *VPNInitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  333. return xxx_messageInfo_VPNInitResponse.Marshal(b, m, deterministic)
  334. }
  335. func (dst *VPNInitResponse) XXX_Merge(src proto.Message) {
  336. xxx_messageInfo_VPNInitResponse.Merge(dst, src)
  337. }
  338. func (m *VPNInitResponse) XXX_Size() int {
  339. return xxx_messageInfo_VPNInitResponse.Size(m)
  340. }
  341. func (m *VPNInitResponse) XXX_DiscardUnknown() {
  342. xxx_messageInfo_VPNInitResponse.DiscardUnknown(m)
  343. }
  344. var xxx_messageInfo_VPNInitResponse proto.InternalMessageInfo
  345. type VPNUpdateResponse struct {
  346. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  347. XXX_unrecognized []byte `json:"-"`
  348. XXX_sizecache int32 `json:"-"`
  349. }
  350. func (m *VPNUpdateResponse) Reset() { *m = VPNUpdateResponse{} }
  351. func (m *VPNUpdateResponse) String() string { return proto.CompactTextString(m) }
  352. func (*VPNUpdateResponse) ProtoMessage() {}
  353. func (*VPNUpdateResponse) Descriptor() ([]byte, []int) {
  354. return fileDescriptor_vpn_a36938fb10df2565, []int{6}
  355. }
  356. func (m *VPNUpdateResponse) XXX_Unmarshal(b []byte) error {
  357. return xxx_messageInfo_VPNUpdateResponse.Unmarshal(m, b)
  358. }
  359. func (m *VPNUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  360. return xxx_messageInfo_VPNUpdateResponse.Marshal(b, m, deterministic)
  361. }
  362. func (dst *VPNUpdateResponse) XXX_Merge(src proto.Message) {
  363. xxx_messageInfo_VPNUpdateResponse.Merge(dst, src)
  364. }
  365. func (m *VPNUpdateResponse) XXX_Size() int {
  366. return xxx_messageInfo_VPNUpdateResponse.Size(m)
  367. }
  368. func (m *VPNUpdateResponse) XXX_DiscardUnknown() {
  369. xxx_messageInfo_VPNUpdateResponse.DiscardUnknown(m)
  370. }
  371. var xxx_messageInfo_VPNUpdateResponse proto.InternalMessageInfo
  372. type VPNRestartResponse struct {
  373. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  374. XXX_unrecognized []byte `json:"-"`
  375. XXX_sizecache int32 `json:"-"`
  376. }
  377. func (m *VPNRestartResponse) Reset() { *m = VPNRestartResponse{} }
  378. func (m *VPNRestartResponse) String() string { return proto.CompactTextString(m) }
  379. func (*VPNRestartResponse) ProtoMessage() {}
  380. func (*VPNRestartResponse) Descriptor() ([]byte, []int) {
  381. return fileDescriptor_vpn_a36938fb10df2565, []int{7}
  382. }
  383. func (m *VPNRestartResponse) XXX_Unmarshal(b []byte) error {
  384. return xxx_messageInfo_VPNRestartResponse.Unmarshal(m, b)
  385. }
  386. func (m *VPNRestartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  387. return xxx_messageInfo_VPNRestartResponse.Marshal(b, m, deterministic)
  388. }
  389. func (dst *VPNRestartResponse) XXX_Merge(src proto.Message) {
  390. xxx_messageInfo_VPNRestartResponse.Merge(dst, src)
  391. }
  392. func (m *VPNRestartResponse) XXX_Size() int {
  393. return xxx_messageInfo_VPNRestartResponse.Size(m)
  394. }
  395. func (m *VPNRestartResponse) XXX_DiscardUnknown() {
  396. xxx_messageInfo_VPNRestartResponse.DiscardUnknown(m)
  397. }
  398. var xxx_messageInfo_VPNRestartResponse proto.InternalMessageInfo
  399. func init() {
  400. proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
  401. proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
  402. proto.RegisterType((*VPNUpdateRequest)(nil), "pb.VPNUpdateRequest")
  403. proto.RegisterType((*VPNRestartRequest)(nil), "pb.VPNRestartRequest")
  404. proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
  405. proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
  406. proto.RegisterType((*VPNUpdateResponse)(nil), "pb.VPNUpdateResponse")
  407. proto.RegisterType((*VPNRestartResponse)(nil), "pb.VPNRestartResponse")
  408. proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
  409. }
  410. // Reference imports to suppress errors if they are not otherwise used.
  411. var _ context.Context
  412. var _ grpc.ClientConn
  413. // This is a compile-time assertion to ensure that this generated file
  414. // is compatible with the grpc package it is being compiled against.
  415. const _ = grpc.SupportPackageIsVersion4
  416. // VPNServiceClient is the client API for VPNService service.
  417. //
  418. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  419. type VPNServiceClient interface {
  420. Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
  421. Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
  422. Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error)
  423. Restart(ctx context.Context, in *VPNRestartRequest, opts ...grpc.CallOption) (*VPNRestartResponse, error)
  424. }
  425. type vPNServiceClient struct {
  426. cc *grpc.ClientConn
  427. }
  428. func NewVPNServiceClient(cc *grpc.ClientConn) VPNServiceClient {
  429. return &vPNServiceClient{cc}
  430. }
  431. func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
  432. out := new(VPNStatusResponse)
  433. err := c.cc.Invoke(ctx, "/pb.VPNService/Status", in, out, opts...)
  434. if err != nil {
  435. return nil, err
  436. }
  437. return out, nil
  438. }
  439. func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
  440. out := new(VPNInitResponse)
  441. err := c.cc.Invoke(ctx, "/pb.VPNService/Init", in, out, opts...)
  442. if err != nil {
  443. return nil, err
  444. }
  445. return out, nil
  446. }
  447. func (c *vPNServiceClient) Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error) {
  448. out := new(VPNUpdateResponse)
  449. err := c.cc.Invoke(ctx, "/pb.VPNService/Update", in, out, opts...)
  450. if err != nil {
  451. return nil, err
  452. }
  453. return out, nil
  454. }
  455. func (c *vPNServiceClient) Restart(ctx context.Context, in *VPNRestartRequest, opts ...grpc.CallOption) (*VPNRestartResponse, error) {
  456. out := new(VPNRestartResponse)
  457. err := c.cc.Invoke(ctx, "/pb.VPNService/Restart", in, out, opts...)
  458. if err != nil {
  459. return nil, err
  460. }
  461. return out, nil
  462. }
  463. // VPNServiceServer is the server API for VPNService service.
  464. type VPNServiceServer interface {
  465. Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
  466. Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
  467. Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error)
  468. Restart(context.Context, *VPNRestartRequest) (*VPNRestartResponse, error)
  469. }
  470. func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
  471. s.RegisterService(&_VPNService_serviceDesc, srv)
  472. }
  473. func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  474. in := new(VPNStatusRequest)
  475. if err := dec(in); err != nil {
  476. return nil, err
  477. }
  478. if interceptor == nil {
  479. return srv.(VPNServiceServer).Status(ctx, in)
  480. }
  481. info := &grpc.UnaryServerInfo{
  482. Server: srv,
  483. FullMethod: "/pb.VPNService/Status",
  484. }
  485. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  486. return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
  487. }
  488. return interceptor(ctx, in, info, handler)
  489. }
  490. func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  491. in := new(VPNInitRequest)
  492. if err := dec(in); err != nil {
  493. return nil, err
  494. }
  495. if interceptor == nil {
  496. return srv.(VPNServiceServer).Init(ctx, in)
  497. }
  498. info := &grpc.UnaryServerInfo{
  499. Server: srv,
  500. FullMethod: "/pb.VPNService/Init",
  501. }
  502. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  503. return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
  504. }
  505. return interceptor(ctx, in, info, handler)
  506. }
  507. func _VPNService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  508. in := new(VPNUpdateRequest)
  509. if err := dec(in); err != nil {
  510. return nil, err
  511. }
  512. if interceptor == nil {
  513. return srv.(VPNServiceServer).Update(ctx, in)
  514. }
  515. info := &grpc.UnaryServerInfo{
  516. Server: srv,
  517. FullMethod: "/pb.VPNService/Update",
  518. }
  519. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  520. return srv.(VPNServiceServer).Update(ctx, req.(*VPNUpdateRequest))
  521. }
  522. return interceptor(ctx, in, info, handler)
  523. }
  524. func _VPNService_Restart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  525. in := new(VPNRestartRequest)
  526. if err := dec(in); err != nil {
  527. return nil, err
  528. }
  529. if interceptor == nil {
  530. return srv.(VPNServiceServer).Restart(ctx, in)
  531. }
  532. info := &grpc.UnaryServerInfo{
  533. Server: srv,
  534. FullMethod: "/pb.VPNService/Restart",
  535. }
  536. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  537. return srv.(VPNServiceServer).Restart(ctx, req.(*VPNRestartRequest))
  538. }
  539. return interceptor(ctx, in, info, handler)
  540. }
  541. var _VPNService_serviceDesc = grpc.ServiceDesc{
  542. ServiceName: "pb.VPNService",
  543. HandlerType: (*VPNServiceServer)(nil),
  544. Methods: []grpc.MethodDesc{
  545. {
  546. MethodName: "Status",
  547. Handler: _VPNService_Status_Handler,
  548. },
  549. {
  550. MethodName: "Init",
  551. Handler: _VPNService_Init_Handler,
  552. },
  553. {
  554. MethodName: "Update",
  555. Handler: _VPNService_Update_Handler,
  556. },
  557. {
  558. MethodName: "Restart",
  559. Handler: _VPNService_Restart_Handler,
  560. },
  561. },
  562. Streams: []grpc.StreamDesc{},
  563. Metadata: "vpn.proto",
  564. }
  565. func init() { proto.RegisterFile("vpn.proto", fileDescriptor_vpn_a36938fb10df2565) }
  566. var fileDescriptor_vpn_a36938fb10df2565 = []byte{
  567. // 568 bytes of a gzipped FileDescriptorProto
  568. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcd, 0x6e, 0xd3, 0x40,
  569. 0x10, 0xc7, 0xb1, 0x93, 0xe6, 0x63, 0xfa, 0x81, 0x3b, 0x4d, 0xa9, 0x09, 0x54, 0xaa, 0xcc, 0xa5,
  570. 0x2a, 0x52, 0x23, 0xca, 0x8d, 0x0b, 0x2a, 0xa5, 0x48, 0x48, 0xc8, 0x98, 0xd0, 0xe6, 0x6a, 0x6d,
  571. 0xdc, 0x6d, 0xb1, 0xda, 0xac, 0x97, 0xdd, 0x4d, 0xc4, 0x99, 0x57, 0xe0, 0xc6, 0x6b, 0x71, 0x82,
  572. 0x33, 0x0f, 0x82, 0x3c, 0xbb, 0x0e, 0x76, 0x04, 0xb7, 0xf1, 0x7f, 0x66, 0x7f, 0x9a, 0xf9, 0xcf,
  573. 0x18, 0xfa, 0x0b, 0x29, 0x8e, 0xa5, 0x2a, 0x4c, 0x81, 0xbe, 0x9c, 0x0e, 0x1f, 0xdf, 0x14, 0xc5,
  574. 0xcd, 0x1d, 0x1f, 0x31, 0x99, 0x8f, 0x98, 0x10, 0x85, 0x61, 0x26, 0x2f, 0x84, 0xb6, 0x15, 0x11,
  575. 0x42, 0x30, 0x49, 0xe2, 0x8f, 0x86, 0x99, 0xb9, 0x1e, 0xf3, 0xcf, 0x73, 0xae, 0x4d, 0xf4, 0xdd,
  576. 0x83, 0xad, 0x49, 0x12, 0xbf, 0x15, 0xb9, 0x71, 0x12, 0x0e, 0xa1, 0xf7, 0xa9, 0xd0, 0x46, 0xb0,
  577. 0x19, 0x0f, 0xbd, 0x03, 0xef, 0xb0, 0x3f, 0x5e, 0x7e, 0x23, 0x42, 0x5b, 0x16, 0xca, 0x84, 0x3e,
  578. 0xe9, 0x14, 0xe3, 0x53, 0x00, 0xe2, 0xa7, 0x52, 0xf1, 0xeb, 0xb0, 0x75, 0xe0, 0x1d, 0x6e, 0x9d,
  579. 0x6c, 0x1c, 0xcb, 0xe9, 0xf1, 0x24, 0x89, 0x93, 0x32, 0x31, 0xee, 0x53, 0x3e, 0x51, 0xfc, 0x1a,
  580. 0x1f, 0x42, 0x2f, 0x97, 0xe9, 0xf4, 0xae, 0xc8, 0x6e, 0xc3, 0x36, 0x41, 0xba, 0xb9, 0x7c, 0x55,
  581. 0x7e, 0x62, 0x00, 0xad, 0x2b, 0xa1, 0xc3, 0x35, 0x52, 0xcb, 0x30, 0x7a, 0x49, 0x0d, 0x5f, 0xca,
  582. 0x2b, 0x66, 0x78, 0xd5, 0x5d, 0x1d, 0xe0, 0xfd, 0x13, 0xe0, 0xff, 0x05, 0xec, 0xc0, 0xf6, 0x24,
  583. 0x89, 0xc7, 0x5c, 0x1b, 0xa6, 0xaa, 0xf9, 0xa2, 0x9f, 0x3e, 0xa9, 0x95, 0x0f, 0x5a, 0x16, 0x42,
  584. 0xd3, 0x64, 0xb5, 0x89, 0x29, 0xc6, 0x27, 0xb0, 0xa9, 0xb9, 0xca, 0xd9, 0x5d, 0x2a, 0xe6, 0xb3,
  585. 0x29, 0x57, 0x0e, 0xbd, 0x61, 0xc5, 0x98, 0xb4, 0x86, 0x5d, 0xad, 0xff, 0xd8, 0xd5, 0xae, 0xd9,
  586. 0x85, 0xd0, 0xce, 0xb8, 0x32, 0x6e, 0x4e, 0x8a, 0x71, 0x0f, 0xba, 0x19, 0x4b, 0x49, 0xee, 0x90,
  587. 0xdc, 0xc9, 0xd8, 0x59, 0x99, 0x08, 0xa0, 0x25, 0xb8, 0x09, 0xbb, 0x76, 0x24, 0xc1, 0xe9, 0xf9,
  588. 0x8c, 0xe9, 0xdb, 0xb0, 0x67, 0x9f, 0x97, 0x31, 0xee, 0x03, 0x64, 0x8a, 0x33, 0xc3, 0xaf, 0x52,
  589. 0x66, 0xc2, 0x3e, 0x65, 0xfa, 0x4e, 0x39, 0x35, 0x38, 0x80, 0x35, 0x5a, 0x40, 0x08, 0x94, 0xb1,
  590. 0x1f, 0x95, 0x5b, 0xeb, 0x4b, 0xb7, 0x4a, 0x0c, 0xff, 0x22, 0x73, 0xc5, 0x75, 0x89, 0xd9, 0xb0,
  591. 0x18, 0xa7, 0x9c, 0x1a, 0x8c, 0x60, 0x33, 0x63, 0x69, 0xad, 0x62, 0x93, 0x2a, 0xd6, 0x33, 0x76,
  592. 0x5e, 0xd5, 0x44, 0xdb, 0x70, 0x7f, 0x79, 0x4d, 0xd6, 0x58, 0xb7, 0x83, 0x6a, 0x89, 0x4e, 0x1c,
  593. 0x00, 0xd6, 0x17, 0x63, 0xd5, 0xa3, 0x43, 0xe8, 0x55, 0x37, 0x83, 0x00, 0x9d, 0xf8, 0x7d, 0x32,
  594. 0x3e, 0x7f, 0x13, 0xdc, 0xc3, 0x2e, 0xb4, 0x2e, 0x5f, 0x27, 0x81, 0x57, 0x06, 0x17, 0x67, 0x49,
  595. 0xe0, 0x9f, 0xfc, 0xf2, 0x01, 0xca, 0x1d, 0x72, 0xb5, 0xc8, 0x33, 0x8e, 0x1f, 0xa0, 0x63, 0xd7,
  596. 0x89, 0x03, 0x77, 0x78, 0x8d, 0x2b, 0x1f, 0xee, 0xae, 0xa8, 0xae, 0x8b, 0xe1, 0xd7, 0x1f, 0xbf,
  597. 0xbf, 0xf9, 0x03, 0x44, 0xfa, 0x61, 0x16, 0xcf, 0x46, 0x0b, 0x29, 0x46, 0xda, 0x82, 0xde, 0x41,
  598. 0xbb, 0x1c, 0x03, 0xd1, 0x3d, 0xad, 0xfd, 0x21, 0xc3, 0x9d, 0x86, 0xe6, 0x60, 0x8f, 0x08, 0xb6,
  599. 0x1b, 0x05, 0x75, 0x58, 0x2e, 0x72, 0xf3, 0xc2, 0x3b, 0xc2, 0x0b, 0xe8, 0x58, 0x07, 0x96, 0x0d,
  600. 0x36, 0xae, 0x7a, 0xd9, 0xe0, 0x8a, 0x4d, 0xfb, 0xc4, 0xdc, 0x8b, 0x1a, 0x0d, 0xce, 0xa9, 0xa6,
  601. 0xa4, 0x5e, 0x42, 0xd7, 0x59, 0x88, 0x15, 0xa0, 0x79, 0xeb, 0xc3, 0x07, 0xab, 0xf2, 0x4a, 0xb3,
  602. 0x3b, 0x75, 0xb0, 0xb2, 0x45, 0xd3, 0x0e, 0x1d, 0xc8, 0xf3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
  603. 0xd4, 0x74, 0x98, 0x4b, 0x5d, 0x04, 0x00, 0x00,
  604. }