user.pb.go 25 KB

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