organization_service.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: organization_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. v1 "cp-system-management/pb/v1"
  8. fmt "fmt"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. math "math"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  24. func init() {
  25. proto.RegisterFile("organization_service.proto", fileDescriptor_e19a463063c4fee0)
  26. }
  27. var fileDescriptor_e19a463063c4fee0 = []byte{
  28. // 264 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4a, 0x03, 0x31,
  30. 0x10, 0x86, 0x15, 0xc4, 0x43, 0xf0, 0x34, 0x28, 0xa5, 0x7b, 0x90, 0xa5, 0x52, 0xbc, 0xd8, 0x94,
  31. 0xea, 0x1b, 0xa8, 0x17, 0x41, 0x51, 0x2a, 0x05, 0xf1, 0x60, 0x49, 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, 0xd7, 0x7e, 0x81, 0x95,
  43. 0xfd, 0xe4, 0xdf, 0xfc, 0xea, 0x11, 0xe7, 0xdd, 0xc7, 0xce, 0xcc, 0x0f, 0x68, 0x49, 0x8c, 0xf9,
  44. 0x20, 0xff, 0x2e, 0x0d, 0xbd, 0xd6, 0xbb, 0xab, 0x9f, 0x74, 0xf6, 0x19, 0x00, 0x00, 0xff, 0xff,
  45. 0xdd, 0x56, 0x14, 0xf6, 0x8a, 0x02, 0x00, 0x00,
  46. }
  47. // Reference imports to suppress errors if they are not otherwise used.
  48. var _ context.Context
  49. var _ grpc.ClientConnInterface
  50. // This is a compile-time assertion to ensure that this generated file
  51. // is compatible with the grpc package it is being compiled against.
  52. const _ = grpc.SupportPackageIsVersion6
  53. // OrganizationClient is the client API for Organization service.
  54. //
  55. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  56. type OrganizationClient interface {
  57. // 初始化数据库
  58. InitOrganizationDb(ctx context.Context, in *v1.InitOrganizationDbRequest, opts ...grpc.CallOption) (*v1.InitOrganizationDbReply, error)
  59. // 创建机构账号
  60. CreateManagementUser(ctx context.Context, in *v1.CreateManagementUserRequest, opts ...grpc.CallOption) (*v1.CreateManagementUserReply, error)
  61. // 系统端获取超级管理员账户列表
  62. ManagementSuperUserList(ctx context.Context, in *v1.ManagementSuperUserListRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserListReply, error)
  63. // 系统端更新超级管理员用户信息
  64. ManagementSuperUserUpdate(ctx context.Context, in *v1.ManagementSuperUserUpdateRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserUpdateReply, error)
  65. // 系统端重置超级管理员密码
  66. ManagementSuperUserResetPassword(ctx context.Context, in *v1.ManagementSuperUserResetPasswordRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserResetPasswordReply, error)
  67. }
  68. type organizationClient struct {
  69. cc grpc.ClientConnInterface
  70. }
  71. func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient {
  72. return &organizationClient{cc}
  73. }
  74. func (c *organizationClient) InitOrganizationDb(ctx context.Context, in *v1.InitOrganizationDbRequest, opts ...grpc.CallOption) (*v1.InitOrganizationDbReply, error) {
  75. out := new(v1.InitOrganizationDbReply)
  76. err := c.cc.Invoke(ctx, "/pb.service.Organization/InitOrganizationDb", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *organizationClient) CreateManagementUser(ctx context.Context, in *v1.CreateManagementUserRequest, opts ...grpc.CallOption) (*v1.CreateManagementUserReply, error) {
  83. out := new(v1.CreateManagementUserReply)
  84. err := c.cc.Invoke(ctx, "/pb.service.Organization/CreateManagementUser", in, out, opts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. func (c *organizationClient) ManagementSuperUserList(ctx context.Context, in *v1.ManagementSuperUserListRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserListReply, error) {
  91. out := new(v1.ManagementSuperUserListReply)
  92. err := c.cc.Invoke(ctx, "/pb.service.Organization/ManagementSuperUserList", in, out, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return out, nil
  97. }
  98. func (c *organizationClient) ManagementSuperUserUpdate(ctx context.Context, in *v1.ManagementSuperUserUpdateRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserUpdateReply, error) {
  99. out := new(v1.ManagementSuperUserUpdateReply)
  100. err := c.cc.Invoke(ctx, "/pb.service.Organization/ManagementSuperUserUpdate", in, out, opts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. func (c *organizationClient) ManagementSuperUserResetPassword(ctx context.Context, in *v1.ManagementSuperUserResetPasswordRequest, opts ...grpc.CallOption) (*v1.ManagementSuperUserResetPasswordReply, error) {
  107. out := new(v1.ManagementSuperUserResetPasswordReply)
  108. err := c.cc.Invoke(ctx, "/pb.service.Organization/ManagementSuperUserResetPassword", in, out, opts...)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return out, nil
  113. }
  114. // OrganizationServer is the server API for Organization service.
  115. type OrganizationServer interface {
  116. // 初始化数据库
  117. InitOrganizationDb(context.Context, *v1.InitOrganizationDbRequest) (*v1.InitOrganizationDbReply, error)
  118. // 创建机构账号
  119. CreateManagementUser(context.Context, *v1.CreateManagementUserRequest) (*v1.CreateManagementUserReply, error)
  120. // 系统端获取超级管理员账户列表
  121. ManagementSuperUserList(context.Context, *v1.ManagementSuperUserListRequest) (*v1.ManagementSuperUserListReply, error)
  122. // 系统端更新超级管理员用户信息
  123. ManagementSuperUserUpdate(context.Context, *v1.ManagementSuperUserUpdateRequest) (*v1.ManagementSuperUserUpdateReply, error)
  124. // 系统端重置超级管理员密码
  125. ManagementSuperUserResetPassword(context.Context, *v1.ManagementSuperUserResetPasswordRequest) (*v1.ManagementSuperUserResetPasswordReply, error)
  126. }
  127. // UnimplementedOrganizationServer can be embedded to have forward compatible implementations.
  128. type UnimplementedOrganizationServer struct {
  129. }
  130. func (*UnimplementedOrganizationServer) InitOrganizationDb(ctx context.Context, req *v1.InitOrganizationDbRequest) (*v1.InitOrganizationDbReply, error) {
  131. return nil, status.Errorf(codes.Unimplemented, "method InitOrganizationDb not implemented")
  132. }
  133. func (*UnimplementedOrganizationServer) CreateManagementUser(ctx context.Context, req *v1.CreateManagementUserRequest) (*v1.CreateManagementUserReply, error) {
  134. return nil, status.Errorf(codes.Unimplemented, "method CreateManagementUser not implemented")
  135. }
  136. func (*UnimplementedOrganizationServer) ManagementSuperUserList(ctx context.Context, req *v1.ManagementSuperUserListRequest) (*v1.ManagementSuperUserListReply, error) {
  137. return nil, status.Errorf(codes.Unimplemented, "method ManagementSuperUserList not implemented")
  138. }
  139. func (*UnimplementedOrganizationServer) ManagementSuperUserUpdate(ctx context.Context, req *v1.ManagementSuperUserUpdateRequest) (*v1.ManagementSuperUserUpdateReply, error) {
  140. return nil, status.Errorf(codes.Unimplemented, "method ManagementSuperUserUpdate not implemented")
  141. }
  142. func (*UnimplementedOrganizationServer) ManagementSuperUserResetPassword(ctx context.Context, req *v1.ManagementSuperUserResetPasswordRequest) (*v1.ManagementSuperUserResetPasswordReply, error) {
  143. return nil, status.Errorf(codes.Unimplemented, "method ManagementSuperUserResetPassword not implemented")
  144. }
  145. func RegisterOrganizationServer(s *grpc.Server, srv OrganizationServer) {
  146. s.RegisterService(&_Organization_serviceDesc, srv)
  147. }
  148. func _Organization_InitOrganizationDb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  149. in := new(v1.InitOrganizationDbRequest)
  150. if err := dec(in); err != nil {
  151. return nil, err
  152. }
  153. if interceptor == nil {
  154. return srv.(OrganizationServer).InitOrganizationDb(ctx, in)
  155. }
  156. info := &grpc.UnaryServerInfo{
  157. Server: srv,
  158. FullMethod: "/pb.service.Organization/InitOrganizationDb",
  159. }
  160. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  161. return srv.(OrganizationServer).InitOrganizationDb(ctx, req.(*v1.InitOrganizationDbRequest))
  162. }
  163. return interceptor(ctx, in, info, handler)
  164. }
  165. func _Organization_CreateManagementUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  166. in := new(v1.CreateManagementUserRequest)
  167. if err := dec(in); err != nil {
  168. return nil, err
  169. }
  170. if interceptor == nil {
  171. return srv.(OrganizationServer).CreateManagementUser(ctx, in)
  172. }
  173. info := &grpc.UnaryServerInfo{
  174. Server: srv,
  175. FullMethod: "/pb.service.Organization/CreateManagementUser",
  176. }
  177. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  178. return srv.(OrganizationServer).CreateManagementUser(ctx, req.(*v1.CreateManagementUserRequest))
  179. }
  180. return interceptor(ctx, in, info, handler)
  181. }
  182. func _Organization_ManagementSuperUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  183. in := new(v1.ManagementSuperUserListRequest)
  184. if err := dec(in); err != nil {
  185. return nil, err
  186. }
  187. if interceptor == nil {
  188. return srv.(OrganizationServer).ManagementSuperUserList(ctx, in)
  189. }
  190. info := &grpc.UnaryServerInfo{
  191. Server: srv,
  192. FullMethod: "/pb.service.Organization/ManagementSuperUserList",
  193. }
  194. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  195. return srv.(OrganizationServer).ManagementSuperUserList(ctx, req.(*v1.ManagementSuperUserListRequest))
  196. }
  197. return interceptor(ctx, in, info, handler)
  198. }
  199. func _Organization_ManagementSuperUserUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  200. in := new(v1.ManagementSuperUserUpdateRequest)
  201. if err := dec(in); err != nil {
  202. return nil, err
  203. }
  204. if interceptor == nil {
  205. return srv.(OrganizationServer).ManagementSuperUserUpdate(ctx, in)
  206. }
  207. info := &grpc.UnaryServerInfo{
  208. Server: srv,
  209. FullMethod: "/pb.service.Organization/ManagementSuperUserUpdate",
  210. }
  211. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  212. return srv.(OrganizationServer).ManagementSuperUserUpdate(ctx, req.(*v1.ManagementSuperUserUpdateRequest))
  213. }
  214. return interceptor(ctx, in, info, handler)
  215. }
  216. func _Organization_ManagementSuperUserResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  217. in := new(v1.ManagementSuperUserResetPasswordRequest)
  218. if err := dec(in); err != nil {
  219. return nil, err
  220. }
  221. if interceptor == nil {
  222. return srv.(OrganizationServer).ManagementSuperUserResetPassword(ctx, in)
  223. }
  224. info := &grpc.UnaryServerInfo{
  225. Server: srv,
  226. FullMethod: "/pb.service.Organization/ManagementSuperUserResetPassword",
  227. }
  228. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  229. return srv.(OrganizationServer).ManagementSuperUserResetPassword(ctx, req.(*v1.ManagementSuperUserResetPasswordRequest))
  230. }
  231. return interceptor(ctx, in, info, handler)
  232. }
  233. var _Organization_serviceDesc = grpc.ServiceDesc{
  234. ServiceName: "pb.service.Organization",
  235. HandlerType: (*OrganizationServer)(nil),
  236. Methods: []grpc.MethodDesc{
  237. {
  238. MethodName: "InitOrganizationDb",
  239. Handler: _Organization_InitOrganizationDb_Handler,
  240. },
  241. {
  242. MethodName: "CreateManagementUser",
  243. Handler: _Organization_CreateManagementUser_Handler,
  244. },
  245. {
  246. MethodName: "ManagementSuperUserList",
  247. Handler: _Organization_ManagementSuperUserList_Handler,
  248. },
  249. {
  250. MethodName: "ManagementSuperUserUpdate",
  251. Handler: _Organization_ManagementSuperUserUpdate_Handler,
  252. },
  253. {
  254. MethodName: "ManagementSuperUserResetPassword",
  255. Handler: _Organization_ManagementSuperUserResetPassword_Handler,
  256. },
  257. },
  258. Streams: []grpc.StreamDesc{},
  259. Metadata: "organization_service.proto",
  260. }