user.pb.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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. network.proto
  9. auth.proto
  10. It has these top-level messages:
  11. UserListRequest
  12. UserCreateRequest
  13. UserUpdateRequest
  14. UserDeleteRequest
  15. UserRenewRequest
  16. UserGenConfigRequest
  17. UserResponse
  18. UserGenConfigResponse
  19. VPNStatusRequest
  20. VPNInitRequest
  21. VPNUpdateRequest
  22. VPNRestartRequest
  23. VPNStatusResponse
  24. VPNInitResponse
  25. VPNUpdateResponse
  26. VPNRestartResponse
  27. NetworkCreateRequest
  28. NetworkListRequest
  29. NetworkDeleteRequest
  30. NetworkGetAllTypesRequest
  31. NetworkAssociateRequest
  32. NetworkDissociateRequest
  33. NetworkGetAssociatedUsersRequest
  34. Network
  35. NetworkType
  36. NetworkCreateResponse
  37. NetworkListResponse
  38. NetworkDeleteResponse
  39. NetworkGetAllTypesResponse
  40. NetworkAssociateResponse
  41. NetworkDissociateResponse
  42. NetworkGetAssociatedUsersResponse
  43. AuthStatusRequest
  44. AuthAuthenticateRequest
  45. AuthStatusResponse
  46. AuthAuthenticateResponse
  47. */
  48. package pb
  49. import proto "github.com/golang/protobuf/proto"
  50. import fmt "fmt"
  51. import math "math"
  52. import _ "google.golang.org/genproto/googleapis/api/annotations"
  53. import (
  54. context "golang.org/x/net/context"
  55. grpc "google.golang.org/grpc"
  56. )
  57. // Reference imports to suppress errors if they are not otherwise used.
  58. var _ = proto.Marshal
  59. var _ = fmt.Errorf
  60. var _ = math.Inf
  61. // This is a compile-time assertion to ensure that this generated file
  62. // is compatible with the proto package it is being compiled against.
  63. // A compilation error at this line likely means your copy of the
  64. // proto package needs to be updated.
  65. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  66. type UserUpdateRequest_GWPref int32
  67. const (
  68. UserUpdateRequest_NOPREF UserUpdateRequest_GWPref = 0
  69. UserUpdateRequest_NOGW UserUpdateRequest_GWPref = 1
  70. UserUpdateRequest_GW UserUpdateRequest_GWPref = 2
  71. )
  72. var UserUpdateRequest_GWPref_name = map[int32]string{
  73. 0: "NOPREF",
  74. 1: "NOGW",
  75. 2: "GW",
  76. }
  77. var UserUpdateRequest_GWPref_value = map[string]int32{
  78. "NOPREF": 0,
  79. "NOGW": 1,
  80. "GW": 2,
  81. }
  82. func (x UserUpdateRequest_GWPref) String() string {
  83. return proto.EnumName(UserUpdateRequest_GWPref_name, int32(x))
  84. }
  85. func (UserUpdateRequest_GWPref) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
  86. type UserUpdateRequest_StaticPref int32
  87. const (
  88. UserUpdateRequest_NOPREFSTATIC UserUpdateRequest_StaticPref = 0
  89. UserUpdateRequest_NOSTATIC UserUpdateRequest_StaticPref = 1
  90. UserUpdateRequest_STATIC UserUpdateRequest_StaticPref = 2
  91. )
  92. var UserUpdateRequest_StaticPref_name = map[int32]string{
  93. 0: "NOPREFSTATIC",
  94. 1: "NOSTATIC",
  95. 2: "STATIC",
  96. }
  97. var UserUpdateRequest_StaticPref_value = map[string]int32{
  98. "NOPREFSTATIC": 0,
  99. "NOSTATIC": 1,
  100. "STATIC": 2,
  101. }
  102. func (x UserUpdateRequest_StaticPref) String() string {
  103. return proto.EnumName(UserUpdateRequest_StaticPref_name, int32(x))
  104. }
  105. func (UserUpdateRequest_StaticPref) EnumDescriptor() ([]byte, []int) {
  106. return fileDescriptor0, []int{2, 1}
  107. }
  108. type UserUpdateRequest_AdminPref int32
  109. const (
  110. UserUpdateRequest_NOPREFADMIN UserUpdateRequest_AdminPref = 0
  111. UserUpdateRequest_NOADMIN UserUpdateRequest_AdminPref = 1
  112. UserUpdateRequest_ADMIN UserUpdateRequest_AdminPref = 2
  113. )
  114. var UserUpdateRequest_AdminPref_name = map[int32]string{
  115. 0: "NOPREFADMIN",
  116. 1: "NOADMIN",
  117. 2: "ADMIN",
  118. }
  119. var UserUpdateRequest_AdminPref_value = map[string]int32{
  120. "NOPREFADMIN": 0,
  121. "NOADMIN": 1,
  122. "ADMIN": 2,
  123. }
  124. func (x UserUpdateRequest_AdminPref) String() string {
  125. return proto.EnumName(UserUpdateRequest_AdminPref_name, int32(x))
  126. }
  127. func (UserUpdateRequest_AdminPref) EnumDescriptor() ([]byte, []int) {
  128. return fileDescriptor0, []int{2, 2}
  129. }
  130. type UserListRequest struct {
  131. }
  132. func (m *UserListRequest) Reset() { *m = UserListRequest{} }
  133. func (m *UserListRequest) String() string { return proto.CompactTextString(m) }
  134. func (*UserListRequest) ProtoMessage() {}
  135. func (*UserListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  136. type UserCreateRequest struct {
  137. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  138. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
  139. NoGw bool `protobuf:"varint,3,opt,name=no_gw,json=noGw" json:"no_gw,omitempty"`
  140. HostId uint32 `protobuf:"varint,4,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
  141. IsAdmin bool `protobuf:"varint,5,opt,name=is_admin,json=isAdmin" json:"is_admin,omitempty"`
  142. }
  143. func (m *UserCreateRequest) Reset() { *m = UserCreateRequest{} }
  144. func (m *UserCreateRequest) String() string { return proto.CompactTextString(m) }
  145. func (*UserCreateRequest) ProtoMessage() {}
  146. func (*UserCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  147. func (m *UserCreateRequest) GetUsername() string {
  148. if m != nil {
  149. return m.Username
  150. }
  151. return ""
  152. }
  153. func (m *UserCreateRequest) GetPassword() string {
  154. if m != nil {
  155. return m.Password
  156. }
  157. return ""
  158. }
  159. func (m *UserCreateRequest) GetNoGw() bool {
  160. if m != nil {
  161. return m.NoGw
  162. }
  163. return false
  164. }
  165. func (m *UserCreateRequest) GetHostId() uint32 {
  166. if m != nil {
  167. return m.HostId
  168. }
  169. return 0
  170. }
  171. func (m *UserCreateRequest) GetIsAdmin() bool {
  172. if m != nil {
  173. return m.IsAdmin
  174. }
  175. return false
  176. }
  177. type UserUpdateRequest struct {
  178. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  179. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
  180. Gwpref UserUpdateRequest_GWPref `protobuf:"varint,3,opt,name=gwpref,enum=pb.UserUpdateRequest_GWPref" json:"gwpref,omitempty"`
  181. HostId uint32 `protobuf:"varint,4,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
  182. StaticPref UserUpdateRequest_StaticPref `protobuf:"varint,5,opt,name=static_pref,json=staticPref,enum=pb.UserUpdateRequest_StaticPref" json:"static_pref,omitempty"`
  183. AdminPref UserUpdateRequest_AdminPref `protobuf:"varint,6,opt,name=admin_pref,json=adminPref,enum=pb.UserUpdateRequest_AdminPref" json:"admin_pref,omitempty"`
  184. }
  185. func (m *UserUpdateRequest) Reset() { *m = UserUpdateRequest{} }
  186. func (m *UserUpdateRequest) String() string { return proto.CompactTextString(m) }
  187. func (*UserUpdateRequest) ProtoMessage() {}
  188. func (*UserUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  189. func (m *UserUpdateRequest) GetUsername() string {
  190. if m != nil {
  191. return m.Username
  192. }
  193. return ""
  194. }
  195. func (m *UserUpdateRequest) GetPassword() string {
  196. if m != nil {
  197. return m.Password
  198. }
  199. return ""
  200. }
  201. func (m *UserUpdateRequest) GetGwpref() UserUpdateRequest_GWPref {
  202. if m != nil {
  203. return m.Gwpref
  204. }
  205. return UserUpdateRequest_NOPREF
  206. }
  207. func (m *UserUpdateRequest) GetHostId() uint32 {
  208. if m != nil {
  209. return m.HostId
  210. }
  211. return 0
  212. }
  213. func (m *UserUpdateRequest) GetStaticPref() UserUpdateRequest_StaticPref {
  214. if m != nil {
  215. return m.StaticPref
  216. }
  217. return UserUpdateRequest_NOPREFSTATIC
  218. }
  219. func (m *UserUpdateRequest) GetAdminPref() UserUpdateRequest_AdminPref {
  220. if m != nil {
  221. return m.AdminPref
  222. }
  223. return UserUpdateRequest_NOPREFADMIN
  224. }
  225. type UserDeleteRequest struct {
  226. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  227. }
  228. func (m *UserDeleteRequest) Reset() { *m = UserDeleteRequest{} }
  229. func (m *UserDeleteRequest) String() string { return proto.CompactTextString(m) }
  230. func (*UserDeleteRequest) ProtoMessage() {}
  231. func (*UserDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  232. func (m *UserDeleteRequest) GetUsername() string {
  233. if m != nil {
  234. return m.Username
  235. }
  236. return ""
  237. }
  238. type UserRenewRequest struct {
  239. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  240. }
  241. func (m *UserRenewRequest) Reset() { *m = UserRenewRequest{} }
  242. func (m *UserRenewRequest) String() string { return proto.CompactTextString(m) }
  243. func (*UserRenewRequest) ProtoMessage() {}
  244. func (*UserRenewRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  245. func (m *UserRenewRequest) GetUsername() string {
  246. if m != nil {
  247. return m.Username
  248. }
  249. return ""
  250. }
  251. type UserGenConfigRequest struct {
  252. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  253. }
  254. func (m *UserGenConfigRequest) Reset() { *m = UserGenConfigRequest{} }
  255. func (m *UserGenConfigRequest) String() string { return proto.CompactTextString(m) }
  256. func (*UserGenConfigRequest) ProtoMessage() {}
  257. func (*UserGenConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  258. func (m *UserGenConfigRequest) GetUsername() string {
  259. if m != nil {
  260. return m.Username
  261. }
  262. return ""
  263. }
  264. type UserResponse struct {
  265. Users []*UserResponse_User `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"`
  266. }
  267. func (m *UserResponse) Reset() { *m = UserResponse{} }
  268. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  269. func (*UserResponse) ProtoMessage() {}
  270. func (*UserResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  271. func (m *UserResponse) GetUsers() []*UserResponse_User {
  272. if m != nil {
  273. return m.Users
  274. }
  275. return nil
  276. }
  277. type UserResponse_User struct {
  278. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  279. ServerSerialNumber string `protobuf:"bytes,2,opt,name=server_serial_number,json=serverSerialNumber" json:"server_serial_number,omitempty"`
  280. Cert string `protobuf:"bytes,3,opt,name=cert" json:"cert,omitempty"`
  281. CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
  282. IpNet string `protobuf:"bytes,5,opt,name=ip_net,json=ipNet" json:"ip_net,omitempty"`
  283. NoGw bool `protobuf:"varint,6,opt,name=no_gw,json=noGw" json:"no_gw,omitempty"`
  284. HostId uint32 `protobuf:"varint,7,opt,name=host_id,json=hostId" json:"host_id,omitempty"`
  285. IsAdmin bool `protobuf:"varint,8,opt,name=is_admin,json=isAdmin" json:"is_admin,omitempty"`
  286. }
  287. func (m *UserResponse_User) Reset() { *m = UserResponse_User{} }
  288. func (m *UserResponse_User) String() string { return proto.CompactTextString(m) }
  289. func (*UserResponse_User) ProtoMessage() {}
  290. func (*UserResponse_User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} }
  291. func (m *UserResponse_User) GetUsername() string {
  292. if m != nil {
  293. return m.Username
  294. }
  295. return ""
  296. }
  297. func (m *UserResponse_User) GetServerSerialNumber() string {
  298. if m != nil {
  299. return m.ServerSerialNumber
  300. }
  301. return ""
  302. }
  303. func (m *UserResponse_User) GetCert() string {
  304. if m != nil {
  305. return m.Cert
  306. }
  307. return ""
  308. }
  309. func (m *UserResponse_User) GetCreatedAt() string {
  310. if m != nil {
  311. return m.CreatedAt
  312. }
  313. return ""
  314. }
  315. func (m *UserResponse_User) GetIpNet() string {
  316. if m != nil {
  317. return m.IpNet
  318. }
  319. return ""
  320. }
  321. func (m *UserResponse_User) GetNoGw() bool {
  322. if m != nil {
  323. return m.NoGw
  324. }
  325. return false
  326. }
  327. func (m *UserResponse_User) GetHostId() uint32 {
  328. if m != nil {
  329. return m.HostId
  330. }
  331. return 0
  332. }
  333. func (m *UserResponse_User) GetIsAdmin() bool {
  334. if m != nil {
  335. return m.IsAdmin
  336. }
  337. return false
  338. }
  339. type UserGenConfigResponse struct {
  340. ClientConfig string `protobuf:"bytes,1,opt,name=client_config,json=clientConfig" json:"client_config,omitempty"`
  341. }
  342. func (m *UserGenConfigResponse) Reset() { *m = UserGenConfigResponse{} }
  343. func (m *UserGenConfigResponse) String() string { return proto.CompactTextString(m) }
  344. func (*UserGenConfigResponse) ProtoMessage() {}
  345. func (*UserGenConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  346. func (m *UserGenConfigResponse) GetClientConfig() string {
  347. if m != nil {
  348. return m.ClientConfig
  349. }
  350. return ""
  351. }
  352. func init() {
  353. proto.RegisterType((*UserListRequest)(nil), "pb.UserListRequest")
  354. proto.RegisterType((*UserCreateRequest)(nil), "pb.UserCreateRequest")
  355. proto.RegisterType((*UserUpdateRequest)(nil), "pb.UserUpdateRequest")
  356. proto.RegisterType((*UserDeleteRequest)(nil), "pb.UserDeleteRequest")
  357. proto.RegisterType((*UserRenewRequest)(nil), "pb.UserRenewRequest")
  358. proto.RegisterType((*UserGenConfigRequest)(nil), "pb.UserGenConfigRequest")
  359. proto.RegisterType((*UserResponse)(nil), "pb.UserResponse")
  360. proto.RegisterType((*UserResponse_User)(nil), "pb.UserResponse.User")
  361. proto.RegisterType((*UserGenConfigResponse)(nil), "pb.UserGenConfigResponse")
  362. proto.RegisterEnum("pb.UserUpdateRequest_GWPref", UserUpdateRequest_GWPref_name, UserUpdateRequest_GWPref_value)
  363. proto.RegisterEnum("pb.UserUpdateRequest_StaticPref", UserUpdateRequest_StaticPref_name, UserUpdateRequest_StaticPref_value)
  364. proto.RegisterEnum("pb.UserUpdateRequest_AdminPref", UserUpdateRequest_AdminPref_name, UserUpdateRequest_AdminPref_value)
  365. }
  366. // Reference imports to suppress errors if they are not otherwise used.
  367. var _ context.Context
  368. var _ grpc.ClientConn
  369. // This is a compile-time assertion to ensure that this generated file
  370. // is compatible with the grpc package it is being compiled against.
  371. const _ = grpc.SupportPackageIsVersion4
  372. // Client API for UserService service
  373. type UserServiceClient interface {
  374. List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error)
  375. Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  376. Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  377. Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error)
  378. Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error)
  379. GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error)
  380. }
  381. type userServiceClient struct {
  382. cc *grpc.ClientConn
  383. }
  384. func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
  385. return &userServiceClient{cc}
  386. }
  387. func (c *userServiceClient) List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  388. out := new(UserResponse)
  389. err := grpc.Invoke(ctx, "/pb.UserService/List", in, out, c.cc, opts...)
  390. if err != nil {
  391. return nil, err
  392. }
  393. return out, nil
  394. }
  395. func (c *userServiceClient) Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  396. out := new(UserResponse)
  397. err := grpc.Invoke(ctx, "/pb.UserService/Create", in, out, c.cc, opts...)
  398. if err != nil {
  399. return nil, err
  400. }
  401. return out, nil
  402. }
  403. func (c *userServiceClient) Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  404. out := new(UserResponse)
  405. err := grpc.Invoke(ctx, "/pb.UserService/Update", in, out, c.cc, opts...)
  406. if err != nil {
  407. return nil, err
  408. }
  409. return out, nil
  410. }
  411. func (c *userServiceClient) Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  412. out := new(UserResponse)
  413. err := grpc.Invoke(ctx, "/pb.UserService/Delete", in, out, c.cc, opts...)
  414. if err != nil {
  415. return nil, err
  416. }
  417. return out, nil
  418. }
  419. func (c *userServiceClient) Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  420. out := new(UserResponse)
  421. err := grpc.Invoke(ctx, "/pb.UserService/Renew", in, out, c.cc, opts...)
  422. if err != nil {
  423. return nil, err
  424. }
  425. return out, nil
  426. }
  427. func (c *userServiceClient) GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error) {
  428. out := new(UserGenConfigResponse)
  429. err := grpc.Invoke(ctx, "/pb.UserService/GenConfig", in, out, c.cc, opts...)
  430. if err != nil {
  431. return nil, err
  432. }
  433. return out, nil
  434. }
  435. // Server API for UserService service
  436. type UserServiceServer interface {
  437. List(context.Context, *UserListRequest) (*UserResponse, error)
  438. Create(context.Context, *UserCreateRequest) (*UserResponse, error)
  439. Update(context.Context, *UserUpdateRequest) (*UserResponse, error)
  440. Delete(context.Context, *UserDeleteRequest) (*UserResponse, error)
  441. Renew(context.Context, *UserRenewRequest) (*UserResponse, error)
  442. GenConfig(context.Context, *UserGenConfigRequest) (*UserGenConfigResponse, error)
  443. }
  444. func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
  445. s.RegisterService(&_UserService_serviceDesc, srv)
  446. }
  447. func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  448. in := new(UserListRequest)
  449. if err := dec(in); err != nil {
  450. return nil, err
  451. }
  452. if interceptor == nil {
  453. return srv.(UserServiceServer).List(ctx, in)
  454. }
  455. info := &grpc.UnaryServerInfo{
  456. Server: srv,
  457. FullMethod: "/pb.UserService/List",
  458. }
  459. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  460. return srv.(UserServiceServer).List(ctx, req.(*UserListRequest))
  461. }
  462. return interceptor(ctx, in, info, handler)
  463. }
  464. func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  465. in := new(UserCreateRequest)
  466. if err := dec(in); err != nil {
  467. return nil, err
  468. }
  469. if interceptor == nil {
  470. return srv.(UserServiceServer).Create(ctx, in)
  471. }
  472. info := &grpc.UnaryServerInfo{
  473. Server: srv,
  474. FullMethod: "/pb.UserService/Create",
  475. }
  476. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  477. return srv.(UserServiceServer).Create(ctx, req.(*UserCreateRequest))
  478. }
  479. return interceptor(ctx, in, info, handler)
  480. }
  481. func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  482. in := new(UserUpdateRequest)
  483. if err := dec(in); err != nil {
  484. return nil, err
  485. }
  486. if interceptor == nil {
  487. return srv.(UserServiceServer).Update(ctx, in)
  488. }
  489. info := &grpc.UnaryServerInfo{
  490. Server: srv,
  491. FullMethod: "/pb.UserService/Update",
  492. }
  493. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  494. return srv.(UserServiceServer).Update(ctx, req.(*UserUpdateRequest))
  495. }
  496. return interceptor(ctx, in, info, handler)
  497. }
  498. func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  499. in := new(UserDeleteRequest)
  500. if err := dec(in); err != nil {
  501. return nil, err
  502. }
  503. if interceptor == nil {
  504. return srv.(UserServiceServer).Delete(ctx, in)
  505. }
  506. info := &grpc.UnaryServerInfo{
  507. Server: srv,
  508. FullMethod: "/pb.UserService/Delete",
  509. }
  510. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  511. return srv.(UserServiceServer).Delete(ctx, req.(*UserDeleteRequest))
  512. }
  513. return interceptor(ctx, in, info, handler)
  514. }
  515. func _UserService_Renew_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  516. in := new(UserRenewRequest)
  517. if err := dec(in); err != nil {
  518. return nil, err
  519. }
  520. if interceptor == nil {
  521. return srv.(UserServiceServer).Renew(ctx, in)
  522. }
  523. info := &grpc.UnaryServerInfo{
  524. Server: srv,
  525. FullMethod: "/pb.UserService/Renew",
  526. }
  527. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  528. return srv.(UserServiceServer).Renew(ctx, req.(*UserRenewRequest))
  529. }
  530. return interceptor(ctx, in, info, handler)
  531. }
  532. func _UserService_GenConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  533. in := new(UserGenConfigRequest)
  534. if err := dec(in); err != nil {
  535. return nil, err
  536. }
  537. if interceptor == nil {
  538. return srv.(UserServiceServer).GenConfig(ctx, in)
  539. }
  540. info := &grpc.UnaryServerInfo{
  541. Server: srv,
  542. FullMethod: "/pb.UserService/GenConfig",
  543. }
  544. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  545. return srv.(UserServiceServer).GenConfig(ctx, req.(*UserGenConfigRequest))
  546. }
  547. return interceptor(ctx, in, info, handler)
  548. }
  549. var _UserService_serviceDesc = grpc.ServiceDesc{
  550. ServiceName: "pb.UserService",
  551. HandlerType: (*UserServiceServer)(nil),
  552. Methods: []grpc.MethodDesc{
  553. {
  554. MethodName: "List",
  555. Handler: _UserService_List_Handler,
  556. },
  557. {
  558. MethodName: "Create",
  559. Handler: _UserService_Create_Handler,
  560. },
  561. {
  562. MethodName: "Update",
  563. Handler: _UserService_Update_Handler,
  564. },
  565. {
  566. MethodName: "Delete",
  567. Handler: _UserService_Delete_Handler,
  568. },
  569. {
  570. MethodName: "Renew",
  571. Handler: _UserService_Renew_Handler,
  572. },
  573. {
  574. MethodName: "GenConfig",
  575. Handler: _UserService_GenConfig_Handler,
  576. },
  577. },
  578. Streams: []grpc.StreamDesc{},
  579. Metadata: "user.proto",
  580. }
  581. func init() { proto.RegisterFile("user.proto", fileDescriptor0) }
  582. var fileDescriptor0 = []byte{
  583. // 731 bytes of a gzipped FileDescriptorProto
  584. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x51, 0x6e, 0xd3, 0x4c,
  585. 0x10, 0xc7, 0x6b, 0x37, 0x76, 0xe2, 0x49, 0xfa, 0xd5, 0xdd, 0xb4, 0x5f, 0xdd, 0xd0, 0x42, 0x30,
  586. 0x12, 0x8a, 0x8a, 0x94, 0x40, 0xe8, 0x03, 0xaa, 0x10, 0x52, 0xd4, 0x42, 0xa8, 0x04, 0x4e, 0x71,
  587. 0x5a, 0xf5, 0xd1, 0x72, 0xec, 0x6d, 0xb0, 0x94, 0xae, 0xcd, 0xae, 0xd3, 0xbc, 0x23, 0x71, 0x02,
  588. 0xb8, 0x02, 0x47, 0xe0, 0x24, 0x5c, 0x01, 0x89, 0x6b, 0xa0, 0xdd, 0x75, 0x12, 0x5c, 0x52, 0x94,
  589. 0x07, 0xde, 0x76, 0x76, 0x66, 0x7e, 0x3b, 0x9e, 0x9d, 0xff, 0x1a, 0x60, 0xcc, 0x30, 0x6d, 0x26,
  590. 0x34, 0x4e, 0x63, 0xa4, 0x26, 0x83, 0xda, 0xee, 0x30, 0x8e, 0x87, 0x23, 0xdc, 0xf2, 0x93, 0xa8,
  591. 0xe5, 0x13, 0x12, 0xa7, 0x7e, 0x1a, 0xc5, 0x84, 0xc9, 0x08, 0x7b, 0x03, 0xd6, 0xcf, 0x19, 0xa6,
  592. 0x6f, 0x22, 0x96, 0xba, 0xf8, 0xc3, 0x18, 0xb3, 0xd4, 0xfe, 0xa2, 0xc0, 0x06, 0xdf, 0x3b, 0xa2,
  593. 0xd8, 0x4f, 0x71, 0xb6, 0x8b, 0x6a, 0x50, 0xe2, 0x60, 0xe2, 0x5f, 0x61, 0x4b, 0xa9, 0x2b, 0x0d,
  594. 0xc3, 0x9d, 0xd9, 0xdc, 0x97, 0xf8, 0x8c, 0x4d, 0x62, 0x1a, 0x5a, 0xaa, 0xf4, 0x4d, 0x6d, 0x54,
  595. 0x05, 0x8d, 0xc4, 0xde, 0x70, 0x62, 0xad, 0xd6, 0x95, 0x46, 0xc9, 0x2d, 0x90, 0xb8, 0x3b, 0x41,
  596. 0xdb, 0x50, 0x7c, 0x1f, 0xb3, 0xd4, 0x8b, 0x42, 0xab, 0x50, 0x57, 0x1a, 0x6b, 0xae, 0xce, 0xcd,
  597. 0x93, 0x10, 0xed, 0x40, 0x29, 0x62, 0x9e, 0x1f, 0x5e, 0x45, 0xc4, 0xd2, 0x44, 0x42, 0x31, 0x62,
  598. 0x1d, 0x6e, 0xda, 0xdf, 0x56, 0x65, 0x59, 0xe7, 0x49, 0xf8, 0x0f, 0xca, 0x3a, 0x00, 0x7d, 0x38,
  599. 0x49, 0x28, 0xbe, 0x14, 0x75, 0xfd, 0xd7, 0xde, 0x6d, 0x26, 0x83, 0xe6, 0x1f, 0xf8, 0x66, 0xf7,
  600. 0xe2, 0x94, 0xe2, 0x4b, 0x37, 0x8b, 0xbd, 0xbd, 0xee, 0x0e, 0x94, 0x19, 0x6f, 0x6c, 0xe0, 0x09,
  601. 0xa6, 0x26, 0x98, 0xf5, 0xc5, 0xcc, 0xbe, 0x08, 0x14, 0x5c, 0x60, 0xb3, 0x35, 0x7a, 0x01, 0x20,
  602. 0xbe, 0x5b, 0x12, 0x74, 0x41, 0xb8, 0xb7, 0x98, 0x20, 0x1a, 0x22, 0x00, 0x86, 0x3f, 0x5d, 0xda,
  603. 0x0f, 0x41, 0x97, 0xd5, 0x22, 0x00, 0xdd, 0xe9, 0x9d, 0xba, 0x2f, 0x5f, 0x99, 0x2b, 0xa8, 0x04,
  604. 0x05, 0xa7, 0xd7, 0xbd, 0x30, 0x15, 0xa4, 0x83, 0xda, 0xbd, 0x30, 0x55, 0xfb, 0x19, 0xc0, 0xbc,
  605. 0x02, 0x64, 0x42, 0x45, 0xc6, 0xf6, 0xcf, 0x3a, 0x67, 0x27, 0x47, 0xe6, 0x0a, 0xaa, 0x40, 0xc9,
  606. 0xe9, 0x65, 0x96, 0xc2, 0x59, 0xd9, 0x5a, 0xb5, 0x0f, 0xc0, 0x98, 0x9d, 0x8c, 0xd6, 0xa1, 0x2c,
  607. 0x13, 0x3b, 0xc7, 0x6f, 0x4f, 0x1c, 0x73, 0x05, 0x95, 0xa1, 0xe8, 0xf4, 0xa4, 0xa1, 0x20, 0x03,
  608. 0x34, 0xb9, 0x54, 0xed, 0x96, 0xbc, 0xb6, 0x63, 0x3c, 0xc2, 0x4b, 0x5d, 0x9b, 0xdd, 0x04, 0x93,
  609. 0x27, 0xb8, 0x98, 0xe0, 0xc9, 0x32, 0xf1, 0x6d, 0xd8, 0xe4, 0xf1, 0x5d, 0x4c, 0x8e, 0x62, 0x72,
  610. 0x19, 0x0d, 0x97, 0xc9, 0xf9, 0xaa, 0x42, 0x45, 0x1e, 0xc2, 0x92, 0x98, 0x30, 0x8c, 0x1e, 0x81,
  611. 0xc6, 0x9d, 0xcc, 0x52, 0xea, 0xab, 0x8d, 0x72, 0x7b, 0x6b, 0xda, 0xf8, 0x69, 0x80, 0x34, 0x64,
  612. 0x4c, 0xed, 0xa7, 0x02, 0x05, 0x6e, 0xff, 0x75, 0xfa, 0x1e, 0xc3, 0x26, 0xc3, 0xf4, 0x1a, 0x53,
  613. 0x8f, 0x61, 0x1a, 0xf9, 0x23, 0x8f, 0x8c, 0xaf, 0x06, 0x98, 0x66, 0x93, 0x88, 0xa4, 0xaf, 0x2f,
  614. 0x5c, 0x8e, 0xf0, 0x20, 0x04, 0x85, 0x00, 0xd3, 0x54, 0x4c, 0xa4, 0xe1, 0x8a, 0x35, 0xda, 0x03,
  615. 0x08, 0x84, 0x0e, 0x43, 0xcf, 0x4f, 0xc5, 0xd0, 0x19, 0xae, 0x91, 0xed, 0x74, 0x52, 0xb4, 0x05,
  616. 0x7a, 0x94, 0x78, 0x04, 0xa7, 0x62, 0xe4, 0x0c, 0x57, 0x8b, 0x12, 0x07, 0xa7, 0x73, 0xd1, 0xe9,
  617. 0x8b, 0x45, 0x57, 0xbc, 0x55, 0x74, 0xa5, 0xbc, 0xe8, 0x9e, 0xc3, 0xd6, 0x8d, 0xde, 0x66, 0xfd,
  618. 0x7a, 0x00, 0x6b, 0xc1, 0x28, 0xc2, 0x24, 0xf5, 0x02, 0xe1, 0xc8, 0x3e, 0xbf, 0x22, 0x37, 0x65,
  619. 0x70, 0xfb, 0x53, 0x01, 0xca, 0x3c, 0xbd, 0x8f, 0xe9, 0x75, 0x14, 0x60, 0xf4, 0x1a, 0x0a, 0xfc,
  620. 0xa1, 0x41, 0xd5, 0x69, 0x77, 0x7f, 0x7b, 0x76, 0x6a, 0xe6, 0xcd, 0x96, 0xdb, 0x3b, 0x1f, 0xbf,
  621. 0xff, 0xf8, 0xac, 0x56, 0xd1, 0x86, 0x78, 0xbb, 0xae, 0x9f, 0xb4, 0x78, 0x6f, 0x5b, 0x23, 0x4e,
  622. 0x78, 0x07, 0xba, 0x7c, 0x9e, 0xd0, 0xec, 0xa6, 0x72, 0xcf, 0xd5, 0x02, 0xda, 0x5d, 0x41, 0xb3,
  623. 0xec, 0x6a, 0x8e, 0x26, 0x5b, 0x79, 0xa8, 0xec, 0x73, 0xa4, 0x54, 0xd9, 0x1c, 0x99, 0x53, 0xdd,
  624. 0xd2, 0xc8, 0xb1, 0xc8, 0xca, 0x90, 0x72, 0xec, 0xe7, 0xc8, 0x9c, 0x0c, 0x96, 0x46, 0x86, 0x22,
  625. 0x8b, 0x23, 0x1d, 0xd0, 0x84, 0x30, 0xd0, 0xe6, 0x3c, 0x75, 0xae, 0x93, 0x05, 0xc0, 0x3d, 0x01,
  626. 0xdc, 0xb6, 0x51, 0x0e, 0x48, 0x79, 0x12, 0xe7, 0x05, 0x60, 0xcc, 0x2e, 0x17, 0x59, 0xd3, 0xec,
  627. 0x9b, 0x5a, 0xaa, 0xed, 0x2c, 0xf0, 0x64, 0x07, 0xdc, 0x17, 0x07, 0xdc, 0xb1, 0xff, 0xcf, 0x1d,
  628. 0x30, 0xc4, 0x44, 0x0e, 0xc6, 0xa1, 0xb2, 0x3f, 0xd0, 0xc5, 0xbf, 0xe6, 0xe9, 0xaf, 0x00, 0x00,
  629. 0x00, 0xff, 0xff, 0x89, 0x27, 0x01, 0x2f, 0x9b, 0x06, 0x00, 0x00,
  630. }