user.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: user.proto
  3. /*
  4. Package pb is a generated protocol buffer package.
  5. It is generated from these files:
  6. user.proto
  7. vpn.proto
  8. It has these top-level messages:
  9. UserListRequest
  10. UserCreateRequest
  11. UserDeleteRequest
  12. UserRenewRequest
  13. UserGenConfigRequest
  14. UserResponse
  15. UserGenConfigResponse
  16. VPNStatusRequest
  17. VPNInitRequest
  18. VPNStatusResponse
  19. VPNInitResponse
  20. */
  21. package pb
  22. import proto "github.com/golang/protobuf/proto"
  23. import fmt "fmt"
  24. import math "math"
  25. import (
  26. context "golang.org/x/net/context"
  27. grpc "google.golang.org/grpc"
  28. )
  29. // Reference imports to suppress errors if they are not otherwise used.
  30. var _ = proto.Marshal
  31. var _ = fmt.Errorf
  32. var _ = math.Inf
  33. // This is a compile-time assertion to ensure that this generated file
  34. // is compatible with the proto package it is being compiled against.
  35. // A compilation error at this line likely means your copy of the
  36. // proto package needs to be updated.
  37. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  38. type UserListRequest struct {
  39. }
  40. func (m *UserListRequest) Reset() { *m = UserListRequest{} }
  41. func (m *UserListRequest) String() string { return proto.CompactTextString(m) }
  42. func (*UserListRequest) ProtoMessage() {}
  43. func (*UserListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  44. type UserCreateRequest struct {
  45. Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
  46. Password string `protobuf:"bytes,2,opt,name=Password" json:"Password,omitempty"`
  47. NoGW bool `protobuf:"varint,3,opt,name=NoGW" json:"NoGW,omitempty"`
  48. }
  49. func (m *UserCreateRequest) Reset() { *m = UserCreateRequest{} }
  50. func (m *UserCreateRequest) String() string { return proto.CompactTextString(m) }
  51. func (*UserCreateRequest) ProtoMessage() {}
  52. func (*UserCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  53. func (m *UserCreateRequest) GetUsername() string {
  54. if m != nil {
  55. return m.Username
  56. }
  57. return ""
  58. }
  59. func (m *UserCreateRequest) GetPassword() string {
  60. if m != nil {
  61. return m.Password
  62. }
  63. return ""
  64. }
  65. func (m *UserCreateRequest) GetNoGW() bool {
  66. if m != nil {
  67. return m.NoGW
  68. }
  69. return false
  70. }
  71. type UserDeleteRequest struct {
  72. Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
  73. }
  74. func (m *UserDeleteRequest) Reset() { *m = UserDeleteRequest{} }
  75. func (m *UserDeleteRequest) String() string { return proto.CompactTextString(m) }
  76. func (*UserDeleteRequest) ProtoMessage() {}
  77. func (*UserDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  78. func (m *UserDeleteRequest) GetUsername() string {
  79. if m != nil {
  80. return m.Username
  81. }
  82. return ""
  83. }
  84. type UserRenewRequest struct {
  85. Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
  86. }
  87. func (m *UserRenewRequest) Reset() { *m = UserRenewRequest{} }
  88. func (m *UserRenewRequest) String() string { return proto.CompactTextString(m) }
  89. func (*UserRenewRequest) ProtoMessage() {}
  90. func (*UserRenewRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  91. func (m *UserRenewRequest) GetUsername() string {
  92. if m != nil {
  93. return m.Username
  94. }
  95. return ""
  96. }
  97. type UserGenConfigRequest struct {
  98. Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
  99. }
  100. func (m *UserGenConfigRequest) Reset() { *m = UserGenConfigRequest{} }
  101. func (m *UserGenConfigRequest) String() string { return proto.CompactTextString(m) }
  102. func (*UserGenConfigRequest) ProtoMessage() {}
  103. func (*UserGenConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  104. func (m *UserGenConfigRequest) GetUsername() string {
  105. if m != nil {
  106. return m.Username
  107. }
  108. return ""
  109. }
  110. type UserResponse struct {
  111. Users []*UserResponse_User `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"`
  112. }
  113. func (m *UserResponse) Reset() { *m = UserResponse{} }
  114. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  115. func (*UserResponse) ProtoMessage() {}
  116. func (*UserResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  117. func (m *UserResponse) GetUsers() []*UserResponse_User {
  118. if m != nil {
  119. return m.Users
  120. }
  121. return nil
  122. }
  123. type UserResponse_User struct {
  124. Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
  125. ServerSerialNumber string `protobuf:"bytes,2,opt,name=ServerSerialNumber" json:"ServerSerialNumber,omitempty"`
  126. Cert string `protobuf:"bytes,3,opt,name=Cert" json:"Cert,omitempty"`
  127. CreatedAt string `protobuf:"bytes,4,opt,name=CreatedAt" json:"CreatedAt,omitempty"`
  128. IPNet string `protobuf:"bytes,5,opt,name=IPNet" json:"IPNet,omitempty"`
  129. NoGW bool `protobuf:"varint,6,opt,name=NoGW" json:"NoGW,omitempty"`
  130. }
  131. func (m *UserResponse_User) Reset() { *m = UserResponse_User{} }
  132. func (m *UserResponse_User) String() string { return proto.CompactTextString(m) }
  133. func (*UserResponse_User) ProtoMessage() {}
  134. func (*UserResponse_User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5, 0} }
  135. func (m *UserResponse_User) GetUsername() string {
  136. if m != nil {
  137. return m.Username
  138. }
  139. return ""
  140. }
  141. func (m *UserResponse_User) GetServerSerialNumber() string {
  142. if m != nil {
  143. return m.ServerSerialNumber
  144. }
  145. return ""
  146. }
  147. func (m *UserResponse_User) GetCert() string {
  148. if m != nil {
  149. return m.Cert
  150. }
  151. return ""
  152. }
  153. func (m *UserResponse_User) GetCreatedAt() string {
  154. if m != nil {
  155. return m.CreatedAt
  156. }
  157. return ""
  158. }
  159. func (m *UserResponse_User) GetIPNet() string {
  160. if m != nil {
  161. return m.IPNet
  162. }
  163. return ""
  164. }
  165. func (m *UserResponse_User) GetNoGW() bool {
  166. if m != nil {
  167. return m.NoGW
  168. }
  169. return false
  170. }
  171. type UserGenConfigResponse struct {
  172. ClientConfig string `protobuf:"bytes,1,opt,name=ClientConfig" json:"ClientConfig,omitempty"`
  173. }
  174. func (m *UserGenConfigResponse) Reset() { *m = UserGenConfigResponse{} }
  175. func (m *UserGenConfigResponse) String() string { return proto.CompactTextString(m) }
  176. func (*UserGenConfigResponse) ProtoMessage() {}
  177. func (*UserGenConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  178. func (m *UserGenConfigResponse) GetClientConfig() string {
  179. if m != nil {
  180. return m.ClientConfig
  181. }
  182. return ""
  183. }
  184. func init() {
  185. proto.RegisterType((*UserListRequest)(nil), "pb.UserListRequest")
  186. proto.RegisterType((*UserCreateRequest)(nil), "pb.UserCreateRequest")
  187. proto.RegisterType((*UserDeleteRequest)(nil), "pb.UserDeleteRequest")
  188. proto.RegisterType((*UserRenewRequest)(nil), "pb.UserRenewRequest")
  189. proto.RegisterType((*UserGenConfigRequest)(nil), "pb.UserGenConfigRequest")
  190. proto.RegisterType((*UserResponse)(nil), "pb.UserResponse")
  191. proto.RegisterType((*UserResponse_User)(nil), "pb.UserResponse.User")
  192. proto.RegisterType((*UserGenConfigResponse)(nil), "pb.UserGenConfigResponse")
  193. }
  194. // Reference imports to suppress errors if they are not otherwise used.
  195. var _ context.Context
  196. var _ grpc.ClientConn
  197. // This is a compile-time assertion to ensure that this generated file
  198. // is compatible with the grpc package it is being compiled against.
  199. const _ = grpc.SupportPackageIsVersion4
  200. // Client API for UserService service
  201. type UserServiceClient interface {
  202. List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error)
  203. Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  204. Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error)
  205. Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error)
  206. GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error)
  207. }
  208. type userServiceClient struct {
  209. cc *grpc.ClientConn
  210. }
  211. func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
  212. return &userServiceClient{cc}
  213. }
  214. func (c *userServiceClient) List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  215. out := new(UserResponse)
  216. err := grpc.Invoke(ctx, "/pb.UserService/List", in, out, c.cc, opts...)
  217. if err != nil {
  218. return nil, err
  219. }
  220. return out, nil
  221. }
  222. func (c *userServiceClient) Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  223. out := new(UserResponse)
  224. err := grpc.Invoke(ctx, "/pb.UserService/Create", in, out, c.cc, opts...)
  225. if err != nil {
  226. return nil, err
  227. }
  228. return out, nil
  229. }
  230. func (c *userServiceClient) Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  231. out := new(UserResponse)
  232. err := grpc.Invoke(ctx, "/pb.UserService/Delete", in, out, c.cc, opts...)
  233. if err != nil {
  234. return nil, err
  235. }
  236. return out, nil
  237. }
  238. func (c *userServiceClient) Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  239. out := new(UserResponse)
  240. err := grpc.Invoke(ctx, "/pb.UserService/Renew", in, out, c.cc, opts...)
  241. if err != nil {
  242. return nil, err
  243. }
  244. return out, nil
  245. }
  246. func (c *userServiceClient) GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error) {
  247. out := new(UserGenConfigResponse)
  248. err := grpc.Invoke(ctx, "/pb.UserService/GenConfig", in, out, c.cc, opts...)
  249. if err != nil {
  250. return nil, err
  251. }
  252. return out, nil
  253. }
  254. // Server API for UserService service
  255. type UserServiceServer interface {
  256. List(context.Context, *UserListRequest) (*UserResponse, error)
  257. Create(context.Context, *UserCreateRequest) (*UserResponse, error)
  258. Delete(context.Context, *UserDeleteRequest) (*UserResponse, error)
  259. Renew(context.Context, *UserRenewRequest) (*UserResponse, error)
  260. GenConfig(context.Context, *UserGenConfigRequest) (*UserGenConfigResponse, error)
  261. }
  262. func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
  263. s.RegisterService(&_UserService_serviceDesc, srv)
  264. }
  265. func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  266. in := new(UserListRequest)
  267. if err := dec(in); err != nil {
  268. return nil, err
  269. }
  270. if interceptor == nil {
  271. return srv.(UserServiceServer).List(ctx, in)
  272. }
  273. info := &grpc.UnaryServerInfo{
  274. Server: srv,
  275. FullMethod: "/pb.UserService/List",
  276. }
  277. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  278. return srv.(UserServiceServer).List(ctx, req.(*UserListRequest))
  279. }
  280. return interceptor(ctx, in, info, handler)
  281. }
  282. func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  283. in := new(UserCreateRequest)
  284. if err := dec(in); err != nil {
  285. return nil, err
  286. }
  287. if interceptor == nil {
  288. return srv.(UserServiceServer).Create(ctx, in)
  289. }
  290. info := &grpc.UnaryServerInfo{
  291. Server: srv,
  292. FullMethod: "/pb.UserService/Create",
  293. }
  294. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  295. return srv.(UserServiceServer).Create(ctx, req.(*UserCreateRequest))
  296. }
  297. return interceptor(ctx, in, info, handler)
  298. }
  299. func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  300. in := new(UserDeleteRequest)
  301. if err := dec(in); err != nil {
  302. return nil, err
  303. }
  304. if interceptor == nil {
  305. return srv.(UserServiceServer).Delete(ctx, in)
  306. }
  307. info := &grpc.UnaryServerInfo{
  308. Server: srv,
  309. FullMethod: "/pb.UserService/Delete",
  310. }
  311. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  312. return srv.(UserServiceServer).Delete(ctx, req.(*UserDeleteRequest))
  313. }
  314. return interceptor(ctx, in, info, handler)
  315. }
  316. func _UserService_Renew_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  317. in := new(UserRenewRequest)
  318. if err := dec(in); err != nil {
  319. return nil, err
  320. }
  321. if interceptor == nil {
  322. return srv.(UserServiceServer).Renew(ctx, in)
  323. }
  324. info := &grpc.UnaryServerInfo{
  325. Server: srv,
  326. FullMethod: "/pb.UserService/Renew",
  327. }
  328. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  329. return srv.(UserServiceServer).Renew(ctx, req.(*UserRenewRequest))
  330. }
  331. return interceptor(ctx, in, info, handler)
  332. }
  333. func _UserService_GenConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  334. in := new(UserGenConfigRequest)
  335. if err := dec(in); err != nil {
  336. return nil, err
  337. }
  338. if interceptor == nil {
  339. return srv.(UserServiceServer).GenConfig(ctx, in)
  340. }
  341. info := &grpc.UnaryServerInfo{
  342. Server: srv,
  343. FullMethod: "/pb.UserService/GenConfig",
  344. }
  345. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  346. return srv.(UserServiceServer).GenConfig(ctx, req.(*UserGenConfigRequest))
  347. }
  348. return interceptor(ctx, in, info, handler)
  349. }
  350. var _UserService_serviceDesc = grpc.ServiceDesc{
  351. ServiceName: "pb.UserService",
  352. HandlerType: (*UserServiceServer)(nil),
  353. Methods: []grpc.MethodDesc{
  354. {
  355. MethodName: "List",
  356. Handler: _UserService_List_Handler,
  357. },
  358. {
  359. MethodName: "Create",
  360. Handler: _UserService_Create_Handler,
  361. },
  362. {
  363. MethodName: "Delete",
  364. Handler: _UserService_Delete_Handler,
  365. },
  366. {
  367. MethodName: "Renew",
  368. Handler: _UserService_Renew_Handler,
  369. },
  370. {
  371. MethodName: "GenConfig",
  372. Handler: _UserService_GenConfig_Handler,
  373. },
  374. },
  375. Streams: []grpc.StreamDesc{},
  376. Metadata: "user.proto",
  377. }
  378. func init() { proto.RegisterFile("user.proto", fileDescriptor0) }
  379. var fileDescriptor0 = []byte{
  380. // 382 bytes of a gzipped FileDescriptorProto
  381. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x5d, 0x6b, 0xea, 0x40,
  382. 0x10, 0xbd, 0xd1, 0x44, 0xcc, 0x28, 0x5c, 0x9d, 0xab, 0x90, 0x1b, 0xee, 0x83, 0xe4, 0x49, 0xb8,
  383. 0x10, 0xa9, 0x3e, 0xf6, 0xa9, 0x4d, 0x41, 0x0a, 0x45, 0x24, 0x52, 0xfa, 0x58, 0x92, 0x3a, 0x2d,
  384. 0x01, 0x4d, 0xd2, 0xdd, 0xb5, 0xfe, 0x9c, 0xfe, 0x83, 0xfe, 0xb2, 0xfe, 0x88, 0xb2, 0xd9, 0x7c,
  385. 0xa8, 0xa4, 0xc5, 0xb7, 0x99, 0x73, 0xe6, 0x64, 0x77, 0xcf, 0x9c, 0x00, 0xec, 0x38, 0x31, 0x37,
  386. 0x65, 0x89, 0x48, 0xb0, 0x91, 0x86, 0x4e, 0x1f, 0x7e, 0xdf, 0x73, 0x62, 0x77, 0x11, 0x17, 0x3e,
  387. 0xbd, 0xee, 0x88, 0x0b, 0xe7, 0x11, 0xfa, 0x12, 0xf2, 0x18, 0x05, 0x82, 0x72, 0x10, 0x6d, 0x68,
  388. 0x4b, 0x30, 0x0e, 0xb6, 0x64, 0x69, 0x23, 0x6d, 0x6c, 0xfa, 0x65, 0x2f, 0xb9, 0x65, 0xc0, 0xf9,
  389. 0x3e, 0x61, 0x6b, 0xab, 0xa1, 0xb8, 0xa2, 0x47, 0x04, 0x7d, 0x91, 0xcc, 0x1f, 0xac, 0xe6, 0x48,
  390. 0x1b, 0xb7, 0xfd, 0xac, 0x76, 0x26, 0xea, 0x80, 0x1b, 0xda, 0xd0, 0x59, 0x07, 0x38, 0x2e, 0xf4,
  391. 0x64, 0xed, 0x53, 0x4c, 0xfb, 0x73, 0xe6, 0xa7, 0x30, 0x90, 0xf5, 0x9c, 0x62, 0x2f, 0x89, 0x9f,
  392. 0xa3, 0x97, 0x73, 0x34, 0x9f, 0x1a, 0x74, 0xd5, 0x21, 0x3c, 0x4d, 0x62, 0x4e, 0xf8, 0x1f, 0x0c,
  393. 0xe9, 0x15, 0xb7, 0xb4, 0x51, 0x73, 0xdc, 0x99, 0x0e, 0xdd, 0x34, 0x74, 0x0f, 0x07, 0x54, 0xa3,
  394. 0x66, 0xec, 0x0f, 0x0d, 0x74, 0xd9, 0xff, 0xe8, 0x93, 0x0b, 0xb8, 0x22, 0xf6, 0x46, 0x6c, 0x45,
  395. 0x2c, 0x0a, 0x36, 0x8b, 0xdd, 0x36, 0x24, 0x96, 0x3b, 0x56, 0xc3, 0x48, 0xef, 0x3c, 0x62, 0x22,
  396. 0xf3, 0xce, 0xf4, 0xb3, 0x1a, 0xff, 0x81, 0xa9, 0x16, 0xb3, 0xbe, 0x12, 0x96, 0x9e, 0x11, 0x15,
  397. 0x80, 0x03, 0x30, 0x6e, 0x97, 0x0b, 0x12, 0x96, 0x91, 0x31, 0xaa, 0x29, 0x77, 0xd0, 0x3a, 0xd8,
  398. 0xc1, 0x25, 0x0c, 0x4f, 0x2c, 0xca, 0x9f, 0xed, 0x40, 0xd7, 0xdb, 0x44, 0x14, 0x0b, 0x85, 0xe7,
  399. 0x8f, 0x38, 0xc2, 0xa6, 0xef, 0x0d, 0xe8, 0x48, 0xb5, 0xbc, 0x73, 0xf4, 0x44, 0x38, 0x01, 0x5d,
  400. 0x06, 0x08, 0xff, 0x14, 0x1e, 0x1d, 0xc4, 0xc9, 0xee, 0x9d, 0x1a, 0xe7, 0xfc, 0xc2, 0x19, 0xb4,
  401. 0xd4, 0xa5, 0xb1, 0xb4, 0xf5, 0x28, 0x6e, 0xdf, 0x89, 0x54, 0x64, 0x2a, 0xd1, 0x51, 0x84, 0x6a,
  402. 0x45, 0x17, 0x60, 0x64, 0xb1, 0xc1, 0x41, 0x45, 0x56, 0x29, 0xaa, 0x95, 0x5c, 0x83, 0x59, 0xda,
  403. 0x82, 0x56, 0x31, 0x70, 0x1a, 0x26, 0xfb, 0x6f, 0x0d, 0x53, 0x7c, 0x23, 0x6c, 0x65, 0x7f, 0xd8,
  404. 0xec, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xde, 0xf2, 0x7b, 0x7e, 0x6f, 0x03, 0x00, 0x00,
  405. }