user.pb.go 24 KB

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