user.pb.go 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: user.proto
  3. package pb
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. _ "google.golang.org/genproto/googleapis/api/annotations"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. math "math"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  23. type UserUpdateRequest_GWPref int32
  24. const (
  25. UserUpdateRequest_NOPREF UserUpdateRequest_GWPref = 0
  26. UserUpdateRequest_NOGW UserUpdateRequest_GWPref = 1
  27. UserUpdateRequest_GW UserUpdateRequest_GWPref = 2
  28. )
  29. var UserUpdateRequest_GWPref_name = map[int32]string{
  30. 0: "NOPREF",
  31. 1: "NOGW",
  32. 2: "GW",
  33. }
  34. var UserUpdateRequest_GWPref_value = map[string]int32{
  35. "NOPREF": 0,
  36. "NOGW": 1,
  37. "GW": 2,
  38. }
  39. func (x UserUpdateRequest_GWPref) String() string {
  40. return proto.EnumName(UserUpdateRequest_GWPref_name, int32(x))
  41. }
  42. func (UserUpdateRequest_GWPref) EnumDescriptor() ([]byte, []int) {
  43. return fileDescriptor_116e343673f7ffaf, []int{2, 0}
  44. }
  45. type UserUpdateRequest_StaticPref int32
  46. const (
  47. UserUpdateRequest_NOPREFSTATIC UserUpdateRequest_StaticPref = 0
  48. UserUpdateRequest_NOSTATIC UserUpdateRequest_StaticPref = 1
  49. UserUpdateRequest_STATIC UserUpdateRequest_StaticPref = 2
  50. )
  51. var UserUpdateRequest_StaticPref_name = map[int32]string{
  52. 0: "NOPREFSTATIC",
  53. 1: "NOSTATIC",
  54. 2: "STATIC",
  55. }
  56. var UserUpdateRequest_StaticPref_value = map[string]int32{
  57. "NOPREFSTATIC": 0,
  58. "NOSTATIC": 1,
  59. "STATIC": 2,
  60. }
  61. func (x UserUpdateRequest_StaticPref) String() string {
  62. return proto.EnumName(UserUpdateRequest_StaticPref_name, int32(x))
  63. }
  64. func (UserUpdateRequest_StaticPref) EnumDescriptor() ([]byte, []int) {
  65. return fileDescriptor_116e343673f7ffaf, []int{2, 1}
  66. }
  67. type UserUpdateRequest_AdminPref int32
  68. const (
  69. UserUpdateRequest_NOPREFADMIN UserUpdateRequest_AdminPref = 0
  70. UserUpdateRequest_NOADMIN UserUpdateRequest_AdminPref = 1
  71. UserUpdateRequest_ADMIN UserUpdateRequest_AdminPref = 2
  72. )
  73. var UserUpdateRequest_AdminPref_name = map[int32]string{
  74. 0: "NOPREFADMIN",
  75. 1: "NOADMIN",
  76. 2: "ADMIN",
  77. }
  78. var UserUpdateRequest_AdminPref_value = map[string]int32{
  79. "NOPREFADMIN": 0,
  80. "NOADMIN": 1,
  81. "ADMIN": 2,
  82. }
  83. func (x UserUpdateRequest_AdminPref) String() string {
  84. return proto.EnumName(UserUpdateRequest_AdminPref_name, int32(x))
  85. }
  86. func (UserUpdateRequest_AdminPref) EnumDescriptor() ([]byte, []int) {
  87. return fileDescriptor_116e343673f7ffaf, []int{2, 2}
  88. }
  89. type UserListRequest struct {
  90. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  91. XXX_unrecognized []byte `json:"-"`
  92. XXX_sizecache int32 `json:"-"`
  93. }
  94. func (m *UserListRequest) Reset() { *m = UserListRequest{} }
  95. func (m *UserListRequest) String() string { return proto.CompactTextString(m) }
  96. func (*UserListRequest) ProtoMessage() {}
  97. func (*UserListRequest) Descriptor() ([]byte, []int) {
  98. return fileDescriptor_116e343673f7ffaf, []int{0}
  99. }
  100. func (m *UserListRequest) XXX_Unmarshal(b []byte) error {
  101. return xxx_messageInfo_UserListRequest.Unmarshal(m, b)
  102. }
  103. func (m *UserListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  104. return xxx_messageInfo_UserListRequest.Marshal(b, m, deterministic)
  105. }
  106. func (m *UserListRequest) XXX_Merge(src proto.Message) {
  107. xxx_messageInfo_UserListRequest.Merge(m, src)
  108. }
  109. func (m *UserListRequest) XXX_Size() int {
  110. return xxx_messageInfo_UserListRequest.Size(m)
  111. }
  112. func (m *UserListRequest) XXX_DiscardUnknown() {
  113. xxx_messageInfo_UserListRequest.DiscardUnknown(m)
  114. }
  115. var xxx_messageInfo_UserListRequest proto.InternalMessageInfo
  116. type UserCreateRequest struct {
  117. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  118. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  119. NoGw bool `protobuf:"varint,3,opt,name=no_gw,json=noGw,proto3" json:"no_gw,omitempty"`
  120. HostId uint32 `protobuf:"varint,4,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
  121. IsAdmin bool `protobuf:"varint,5,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
  122. Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
  123. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  124. XXX_unrecognized []byte `json:"-"`
  125. XXX_sizecache int32 `json:"-"`
  126. }
  127. func (m *UserCreateRequest) Reset() { *m = UserCreateRequest{} }
  128. func (m *UserCreateRequest) String() string { return proto.CompactTextString(m) }
  129. func (*UserCreateRequest) ProtoMessage() {}
  130. func (*UserCreateRequest) Descriptor() ([]byte, []int) {
  131. return fileDescriptor_116e343673f7ffaf, []int{1}
  132. }
  133. func (m *UserCreateRequest) XXX_Unmarshal(b []byte) error {
  134. return xxx_messageInfo_UserCreateRequest.Unmarshal(m, b)
  135. }
  136. func (m *UserCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  137. return xxx_messageInfo_UserCreateRequest.Marshal(b, m, deterministic)
  138. }
  139. func (m *UserCreateRequest) XXX_Merge(src proto.Message) {
  140. xxx_messageInfo_UserCreateRequest.Merge(m, src)
  141. }
  142. func (m *UserCreateRequest) XXX_Size() int {
  143. return xxx_messageInfo_UserCreateRequest.Size(m)
  144. }
  145. func (m *UserCreateRequest) XXX_DiscardUnknown() {
  146. xxx_messageInfo_UserCreateRequest.DiscardUnknown(m)
  147. }
  148. var xxx_messageInfo_UserCreateRequest proto.InternalMessageInfo
  149. func (m *UserCreateRequest) GetUsername() string {
  150. if m != nil {
  151. return m.Username
  152. }
  153. return ""
  154. }
  155. func (m *UserCreateRequest) GetPassword() string {
  156. if m != nil {
  157. return m.Password
  158. }
  159. return ""
  160. }
  161. func (m *UserCreateRequest) GetNoGw() bool {
  162. if m != nil {
  163. return m.NoGw
  164. }
  165. return false
  166. }
  167. func (m *UserCreateRequest) GetHostId() uint32 {
  168. if m != nil {
  169. return m.HostId
  170. }
  171. return 0
  172. }
  173. func (m *UserCreateRequest) GetIsAdmin() bool {
  174. if m != nil {
  175. return m.IsAdmin
  176. }
  177. return false
  178. }
  179. func (m *UserCreateRequest) GetDescription() string {
  180. if m != nil {
  181. return m.Description
  182. }
  183. return ""
  184. }
  185. type UserUpdateRequest struct {
  186. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  187. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  188. Gwpref UserUpdateRequest_GWPref `protobuf:"varint,3,opt,name=gwpref,proto3,enum=pb.UserUpdateRequest_GWPref" json:"gwpref,omitempty"`
  189. HostId uint32 `protobuf:"varint,4,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
  190. StaticPref UserUpdateRequest_StaticPref `protobuf:"varint,5,opt,name=static_pref,json=staticPref,proto3,enum=pb.UserUpdateRequest_StaticPref" json:"static_pref,omitempty"`
  191. AdminPref UserUpdateRequest_AdminPref `protobuf:"varint,6,opt,name=admin_pref,json=adminPref,proto3,enum=pb.UserUpdateRequest_AdminPref" json:"admin_pref,omitempty"`
  192. Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
  193. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  194. XXX_unrecognized []byte `json:"-"`
  195. XXX_sizecache int32 `json:"-"`
  196. }
  197. func (m *UserUpdateRequest) Reset() { *m = UserUpdateRequest{} }
  198. func (m *UserUpdateRequest) String() string { return proto.CompactTextString(m) }
  199. func (*UserUpdateRequest) ProtoMessage() {}
  200. func (*UserUpdateRequest) Descriptor() ([]byte, []int) {
  201. return fileDescriptor_116e343673f7ffaf, []int{2}
  202. }
  203. func (m *UserUpdateRequest) XXX_Unmarshal(b []byte) error {
  204. return xxx_messageInfo_UserUpdateRequest.Unmarshal(m, b)
  205. }
  206. func (m *UserUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  207. return xxx_messageInfo_UserUpdateRequest.Marshal(b, m, deterministic)
  208. }
  209. func (m *UserUpdateRequest) XXX_Merge(src proto.Message) {
  210. xxx_messageInfo_UserUpdateRequest.Merge(m, src)
  211. }
  212. func (m *UserUpdateRequest) XXX_Size() int {
  213. return xxx_messageInfo_UserUpdateRequest.Size(m)
  214. }
  215. func (m *UserUpdateRequest) XXX_DiscardUnknown() {
  216. xxx_messageInfo_UserUpdateRequest.DiscardUnknown(m)
  217. }
  218. var xxx_messageInfo_UserUpdateRequest proto.InternalMessageInfo
  219. func (m *UserUpdateRequest) GetUsername() string {
  220. if m != nil {
  221. return m.Username
  222. }
  223. return ""
  224. }
  225. func (m *UserUpdateRequest) GetPassword() string {
  226. if m != nil {
  227. return m.Password
  228. }
  229. return ""
  230. }
  231. func (m *UserUpdateRequest) GetGwpref() UserUpdateRequest_GWPref {
  232. if m != nil {
  233. return m.Gwpref
  234. }
  235. return UserUpdateRequest_NOPREF
  236. }
  237. func (m *UserUpdateRequest) GetHostId() uint32 {
  238. if m != nil {
  239. return m.HostId
  240. }
  241. return 0
  242. }
  243. func (m *UserUpdateRequest) GetStaticPref() UserUpdateRequest_StaticPref {
  244. if m != nil {
  245. return m.StaticPref
  246. }
  247. return UserUpdateRequest_NOPREFSTATIC
  248. }
  249. func (m *UserUpdateRequest) GetAdminPref() UserUpdateRequest_AdminPref {
  250. if m != nil {
  251. return m.AdminPref
  252. }
  253. return UserUpdateRequest_NOPREFADMIN
  254. }
  255. func (m *UserUpdateRequest) GetDescription() string {
  256. if m != nil {
  257. return m.Description
  258. }
  259. return ""
  260. }
  261. type UserDeleteRequest struct {
  262. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  263. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  264. XXX_unrecognized []byte `json:"-"`
  265. XXX_sizecache int32 `json:"-"`
  266. }
  267. func (m *UserDeleteRequest) Reset() { *m = UserDeleteRequest{} }
  268. func (m *UserDeleteRequest) String() string { return proto.CompactTextString(m) }
  269. func (*UserDeleteRequest) ProtoMessage() {}
  270. func (*UserDeleteRequest) Descriptor() ([]byte, []int) {
  271. return fileDescriptor_116e343673f7ffaf, []int{3}
  272. }
  273. func (m *UserDeleteRequest) XXX_Unmarshal(b []byte) error {
  274. return xxx_messageInfo_UserDeleteRequest.Unmarshal(m, b)
  275. }
  276. func (m *UserDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  277. return xxx_messageInfo_UserDeleteRequest.Marshal(b, m, deterministic)
  278. }
  279. func (m *UserDeleteRequest) XXX_Merge(src proto.Message) {
  280. xxx_messageInfo_UserDeleteRequest.Merge(m, src)
  281. }
  282. func (m *UserDeleteRequest) XXX_Size() int {
  283. return xxx_messageInfo_UserDeleteRequest.Size(m)
  284. }
  285. func (m *UserDeleteRequest) XXX_DiscardUnknown() {
  286. xxx_messageInfo_UserDeleteRequest.DiscardUnknown(m)
  287. }
  288. var xxx_messageInfo_UserDeleteRequest proto.InternalMessageInfo
  289. func (m *UserDeleteRequest) GetUsername() string {
  290. if m != nil {
  291. return m.Username
  292. }
  293. return ""
  294. }
  295. type UserRenewRequest struct {
  296. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  297. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  298. XXX_unrecognized []byte `json:"-"`
  299. XXX_sizecache int32 `json:"-"`
  300. }
  301. func (m *UserRenewRequest) Reset() { *m = UserRenewRequest{} }
  302. func (m *UserRenewRequest) String() string { return proto.CompactTextString(m) }
  303. func (*UserRenewRequest) ProtoMessage() {}
  304. func (*UserRenewRequest) Descriptor() ([]byte, []int) {
  305. return fileDescriptor_116e343673f7ffaf, []int{4}
  306. }
  307. func (m *UserRenewRequest) XXX_Unmarshal(b []byte) error {
  308. return xxx_messageInfo_UserRenewRequest.Unmarshal(m, b)
  309. }
  310. func (m *UserRenewRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  311. return xxx_messageInfo_UserRenewRequest.Marshal(b, m, deterministic)
  312. }
  313. func (m *UserRenewRequest) XXX_Merge(src proto.Message) {
  314. xxx_messageInfo_UserRenewRequest.Merge(m, src)
  315. }
  316. func (m *UserRenewRequest) XXX_Size() int {
  317. return xxx_messageInfo_UserRenewRequest.Size(m)
  318. }
  319. func (m *UserRenewRequest) XXX_DiscardUnknown() {
  320. xxx_messageInfo_UserRenewRequest.DiscardUnknown(m)
  321. }
  322. var xxx_messageInfo_UserRenewRequest proto.InternalMessageInfo
  323. func (m *UserRenewRequest) GetUsername() string {
  324. if m != nil {
  325. return m.Username
  326. }
  327. return ""
  328. }
  329. type UserGenConfigRequest struct {
  330. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  331. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  332. XXX_unrecognized []byte `json:"-"`
  333. XXX_sizecache int32 `json:"-"`
  334. }
  335. func (m *UserGenConfigRequest) Reset() { *m = UserGenConfigRequest{} }
  336. func (m *UserGenConfigRequest) String() string { return proto.CompactTextString(m) }
  337. func (*UserGenConfigRequest) ProtoMessage() {}
  338. func (*UserGenConfigRequest) Descriptor() ([]byte, []int) {
  339. return fileDescriptor_116e343673f7ffaf, []int{5}
  340. }
  341. func (m *UserGenConfigRequest) XXX_Unmarshal(b []byte) error {
  342. return xxx_messageInfo_UserGenConfigRequest.Unmarshal(m, b)
  343. }
  344. func (m *UserGenConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  345. return xxx_messageInfo_UserGenConfigRequest.Marshal(b, m, deterministic)
  346. }
  347. func (m *UserGenConfigRequest) XXX_Merge(src proto.Message) {
  348. xxx_messageInfo_UserGenConfigRequest.Merge(m, src)
  349. }
  350. func (m *UserGenConfigRequest) XXX_Size() int {
  351. return xxx_messageInfo_UserGenConfigRequest.Size(m)
  352. }
  353. func (m *UserGenConfigRequest) XXX_DiscardUnknown() {
  354. xxx_messageInfo_UserGenConfigRequest.DiscardUnknown(m)
  355. }
  356. var xxx_messageInfo_UserGenConfigRequest proto.InternalMessageInfo
  357. func (m *UserGenConfigRequest) GetUsername() string {
  358. if m != nil {
  359. return m.Username
  360. }
  361. return ""
  362. }
  363. type UserResponse struct {
  364. Users []*UserResponse_User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
  365. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  366. XXX_unrecognized []byte `json:"-"`
  367. XXX_sizecache int32 `json:"-"`
  368. }
  369. func (m *UserResponse) Reset() { *m = UserResponse{} }
  370. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  371. func (*UserResponse) ProtoMessage() {}
  372. func (*UserResponse) Descriptor() ([]byte, []int) {
  373. return fileDescriptor_116e343673f7ffaf, []int{6}
  374. }
  375. func (m *UserResponse) XXX_Unmarshal(b []byte) error {
  376. return xxx_messageInfo_UserResponse.Unmarshal(m, b)
  377. }
  378. func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  379. return xxx_messageInfo_UserResponse.Marshal(b, m, deterministic)
  380. }
  381. func (m *UserResponse) XXX_Merge(src proto.Message) {
  382. xxx_messageInfo_UserResponse.Merge(m, src)
  383. }
  384. func (m *UserResponse) XXX_Size() int {
  385. return xxx_messageInfo_UserResponse.Size(m)
  386. }
  387. func (m *UserResponse) XXX_DiscardUnknown() {
  388. xxx_messageInfo_UserResponse.DiscardUnknown(m)
  389. }
  390. var xxx_messageInfo_UserResponse proto.InternalMessageInfo
  391. func (m *UserResponse) GetUsers() []*UserResponse_User {
  392. if m != nil {
  393. return m.Users
  394. }
  395. return nil
  396. }
  397. type UserResponse_User struct {
  398. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  399. ServerSerialNumber string `protobuf:"bytes,2,opt,name=server_serial_number,json=serverSerialNumber,proto3" json:"server_serial_number,omitempty"`
  400. Cert string `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"`
  401. CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  402. IpNet string `protobuf:"bytes,5,opt,name=ip_net,json=ipNet,proto3" json:"ip_net,omitempty"`
  403. NoGw bool `protobuf:"varint,6,opt,name=no_gw,json=noGw,proto3" json:"no_gw,omitempty"`
  404. HostId uint32 `protobuf:"varint,7,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
  405. IsAdmin bool `protobuf:"varint,8,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
  406. IsConnected bool `protobuf:"varint,9,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"`
  407. ConnectedSince string `protobuf:"bytes,10,opt,name=connected_since,json=connectedSince,proto3" json:"connected_since,omitempty"`
  408. BytesSent uint64 `protobuf:"varint,11,opt,name=bytes_sent,json=bytesSent,proto3" json:"bytes_sent,omitempty"`
  409. BytesReceived uint64 `protobuf:"varint,12,opt,name=bytes_received,json=bytesReceived,proto3" json:"bytes_received,omitempty"`
  410. ExpiresAt string `protobuf:"bytes,13,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
  411. Description string `protobuf:"bytes,14,opt,name=description,proto3" json:"description,omitempty"`
  412. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  413. XXX_unrecognized []byte `json:"-"`
  414. XXX_sizecache int32 `json:"-"`
  415. }
  416. func (m *UserResponse_User) Reset() { *m = UserResponse_User{} }
  417. func (m *UserResponse_User) String() string { return proto.CompactTextString(m) }
  418. func (*UserResponse_User) ProtoMessage() {}
  419. func (*UserResponse_User) Descriptor() ([]byte, []int) {
  420. return fileDescriptor_116e343673f7ffaf, []int{6, 0}
  421. }
  422. func (m *UserResponse_User) XXX_Unmarshal(b []byte) error {
  423. return xxx_messageInfo_UserResponse_User.Unmarshal(m, b)
  424. }
  425. func (m *UserResponse_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  426. return xxx_messageInfo_UserResponse_User.Marshal(b, m, deterministic)
  427. }
  428. func (m *UserResponse_User) XXX_Merge(src proto.Message) {
  429. xxx_messageInfo_UserResponse_User.Merge(m, src)
  430. }
  431. func (m *UserResponse_User) XXX_Size() int {
  432. return xxx_messageInfo_UserResponse_User.Size(m)
  433. }
  434. func (m *UserResponse_User) XXX_DiscardUnknown() {
  435. xxx_messageInfo_UserResponse_User.DiscardUnknown(m)
  436. }
  437. var xxx_messageInfo_UserResponse_User proto.InternalMessageInfo
  438. func (m *UserResponse_User) GetUsername() string {
  439. if m != nil {
  440. return m.Username
  441. }
  442. return ""
  443. }
  444. func (m *UserResponse_User) GetServerSerialNumber() string {
  445. if m != nil {
  446. return m.ServerSerialNumber
  447. }
  448. return ""
  449. }
  450. func (m *UserResponse_User) GetCert() string {
  451. if m != nil {
  452. return m.Cert
  453. }
  454. return ""
  455. }
  456. func (m *UserResponse_User) GetCreatedAt() string {
  457. if m != nil {
  458. return m.CreatedAt
  459. }
  460. return ""
  461. }
  462. func (m *UserResponse_User) GetIpNet() string {
  463. if m != nil {
  464. return m.IpNet
  465. }
  466. return ""
  467. }
  468. func (m *UserResponse_User) GetNoGw() bool {
  469. if m != nil {
  470. return m.NoGw
  471. }
  472. return false
  473. }
  474. func (m *UserResponse_User) GetHostId() uint32 {
  475. if m != nil {
  476. return m.HostId
  477. }
  478. return 0
  479. }
  480. func (m *UserResponse_User) GetIsAdmin() bool {
  481. if m != nil {
  482. return m.IsAdmin
  483. }
  484. return false
  485. }
  486. func (m *UserResponse_User) GetIsConnected() bool {
  487. if m != nil {
  488. return m.IsConnected
  489. }
  490. return false
  491. }
  492. func (m *UserResponse_User) GetConnectedSince() string {
  493. if m != nil {
  494. return m.ConnectedSince
  495. }
  496. return ""
  497. }
  498. func (m *UserResponse_User) GetBytesSent() uint64 {
  499. if m != nil {
  500. return m.BytesSent
  501. }
  502. return 0
  503. }
  504. func (m *UserResponse_User) GetBytesReceived() uint64 {
  505. if m != nil {
  506. return m.BytesReceived
  507. }
  508. return 0
  509. }
  510. func (m *UserResponse_User) GetExpiresAt() string {
  511. if m != nil {
  512. return m.ExpiresAt
  513. }
  514. return ""
  515. }
  516. func (m *UserResponse_User) GetDescription() string {
  517. if m != nil {
  518. return m.Description
  519. }
  520. return ""
  521. }
  522. type UserGenConfigResponse struct {
  523. ClientConfig string `protobuf:"bytes,1,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"`
  524. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  525. XXX_unrecognized []byte `json:"-"`
  526. XXX_sizecache int32 `json:"-"`
  527. }
  528. func (m *UserGenConfigResponse) Reset() { *m = UserGenConfigResponse{} }
  529. func (m *UserGenConfigResponse) String() string { return proto.CompactTextString(m) }
  530. func (*UserGenConfigResponse) ProtoMessage() {}
  531. func (*UserGenConfigResponse) Descriptor() ([]byte, []int) {
  532. return fileDescriptor_116e343673f7ffaf, []int{7}
  533. }
  534. func (m *UserGenConfigResponse) XXX_Unmarshal(b []byte) error {
  535. return xxx_messageInfo_UserGenConfigResponse.Unmarshal(m, b)
  536. }
  537. func (m *UserGenConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  538. return xxx_messageInfo_UserGenConfigResponse.Marshal(b, m, deterministic)
  539. }
  540. func (m *UserGenConfigResponse) XXX_Merge(src proto.Message) {
  541. xxx_messageInfo_UserGenConfigResponse.Merge(m, src)
  542. }
  543. func (m *UserGenConfigResponse) XXX_Size() int {
  544. return xxx_messageInfo_UserGenConfigResponse.Size(m)
  545. }
  546. func (m *UserGenConfigResponse) XXX_DiscardUnknown() {
  547. xxx_messageInfo_UserGenConfigResponse.DiscardUnknown(m)
  548. }
  549. var xxx_messageInfo_UserGenConfigResponse proto.InternalMessageInfo
  550. func (m *UserGenConfigResponse) GetClientConfig() string {
  551. if m != nil {
  552. return m.ClientConfig
  553. }
  554. return ""
  555. }
  556. func init() {
  557. proto.RegisterEnum("pb.UserUpdateRequest_GWPref", UserUpdateRequest_GWPref_name, UserUpdateRequest_GWPref_value)
  558. proto.RegisterEnum("pb.UserUpdateRequest_StaticPref", UserUpdateRequest_StaticPref_name, UserUpdateRequest_StaticPref_value)
  559. proto.RegisterEnum("pb.UserUpdateRequest_AdminPref", UserUpdateRequest_AdminPref_name, UserUpdateRequest_AdminPref_value)
  560. proto.RegisterType((*UserListRequest)(nil), "pb.UserListRequest")
  561. proto.RegisterType((*UserCreateRequest)(nil), "pb.UserCreateRequest")
  562. proto.RegisterType((*UserUpdateRequest)(nil), "pb.UserUpdateRequest")
  563. proto.RegisterType((*UserDeleteRequest)(nil), "pb.UserDeleteRequest")
  564. proto.RegisterType((*UserRenewRequest)(nil), "pb.UserRenewRequest")
  565. proto.RegisterType((*UserGenConfigRequest)(nil), "pb.UserGenConfigRequest")
  566. proto.RegisterType((*UserResponse)(nil), "pb.UserResponse")
  567. proto.RegisterType((*UserResponse_User)(nil), "pb.UserResponse.User")
  568. proto.RegisterType((*UserGenConfigResponse)(nil), "pb.UserGenConfigResponse")
  569. }
  570. func init() { proto.RegisterFile("user.proto", fileDescriptor_116e343673f7ffaf) }
  571. var fileDescriptor_116e343673f7ffaf = []byte{
  572. // 853 bytes of a gzipped FileDescriptorProto
  573. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6f, 0xe3, 0x44,
  574. 0x14, 0xc0, 0xeb, 0xfc, 0x71, 0xe2, 0xe7, 0xb4, 0x75, 0xa7, 0x2d, 0xeb, 0x86, 0x5d, 0xc8, 0x1a,
  575. 0x01, 0xd1, 0x22, 0x25, 0x50, 0xf6, 0x80, 0x56, 0x08, 0x29, 0xea, 0x42, 0xa8, 0x04, 0xee, 0xe2,
  576. 0xec, 0xaa, 0x47, 0xcb, 0xb1, 0x5f, 0xc3, 0x48, 0xe9, 0xd8, 0xcc, 0x4c, 0x13, 0xb8, 0x22, 0xf1,
  577. 0x09, 0xf8, 0x2e, 0x1c, 0xf8, 0x1a, 0x1c, 0xf8, 0x02, 0x7c, 0x08, 0x8e, 0x68, 0x66, 0x9c, 0x64,
  578. 0x93, 0x66, 0x51, 0x0e, 0x7b, 0x9b, 0xf7, 0xef, 0x37, 0xcf, 0x6f, 0xde, 0x7b, 0x06, 0xb8, 0x13,
  579. 0xc8, 0x7b, 0x05, 0xcf, 0x65, 0x4e, 0x2a, 0xc5, 0xb8, 0xfd, 0x70, 0x92, 0xe7, 0x93, 0x29, 0xf6,
  580. 0x93, 0x82, 0xf6, 0x13, 0xc6, 0x72, 0x99, 0x48, 0x9a, 0x33, 0x61, 0x3c, 0x82, 0x23, 0x38, 0x7c,
  581. 0x25, 0x90, 0x7f, 0x47, 0x85, 0x8c, 0xf0, 0xa7, 0x3b, 0x14, 0x32, 0xf8, 0xc3, 0x82, 0x23, 0xa5,
  582. 0xbb, 0xe0, 0x98, 0x48, 0x2c, 0xb5, 0xa4, 0x0d, 0x4d, 0x05, 0x66, 0xc9, 0x2d, 0xfa, 0x56, 0xc7,
  583. 0xea, 0x3a, 0xd1, 0x52, 0x56, 0xb6, 0x22, 0x11, 0x62, 0x9e, 0xf3, 0xcc, 0xaf, 0x18, 0xdb, 0x42,
  584. 0x26, 0xc7, 0x50, 0x67, 0x79, 0x3c, 0x99, 0xfb, 0xd5, 0x8e, 0xd5, 0x6d, 0x46, 0x35, 0x96, 0x0f,
  585. 0xe7, 0xe4, 0x01, 0x34, 0x7e, 0xcc, 0x85, 0x8c, 0x69, 0xe6, 0xd7, 0x3a, 0x56, 0x77, 0x3f, 0xb2,
  586. 0x95, 0x78, 0x99, 0x91, 0x33, 0x68, 0x52, 0x11, 0x27, 0xd9, 0x2d, 0x65, 0x7e, 0x5d, 0x07, 0x34,
  587. 0xa8, 0x18, 0x28, 0x91, 0x74, 0xc0, 0xcd, 0x50, 0xa4, 0x9c, 0x16, 0x2a, 0x7f, 0xdf, 0xd6, 0xf7,
  588. 0xbc, 0xae, 0x0a, 0xfe, 0xae, 0x9a, 0xc4, 0x5f, 0x15, 0xd9, 0x5b, 0x48, 0xfc, 0x29, 0xd8, 0x93,
  589. 0x79, 0xc1, 0xf1, 0x46, 0x67, 0x7e, 0x70, 0xfe, 0xb0, 0x57, 0x8c, 0x7b, 0xf7, 0xf0, 0xbd, 0xe1,
  590. 0xf5, 0x0b, 0x8e, 0x37, 0x51, 0xe9, 0xfb, 0xe6, 0x2f, 0x1b, 0x80, 0x2b, 0x54, 0xe9, 0xd3, 0x58,
  591. 0x33, 0xeb, 0x9a, 0xd9, 0xd9, 0xce, 0x1c, 0x69, 0x47, 0xcd, 0x05, 0xb1, 0x3c, 0x93, 0xaf, 0x00,
  592. 0x74, 0x65, 0x0c, 0xc1, 0xd6, 0x84, 0xf7, 0xb7, 0x13, 0x74, 0xc9, 0x34, 0xc0, 0x49, 0x16, 0xc7,
  593. 0xcd, 0x0a, 0x36, 0xee, 0x57, 0xf0, 0x23, 0xb0, 0xcd, 0xf7, 0x10, 0x00, 0x3b, 0xbc, 0x7a, 0x11,
  594. 0x7d, 0xfd, 0x8d, 0xb7, 0x47, 0x9a, 0x50, 0x0b, 0xaf, 0x86, 0xd7, 0x9e, 0x45, 0x6c, 0xa8, 0x0c,
  595. 0xaf, 0xbd, 0x4a, 0xf0, 0x05, 0xc0, 0x2a, 0x47, 0xe2, 0x41, 0xcb, 0xf8, 0x8e, 0x5e, 0x0e, 0x5e,
  596. 0x5e, 0x5e, 0x78, 0x7b, 0xa4, 0x05, 0xcd, 0xf0, 0xaa, 0x94, 0x2c, 0xc5, 0x2a, 0xcf, 0x95, 0xe0,
  597. 0x29, 0x38, 0xcb, 0xdc, 0xc8, 0x21, 0xb8, 0x26, 0x70, 0xf0, 0xfc, 0xfb, 0xcb, 0xd0, 0xdb, 0x23,
  598. 0x2e, 0x34, 0xc2, 0x2b, 0x23, 0x58, 0xc4, 0x81, 0xba, 0x39, 0x56, 0x82, 0xbe, 0x79, 0xd8, 0xe7,
  599. 0x38, 0xc5, 0x9d, 0x1e, 0x36, 0xe8, 0x81, 0xa7, 0x02, 0x22, 0x64, 0x38, 0xdf, 0xc5, 0xff, 0x1c,
  600. 0x4e, 0x94, 0xff, 0x10, 0xd9, 0x45, 0xce, 0x6e, 0xe8, 0x64, 0x97, 0x98, 0x7f, 0xab, 0xd0, 0x32,
  601. 0x97, 0x88, 0x22, 0x67, 0x02, 0xc9, 0x27, 0x50, 0x57, 0x46, 0xe1, 0x5b, 0x9d, 0x6a, 0xd7, 0x3d,
  602. 0x3f, 0x5d, 0x3c, 0xcd, 0xc2, 0xc1, 0x08, 0xc6, 0xa7, 0xfd, 0x67, 0x15, 0x6a, 0x4a, 0xfe, 0xdf,
  603. 0xfe, 0xfc, 0x14, 0x4e, 0x04, 0xf2, 0x19, 0xf2, 0x58, 0x20, 0xa7, 0xc9, 0x34, 0x66, 0x77, 0xb7,
  604. 0x63, 0xe4, 0x65, 0xaf, 0x12, 0x63, 0x1b, 0x69, 0x53, 0xa8, 0x2d, 0x84, 0x40, 0x2d, 0x45, 0x2e,
  605. 0x75, 0xcf, 0x3a, 0x91, 0x3e, 0x93, 0x47, 0x00, 0xa9, 0x9e, 0xe5, 0x2c, 0x4e, 0xa4, 0x6e, 0x4b,
  606. 0x27, 0x72, 0x4a, 0xcd, 0x40, 0x92, 0x53, 0xb0, 0x69, 0x11, 0x33, 0x94, 0xba, 0x29, 0x9d, 0xa8,
  607. 0x4e, 0x8b, 0x10, 0xe5, 0x6a, 0x70, 0xed, 0xed, 0x83, 0xdb, 0x78, 0xe3, 0xe0, 0x36, 0xd7, 0x07,
  608. 0xf7, 0x31, 0xb4, 0xa8, 0x88, 0xd3, 0x9c, 0x31, 0x4c, 0x25, 0x66, 0xbe, 0xa3, 0xcd, 0x2e, 0x15,
  609. 0x17, 0x0b, 0x15, 0xf9, 0x18, 0x0e, 0x97, 0xf6, 0x58, 0x50, 0x96, 0xa2, 0x0f, 0x3a, 0x97, 0x83,
  610. 0xa5, 0x7a, 0xa4, 0xb4, 0xea, 0x53, 0xc6, 0xbf, 0x48, 0x14, 0xb1, 0x40, 0x26, 0x7d, 0xb7, 0x63,
  611. 0x75, 0x6b, 0x91, 0xa3, 0x35, 0x23, 0x64, 0x92, 0x7c, 0x08, 0x07, 0xc6, 0xcc, 0x31, 0x45, 0x3a,
  612. 0xc3, 0xcc, 0x6f, 0x69, 0x97, 0x7d, 0xad, 0x8d, 0x4a, 0xa5, 0xa2, 0xe0, 0xcf, 0x05, 0xe5, 0x28,
  613. 0x54, 0x41, 0xf6, 0x4d, 0x41, 0x4a, 0xcd, 0x40, 0x6e, 0xce, 0xc9, 0xc1, 0xfd, 0x39, 0xf9, 0x12,
  614. 0x4e, 0x37, 0xda, 0xa5, 0x6c, 0x81, 0x0f, 0x60, 0x3f, 0x9d, 0x52, 0x64, 0x52, 0x7d, 0xef, 0x0d,
  615. 0x9d, 0x94, 0x2f, 0xda, 0x32, 0x4a, 0xe3, 0x7c, 0xfe, 0x5b, 0x0d, 0x5c, 0x15, 0x3e, 0x42, 0x3e,
  616. 0xa3, 0x29, 0x92, 0x6f, 0xa1, 0xa6, 0xf6, 0x2f, 0x39, 0x5e, 0x34, 0xcc, 0x6b, 0xdb, 0xb8, 0xed,
  617. 0x6d, 0x76, 0x51, 0x70, 0xf6, 0xeb, 0x5f, 0xff, 0xfc, 0x5e, 0x39, 0x26, 0x47, 0x7a, 0xa5, 0xcf,
  618. 0x3e, 0xeb, 0xab, 0x76, 0xe9, 0x4f, 0x15, 0xe1, 0x07, 0xb0, 0xcd, 0xd6, 0x26, 0xcb, 0xe6, 0x5b,
  619. 0xdb, 0xe2, 0x5b, 0x68, 0xef, 0x69, 0x9a, 0x1f, 0x1c, 0xaf, 0xd1, 0x4c, 0x77, 0x3c, 0xb3, 0x9e,
  620. 0x28, 0xa4, 0x59, 0x2d, 0x2b, 0xe4, 0xda, 0xaa, 0xd9, 0x19, 0x79, 0xa7, 0xa3, 0x4a, 0xa4, 0x99,
  621. 0xe4, 0x15, 0x72, 0x6d, 0xb2, 0x77, 0x46, 0x66, 0x3a, 0x4a, 0x21, 0x43, 0xa8, 0xeb, 0x59, 0x27,
  622. 0x27, 0xab, 0xd0, 0xd5, 0xe8, 0x6f, 0x01, 0x3e, 0xd2, 0xc0, 0x07, 0x01, 0x59, 0x03, 0x72, 0x15,
  623. 0xa4, 0x78, 0x29, 0x38, 0xcb, 0xc7, 0x25, 0xfe, 0x22, 0x7a, 0x73, 0x3d, 0xb4, 0xcf, 0xb6, 0x58,
  624. 0xca, 0x0b, 0x1e, 0xeb, 0x0b, 0xde, 0x0d, 0xde, 0x59, 0xbb, 0x60, 0x82, 0xcc, 0x34, 0xc6, 0x33,
  625. 0xeb, 0xc9, 0xd8, 0xd6, 0xbf, 0xe0, 0xcf, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xd7, 0xfc, 0x4a,
  626. 0x18, 0xb2, 0x07, 0x00, 0x00,
  627. }
  628. // Reference imports to suppress errors if they are not otherwise used.
  629. var _ context.Context
  630. var _ grpc.ClientConn
  631. // This is a compile-time assertion to ensure that this generated file
  632. // is compatible with the grpc package it is being compiled against.
  633. const _ = grpc.SupportPackageIsVersion4
  634. // UserServiceClient is the client API for UserService service.
  635. //
  636. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  637. type UserServiceClient interface {
  638. List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error)
  639. Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  640. Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error)
  641. Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error)
  642. Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error)
  643. GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error)
  644. }
  645. type userServiceClient struct {
  646. cc *grpc.ClientConn
  647. }
  648. func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
  649. return &userServiceClient{cc}
  650. }
  651. func (c *userServiceClient) List(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  652. out := new(UserResponse)
  653. err := c.cc.Invoke(ctx, "/pb.UserService/List", in, out, opts...)
  654. if err != nil {
  655. return nil, err
  656. }
  657. return out, nil
  658. }
  659. func (c *userServiceClient) Create(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  660. out := new(UserResponse)
  661. err := c.cc.Invoke(ctx, "/pb.UserService/Create", in, out, opts...)
  662. if err != nil {
  663. return nil, err
  664. }
  665. return out, nil
  666. }
  667. func (c *userServiceClient) Update(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  668. out := new(UserResponse)
  669. err := c.cc.Invoke(ctx, "/pb.UserService/Update", in, out, opts...)
  670. if err != nil {
  671. return nil, err
  672. }
  673. return out, nil
  674. }
  675. func (c *userServiceClient) Delete(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  676. out := new(UserResponse)
  677. err := c.cc.Invoke(ctx, "/pb.UserService/Delete", in, out, opts...)
  678. if err != nil {
  679. return nil, err
  680. }
  681. return out, nil
  682. }
  683. func (c *userServiceClient) Renew(ctx context.Context, in *UserRenewRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  684. out := new(UserResponse)
  685. err := c.cc.Invoke(ctx, "/pb.UserService/Renew", in, out, opts...)
  686. if err != nil {
  687. return nil, err
  688. }
  689. return out, nil
  690. }
  691. func (c *userServiceClient) GenConfig(ctx context.Context, in *UserGenConfigRequest, opts ...grpc.CallOption) (*UserGenConfigResponse, error) {
  692. out := new(UserGenConfigResponse)
  693. err := c.cc.Invoke(ctx, "/pb.UserService/GenConfig", in, out, opts...)
  694. if err != nil {
  695. return nil, err
  696. }
  697. return out, nil
  698. }
  699. // UserServiceServer is the server API for UserService service.
  700. type UserServiceServer interface {
  701. List(context.Context, *UserListRequest) (*UserResponse, error)
  702. Create(context.Context, *UserCreateRequest) (*UserResponse, error)
  703. Update(context.Context, *UserUpdateRequest) (*UserResponse, error)
  704. Delete(context.Context, *UserDeleteRequest) (*UserResponse, error)
  705. Renew(context.Context, *UserRenewRequest) (*UserResponse, error)
  706. GenConfig(context.Context, *UserGenConfigRequest) (*UserGenConfigResponse, error)
  707. }
  708. // UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
  709. type UnimplementedUserServiceServer struct {
  710. }
  711. func (*UnimplementedUserServiceServer) List(ctx context.Context, req *UserListRequest) (*UserResponse, error) {
  712. return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
  713. }
  714. func (*UnimplementedUserServiceServer) Create(ctx context.Context, req *UserCreateRequest) (*UserResponse, error) {
  715. return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
  716. }
  717. func (*UnimplementedUserServiceServer) Update(ctx context.Context, req *UserUpdateRequest) (*UserResponse, error) {
  718. return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
  719. }
  720. func (*UnimplementedUserServiceServer) Delete(ctx context.Context, req *UserDeleteRequest) (*UserResponse, error) {
  721. return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
  722. }
  723. func (*UnimplementedUserServiceServer) Renew(ctx context.Context, req *UserRenewRequest) (*UserResponse, error) {
  724. return nil, status.Errorf(codes.Unimplemented, "method Renew not implemented")
  725. }
  726. func (*UnimplementedUserServiceServer) GenConfig(ctx context.Context, req *UserGenConfigRequest) (*UserGenConfigResponse, error) {
  727. return nil, status.Errorf(codes.Unimplemented, "method GenConfig not implemented")
  728. }
  729. func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
  730. s.RegisterService(&_UserService_serviceDesc, srv)
  731. }
  732. func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  733. in := new(UserListRequest)
  734. if err := dec(in); err != nil {
  735. return nil, err
  736. }
  737. if interceptor == nil {
  738. return srv.(UserServiceServer).List(ctx, in)
  739. }
  740. info := &grpc.UnaryServerInfo{
  741. Server: srv,
  742. FullMethod: "/pb.UserService/List",
  743. }
  744. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  745. return srv.(UserServiceServer).List(ctx, req.(*UserListRequest))
  746. }
  747. return interceptor(ctx, in, info, handler)
  748. }
  749. func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  750. in := new(UserCreateRequest)
  751. if err := dec(in); err != nil {
  752. return nil, err
  753. }
  754. if interceptor == nil {
  755. return srv.(UserServiceServer).Create(ctx, in)
  756. }
  757. info := &grpc.UnaryServerInfo{
  758. Server: srv,
  759. FullMethod: "/pb.UserService/Create",
  760. }
  761. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  762. return srv.(UserServiceServer).Create(ctx, req.(*UserCreateRequest))
  763. }
  764. return interceptor(ctx, in, info, handler)
  765. }
  766. func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  767. in := new(UserUpdateRequest)
  768. if err := dec(in); err != nil {
  769. return nil, err
  770. }
  771. if interceptor == nil {
  772. return srv.(UserServiceServer).Update(ctx, in)
  773. }
  774. info := &grpc.UnaryServerInfo{
  775. Server: srv,
  776. FullMethod: "/pb.UserService/Update",
  777. }
  778. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  779. return srv.(UserServiceServer).Update(ctx, req.(*UserUpdateRequest))
  780. }
  781. return interceptor(ctx, in, info, handler)
  782. }
  783. func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  784. in := new(UserDeleteRequest)
  785. if err := dec(in); err != nil {
  786. return nil, err
  787. }
  788. if interceptor == nil {
  789. return srv.(UserServiceServer).Delete(ctx, in)
  790. }
  791. info := &grpc.UnaryServerInfo{
  792. Server: srv,
  793. FullMethod: "/pb.UserService/Delete",
  794. }
  795. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  796. return srv.(UserServiceServer).Delete(ctx, req.(*UserDeleteRequest))
  797. }
  798. return interceptor(ctx, in, info, handler)
  799. }
  800. func _UserService_Renew_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  801. in := new(UserRenewRequest)
  802. if err := dec(in); err != nil {
  803. return nil, err
  804. }
  805. if interceptor == nil {
  806. return srv.(UserServiceServer).Renew(ctx, in)
  807. }
  808. info := &grpc.UnaryServerInfo{
  809. Server: srv,
  810. FullMethod: "/pb.UserService/Renew",
  811. }
  812. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  813. return srv.(UserServiceServer).Renew(ctx, req.(*UserRenewRequest))
  814. }
  815. return interceptor(ctx, in, info, handler)
  816. }
  817. func _UserService_GenConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  818. in := new(UserGenConfigRequest)
  819. if err := dec(in); err != nil {
  820. return nil, err
  821. }
  822. if interceptor == nil {
  823. return srv.(UserServiceServer).GenConfig(ctx, in)
  824. }
  825. info := &grpc.UnaryServerInfo{
  826. Server: srv,
  827. FullMethod: "/pb.UserService/GenConfig",
  828. }
  829. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  830. return srv.(UserServiceServer).GenConfig(ctx, req.(*UserGenConfigRequest))
  831. }
  832. return interceptor(ctx, in, info, handler)
  833. }
  834. var _UserService_serviceDesc = grpc.ServiceDesc{
  835. ServiceName: "pb.UserService",
  836. HandlerType: (*UserServiceServer)(nil),
  837. Methods: []grpc.MethodDesc{
  838. {
  839. MethodName: "List",
  840. Handler: _UserService_List_Handler,
  841. },
  842. {
  843. MethodName: "Create",
  844. Handler: _UserService_Create_Handler,
  845. },
  846. {
  847. MethodName: "Update",
  848. Handler: _UserService_Update_Handler,
  849. },
  850. {
  851. MethodName: "Delete",
  852. Handler: _UserService_Delete_Handler,
  853. },
  854. {
  855. MethodName: "Renew",
  856. Handler: _UserService_Renew_Handler,
  857. },
  858. {
  859. MethodName: "GenConfig",
  860. Handler: _UserService_GenConfig_Handler,
  861. },
  862. },
  863. Streams: []grpc.StreamDesc{},
  864. Metadata: "user.proto",
  865. }