user.pb.go 24 KB

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