user.pb.go 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  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. IsConnected bool `protobuf:"varint,9,opt,name=is_connected,json=isConnected" json:"is_connected,omitempty"`
  287. ConnectedSince string `protobuf:"bytes,10,opt,name=connected_since,json=connectedSince" json:"connected_since,omitempty"`
  288. BytesSent uint64 `protobuf:"varint,11,opt,name=bytes_sent,json=bytesSent" json:"bytes_sent,omitempty"`
  289. BytesReceived uint64 `protobuf:"varint,12,opt,name=bytes_received,json=bytesReceived" json:"bytes_received,omitempty"`
  290. }
  291. func (m *UserResponse_User) Reset() { *m = UserResponse_User{} }
  292. func (m *UserResponse_User) String() string { return proto.CompactTextString(m) }
  293. func (*UserResponse_User) ProtoMessage() {}
  294. func (*UserResponse_User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} }
  295. func (m *UserResponse_User) GetUsername() string {
  296. if m != nil {
  297. return m.Username
  298. }
  299. return ""
  300. }
  301. func (m *UserResponse_User) GetServerSerialNumber() string {
  302. if m != nil {
  303. return m.ServerSerialNumber
  304. }
  305. return ""
  306. }
  307. func (m *UserResponse_User) GetCert() string {
  308. if m != nil {
  309. return m.Cert
  310. }
  311. return ""
  312. }
  313. func (m *UserResponse_User) GetCreatedAt() string {
  314. if m != nil {
  315. return m.CreatedAt
  316. }
  317. return ""
  318. }
  319. func (m *UserResponse_User) GetIpNet() string {
  320. if m != nil {
  321. return m.IpNet
  322. }
  323. return ""
  324. }
  325. func (m *UserResponse_User) GetNoGw() bool {
  326. if m != nil {
  327. return m.NoGw
  328. }
  329. return false
  330. }
  331. func (m *UserResponse_User) GetHostId() uint32 {
  332. if m != nil {
  333. return m.HostId
  334. }
  335. return 0
  336. }
  337. func (m *UserResponse_User) GetIsAdmin() bool {
  338. if m != nil {
  339. return m.IsAdmin
  340. }
  341. return false
  342. }
  343. func (m *UserResponse_User) GetIsConnected() bool {
  344. if m != nil {
  345. return m.IsConnected
  346. }
  347. return false
  348. }
  349. func (m *UserResponse_User) GetConnectedSince() string {
  350. if m != nil {
  351. return m.ConnectedSince
  352. }
  353. return ""
  354. }
  355. func (m *UserResponse_User) GetBytesSent() uint64 {
  356. if m != nil {
  357. return m.BytesSent
  358. }
  359. return 0
  360. }
  361. func (m *UserResponse_User) GetBytesReceived() uint64 {
  362. if m != nil {
  363. return m.BytesReceived
  364. }
  365. return 0
  366. }
  367. type UserGenConfigResponse struct {
  368. ClientConfig string `protobuf:"bytes,1,opt,name=client_config,json=clientConfig" json:"client_config,omitempty"`
  369. }
  370. func (m *UserGenConfigResponse) Reset() { *m = UserGenConfigResponse{} }
  371. func (m *UserGenConfigResponse) String() string { return proto.CompactTextString(m) }
  372. func (*UserGenConfigResponse) ProtoMessage() {}
  373. func (*UserGenConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  374. func (m *UserGenConfigResponse) GetClientConfig() string {
  375. if m != nil {
  376. return m.ClientConfig
  377. }
  378. return ""
  379. }
  380. func init() {
  381. proto.RegisterType((*UserListRequest)(nil), "pb.UserListRequest")
  382. proto.RegisterType((*UserCreateRequest)(nil), "pb.UserCreateRequest")
  383. proto.RegisterType((*UserUpdateRequest)(nil), "pb.UserUpdateRequest")
  384. proto.RegisterType((*UserDeleteRequest)(nil), "pb.UserDeleteRequest")
  385. proto.RegisterType((*UserRenewRequest)(nil), "pb.UserRenewRequest")
  386. proto.RegisterType((*UserGenConfigRequest)(nil), "pb.UserGenConfigRequest")
  387. proto.RegisterType((*UserResponse)(nil), "pb.UserResponse")
  388. proto.RegisterType((*UserResponse_User)(nil), "pb.UserResponse.User")
  389. proto.RegisterType((*UserGenConfigResponse)(nil), "pb.UserGenConfigResponse")
  390. proto.RegisterEnum("pb.UserUpdateRequest_GWPref", UserUpdateRequest_GWPref_name, UserUpdateRequest_GWPref_value)
  391. proto.RegisterEnum("pb.UserUpdateRequest_StaticPref", UserUpdateRequest_StaticPref_name, UserUpdateRequest_StaticPref_value)
  392. proto.RegisterEnum("pb.UserUpdateRequest_AdminPref", UserUpdateRequest_AdminPref_name, UserUpdateRequest_AdminPref_value)
  393. }
  394. // Reference imports to suppress errors if they are not otherwise used.
  395. var _ context.Context
  396. var _ grpc.ClientConn
  397. // This is a compile-time assertion to ensure that this generated file
  398. // is compatible with the grpc package it is being compiled against.
  399. const _ = grpc.SupportPackageIsVersion4
  400. // Client API for UserService service
  401. type UserServiceClient interface {
  402. List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error)
  403. Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  404. Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  405. Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error)
  406. Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error)
  407. GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error)
  408. }
  409. type userServiceClient struct {
  410. cc *grpc.ClientConn
  411. }
  412. func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
  413. return &userServiceClient{cc}
  414. }
  415. func (c *userServiceClient) List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  416. out := new(UserResponse)
  417. err := grpc.Invoke(ctx, "/pb.UserService/List", in, out, c.cc, opts...)
  418. if err != nil {
  419. return nil, err
  420. }
  421. return out, nil
  422. }
  423. func (c *userServiceClient) Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  424. out := new(UserResponse)
  425. err := grpc.Invoke(ctx, "/pb.UserService/Create", in, out, c.cc, opts...)
  426. if err != nil {
  427. return nil, err
  428. }
  429. return out, nil
  430. }
  431. func (c *userServiceClient) Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  432. out := new(UserResponse)
  433. err := grpc.Invoke(ctx, "/pb.UserService/Update", in, out, c.cc, opts...)
  434. if err != nil {
  435. return nil, err
  436. }
  437. return out, nil
  438. }
  439. func (c *userServiceClient) Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  440. out := new(UserResponse)
  441. err := grpc.Invoke(ctx, "/pb.UserService/Delete", in, out, c.cc, opts...)
  442. if err != nil {
  443. return nil, err
  444. }
  445. return out, nil
  446. }
  447. func (c *userServiceClient) Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  448. out := new(UserResponse)
  449. err := grpc.Invoke(ctx, "/pb.UserService/Renew", in, out, c.cc, opts...)
  450. if err != nil {
  451. return nil, err
  452. }
  453. return out, nil
  454. }
  455. func (c *userServiceClient) GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error) {
  456. out := new(UserGenConfigResponse)
  457. err := grpc.Invoke(ctx, "/pb.UserService/GenConfig", in, out, c.cc, opts...)
  458. if err != nil {
  459. return nil, err
  460. }
  461. return out, nil
  462. }
  463. // Server API for UserService service
  464. type UserServiceServer interface {
  465. List(context.Context, *UserListRequest) (*UserResponse, error)
  466. Create(context.Context, *UserCreateRequest) (*UserResponse, error)
  467. Update(context.Context, *UserUpdateRequest) (*UserResponse, error)
  468. Delete(context.Context, *UserDeleteRequest) (*UserResponse, error)
  469. Renew(context.Context, *UserRenewRequest) (*UserResponse, error)
  470. GenConfig(context.Context, *UserGenConfigRequest) (*UserGenConfigResponse, error)
  471. }
  472. func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
  473. s.RegisterService(&_UserService_serviceDesc, srv)
  474. }
  475. func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  476. in := new(UserListRequest)
  477. if err := dec(in); err != nil {
  478. return nil, err
  479. }
  480. if interceptor == nil {
  481. return srv.(UserServiceServer).List(ctx, in)
  482. }
  483. info := &grpc.UnaryServerInfo{
  484. Server: srv,
  485. FullMethod: "/pb.UserService/List",
  486. }
  487. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  488. return srv.(UserServiceServer).List(ctx, req.(*UserListRequest))
  489. }
  490. return interceptor(ctx, in, info, handler)
  491. }
  492. func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  493. in := new(UserCreateRequest)
  494. if err := dec(in); err != nil {
  495. return nil, err
  496. }
  497. if interceptor == nil {
  498. return srv.(UserServiceServer).Create(ctx, in)
  499. }
  500. info := &grpc.UnaryServerInfo{
  501. Server: srv,
  502. FullMethod: "/pb.UserService/Create",
  503. }
  504. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  505. return srv.(UserServiceServer).Create(ctx, req.(*UserCreateRequest))
  506. }
  507. return interceptor(ctx, in, info, handler)
  508. }
  509. func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  510. in := new(UserUpdateRequest)
  511. if err := dec(in); err != nil {
  512. return nil, err
  513. }
  514. if interceptor == nil {
  515. return srv.(UserServiceServer).Update(ctx, in)
  516. }
  517. info := &grpc.UnaryServerInfo{
  518. Server: srv,
  519. FullMethod: "/pb.UserService/Update",
  520. }
  521. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  522. return srv.(UserServiceServer).Update(ctx, req.(*UserUpdateRequest))
  523. }
  524. return interceptor(ctx, in, info, handler)
  525. }
  526. func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  527. in := new(UserDeleteRequest)
  528. if err := dec(in); err != nil {
  529. return nil, err
  530. }
  531. if interceptor == nil {
  532. return srv.(UserServiceServer).Delete(ctx, in)
  533. }
  534. info := &grpc.UnaryServerInfo{
  535. Server: srv,
  536. FullMethod: "/pb.UserService/Delete",
  537. }
  538. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  539. return srv.(UserServiceServer).Delete(ctx, req.(*UserDeleteRequest))
  540. }
  541. return interceptor(ctx, in, info, handler)
  542. }
  543. func _UserService_Renew_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  544. in := new(UserRenewRequest)
  545. if err := dec(in); err != nil {
  546. return nil, err
  547. }
  548. if interceptor == nil {
  549. return srv.(UserServiceServer).Renew(ctx, in)
  550. }
  551. info := &grpc.UnaryServerInfo{
  552. Server: srv,
  553. FullMethod: "/pb.UserService/Renew",
  554. }
  555. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  556. return srv.(UserServiceServer).Renew(ctx, req.(*UserRenewRequest))
  557. }
  558. return interceptor(ctx, in, info, handler)
  559. }
  560. func _UserService_GenConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  561. in := new(UserGenConfigRequest)
  562. if err := dec(in); err != nil {
  563. return nil, err
  564. }
  565. if interceptor == nil {
  566. return srv.(UserServiceServer).GenConfig(ctx, in)
  567. }
  568. info := &grpc.UnaryServerInfo{
  569. Server: srv,
  570. FullMethod: "/pb.UserService/GenConfig",
  571. }
  572. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  573. return srv.(UserServiceServer).GenConfig(ctx, req.(*UserGenConfigRequest))
  574. }
  575. return interceptor(ctx, in, info, handler)
  576. }
  577. var _UserService_serviceDesc = grpc.ServiceDesc{
  578. ServiceName: "pb.UserService",
  579. HandlerType: (*UserServiceServer)(nil),
  580. Methods: []grpc.MethodDesc{
  581. {
  582. MethodName: "List",
  583. Handler: _UserService_List_Handler,
  584. },
  585. {
  586. MethodName: "Create",
  587. Handler: _UserService_Create_Handler,
  588. },
  589. {
  590. MethodName: "Update",
  591. Handler: _UserService_Update_Handler,
  592. },
  593. {
  594. MethodName: "Delete",
  595. Handler: _UserService_Delete_Handler,
  596. },
  597. {
  598. MethodName: "Renew",
  599. Handler: _UserService_Renew_Handler,
  600. },
  601. {
  602. MethodName: "GenConfig",
  603. Handler: _UserService_GenConfig_Handler,
  604. },
  605. },
  606. Streams: []grpc.StreamDesc{},
  607. Metadata: "user.proto",
  608. }
  609. func init() { proto.RegisterFile("user.proto", fileDescriptor0) }
  610. var fileDescriptor0 = []byte{
  611. // 809 bytes of a gzipped FileDescriptorProto
  612. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xdd, 0x6e, 0xe3, 0x44,
  613. 0x14, 0x80, 0x6b, 0xd7, 0x71, 0xe3, 0x93, 0xb4, 0x75, 0x27, 0x2d, 0xeb, 0x86, 0x5d, 0xc8, 0x1a,
  614. 0x01, 0xd1, 0x22, 0x25, 0x10, 0xf6, 0x02, 0xad, 0x10, 0x52, 0x94, 0x85, 0x50, 0x09, 0x9c, 0xc5,
  615. 0xd9, 0x55, 0x2f, 0x2d, 0xc7, 0x3e, 0x09, 0x23, 0xa5, 0x63, 0xe3, 0x99, 0x24, 0xe2, 0x16, 0x89,
  616. 0x27, 0x80, 0x57, 0x41, 0x3c, 0x08, 0xaf, 0xc0, 0x4b, 0x70, 0x87, 0x66, 0xc6, 0x49, 0x48, 0x49,
  617. 0x51, 0x2e, 0xb8, 0x9b, 0xf3, 0xf7, 0xcd, 0xf1, 0x9c, 0x1f, 0x03, 0x2c, 0x38, 0x16, 0x9d, 0xbc,
  618. 0xc8, 0x44, 0x46, 0xcc, 0x7c, 0xd2, 0x7c, 0x3c, 0xcb, 0xb2, 0xd9, 0x1c, 0xbb, 0x71, 0x4e, 0xbb,
  619. 0x31, 0x63, 0x99, 0x88, 0x05, 0xcd, 0x18, 0xd7, 0x1e, 0xfe, 0x05, 0x9c, 0xbf, 0xe1, 0x58, 0x7c,
  620. 0x43, 0xb9, 0x08, 0xf1, 0x87, 0x05, 0x72, 0xe1, 0xff, 0x6a, 0xc0, 0x85, 0xd4, 0x0d, 0x0a, 0x8c,
  621. 0x05, 0x96, 0x5a, 0xd2, 0x84, 0xaa, 0x04, 0xb3, 0xf8, 0x0e, 0x3d, 0xa3, 0x65, 0xb4, 0x9d, 0x70,
  622. 0x23, 0x4b, 0x5b, 0x1e, 0x73, 0xbe, 0xca, 0x8a, 0xd4, 0x33, 0xb5, 0x6d, 0x2d, 0x93, 0x06, 0x54,
  623. 0x58, 0x16, 0xcd, 0x56, 0xde, 0x71, 0xcb, 0x68, 0x57, 0x43, 0x8b, 0x65, 0xc3, 0x15, 0x79, 0x04,
  624. 0x27, 0xdf, 0x67, 0x5c, 0x44, 0x34, 0xf5, 0xac, 0x96, 0xd1, 0x3e, 0x0d, 0x6d, 0x29, 0xde, 0xa4,
  625. 0xe4, 0x1a, 0xaa, 0x94, 0x47, 0x71, 0x7a, 0x47, 0x99, 0x57, 0x51, 0x01, 0x27, 0x94, 0xf7, 0xa5,
  626. 0xe8, 0xff, 0x76, 0xac, 0xd3, 0x7a, 0x93, 0xa7, 0xff, 0x43, 0x5a, 0xcf, 0xc1, 0x9e, 0xad, 0xf2,
  627. 0x02, 0xa7, 0x2a, 0xaf, 0xb3, 0xde, 0xe3, 0x4e, 0x3e, 0xe9, 0xfc, 0x0b, 0xdf, 0x19, 0xde, 0xbe,
  628. 0x2a, 0x70, 0x1a, 0x96, 0xbe, 0x0f, 0xe7, 0xdd, 0x87, 0x1a, 0x97, 0x0f, 0x9b, 0x44, 0x8a, 0x59,
  629. 0x51, 0xcc, 0xd6, 0x7e, 0xe6, 0x58, 0x39, 0x2a, 0x2e, 0xf0, 0xcd, 0x99, 0x7c, 0x01, 0xa0, 0xbe,
  630. 0x5b, 0x13, 0x6c, 0x45, 0x78, 0x77, 0x3f, 0x41, 0x3d, 0x88, 0x02, 0x38, 0xf1, 0xfa, 0xe8, 0x7f,
  631. 0x00, 0xb6, 0xce, 0x96, 0x00, 0xd8, 0xc1, 0xe8, 0x55, 0xf8, 0xe5, 0x57, 0xee, 0x11, 0xa9, 0x82,
  632. 0x15, 0x8c, 0x86, 0xb7, 0xae, 0x41, 0x6c, 0x30, 0x87, 0xb7, 0xae, 0xe9, 0x7f, 0x06, 0xb0, 0xcd,
  633. 0x80, 0xb8, 0x50, 0xd7, 0xbe, 0xe3, 0xd7, 0xfd, 0xd7, 0x37, 0x03, 0xf7, 0x88, 0xd4, 0xa1, 0x1a,
  634. 0x8c, 0x4a, 0xc9, 0x90, 0xac, 0xf2, 0x6c, 0xfa, 0xcf, 0xc1, 0xd9, 0xdc, 0x4c, 0xce, 0xa1, 0xa6,
  635. 0x03, 0xfb, 0x2f, 0xbf, 0xbd, 0x09, 0xdc, 0x23, 0x52, 0x83, 0x93, 0x60, 0xa4, 0x05, 0x83, 0x38,
  636. 0x50, 0xd1, 0x47, 0xd3, 0xef, 0xea, 0xb2, 0xbd, 0xc4, 0x39, 0x1e, 0x54, 0x36, 0xbf, 0x03, 0xae,
  637. 0x0c, 0x08, 0x91, 0xe1, 0xea, 0x10, 0xff, 0x1e, 0x5c, 0x4a, 0xff, 0x21, 0xb2, 0x41, 0xc6, 0xa6,
  638. 0x74, 0x76, 0x48, 0xcc, 0xef, 0xc7, 0x50, 0xd7, 0x97, 0xf0, 0x3c, 0x63, 0x1c, 0xc9, 0x47, 0x50,
  639. 0x91, 0x46, 0xee, 0x19, 0xad, 0xe3, 0x76, 0xad, 0x77, 0xb5, 0x7e, 0xf8, 0xb5, 0x83, 0x16, 0xb4,
  640. 0x4f, 0xf3, 0x2f, 0x13, 0x2c, 0x29, 0xff, 0x67, 0xf7, 0x7d, 0x0c, 0x97, 0x1c, 0x8b, 0x25, 0x16,
  641. 0x11, 0xc7, 0x82, 0xc6, 0xf3, 0x88, 0x2d, 0xee, 0x26, 0x58, 0x94, 0x9d, 0x48, 0xb4, 0x6d, 0xac,
  642. 0x4c, 0x81, 0xb2, 0x10, 0x02, 0x56, 0x82, 0x85, 0x50, 0x1d, 0xe9, 0x84, 0xea, 0x4c, 0x9e, 0x00,
  643. 0x24, 0x6a, 0x0e, 0xd3, 0x28, 0x16, 0xaa, 0xe9, 0x9c, 0xd0, 0x29, 0x35, 0x7d, 0x41, 0xae, 0xc0,
  644. 0xa6, 0x79, 0xc4, 0x50, 0xa8, 0x96, 0x73, 0xc2, 0x0a, 0xcd, 0x03, 0x14, 0xdb, 0xa1, 0xb3, 0xf7,
  645. 0x0f, 0xdd, 0xc9, 0x83, 0x43, 0x57, 0xdd, 0x19, 0x3a, 0xf2, 0x14, 0xea, 0x94, 0x47, 0x49, 0xc6,
  646. 0x18, 0x26, 0x02, 0x53, 0xcf, 0x51, 0xe6, 0x1a, 0xe5, 0x83, 0xb5, 0x8a, 0x7c, 0x08, 0xe7, 0x1b,
  647. 0x7b, 0xc4, 0x29, 0x4b, 0xd0, 0x03, 0x95, 0xcb, 0xd9, 0x46, 0x3d, 0x96, 0x5a, 0xf9, 0x29, 0x93,
  648. 0x1f, 0x05, 0xf2, 0x88, 0x23, 0x13, 0x5e, 0xad, 0x65, 0xb4, 0xad, 0xd0, 0x51, 0x9a, 0x31, 0x32,
  649. 0x41, 0xde, 0x87, 0x33, 0x6d, 0x2e, 0x30, 0x41, 0xba, 0xc4, 0xd4, 0xab, 0x2b, 0x97, 0x53, 0xa5,
  650. 0x0d, 0x4b, 0xa5, 0xff, 0x39, 0x5c, 0xdd, 0xab, 0x76, 0x59, 0xc1, 0xf7, 0xe0, 0x34, 0x99, 0x53,
  651. 0x64, 0x42, 0xa6, 0x3b, 0xa5, 0xb3, 0xb2, 0x20, 0x75, 0xad, 0xd4, 0xce, 0xbd, 0x9f, 0x2d, 0xa8,
  652. 0xc9, 0xf0, 0x31, 0x16, 0x4b, 0x9a, 0x20, 0xf9, 0x1a, 0x2c, 0xb9, 0xfa, 0x48, 0x63, 0x5d, 0xef,
  653. 0x7f, 0x2c, 0xc2, 0xa6, 0x7b, 0xbf, 0x09, 0xfc, 0xeb, 0x9f, 0xfe, 0xf8, 0xf3, 0x17, 0xb3, 0x41,
  654. 0x2e, 0xd4, 0x36, 0x5d, 0x7e, 0xd2, 0x95, 0xd5, 0xee, 0xce, 0x25, 0xe1, 0x3b, 0xb0, 0xf5, 0xc2,
  655. 0x24, 0x9b, 0xde, 0xd9, 0x59, 0xa0, 0x7b, 0x68, 0xef, 0x28, 0x9a, 0xe7, 0x37, 0x76, 0x68, 0xba,
  656. 0xb8, 0x2f, 0x8c, 0x67, 0x12, 0xa9, 0xe7, 0x7e, 0x8b, 0xdc, 0xd9, 0x03, 0x07, 0x23, 0x17, 0x2a,
  657. 0xaa, 0x44, 0xea, 0x41, 0xdc, 0x22, 0x77, 0x06, 0xf3, 0x60, 0x64, 0xaa, 0xa2, 0x24, 0x32, 0x80,
  658. 0x8a, 0x1a, 0x55, 0x72, 0xb9, 0x0d, 0xdd, 0x4e, 0xee, 0x1e, 0xe0, 0x13, 0x05, 0x7c, 0xe4, 0x93,
  659. 0x1d, 0x60, 0x21, 0x83, 0x24, 0x2f, 0x01, 0x67, 0x53, 0x5c, 0xe2, 0xad, 0xa3, 0xef, 0x4f, 0x77,
  660. 0xf3, 0x7a, 0x8f, 0xa5, 0xbc, 0xe0, 0xa9, 0xba, 0xe0, 0x6d, 0xff, 0xad, 0x9d, 0x0b, 0x66, 0xc8,
  661. 0x74, 0x63, 0xbc, 0x30, 0x9e, 0x4d, 0x6c, 0xf5, 0xf7, 0xfb, 0xf4, 0xef, 0x00, 0x00, 0x00, 0xff,
  662. 0xff, 0x08, 0xba, 0x29, 0x2a, 0x2d, 0x07, 0x00, 0x00,
  663. }