1014 lines
40 KiB
Go
1014 lines
40 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v5.29.3
|
|
// source: organize.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
UserService_GetMenus_FullMethodName = "/organize.UserService/GetMenus"
|
|
UserService_GetProfile_FullMethodName = "/organize.UserService/GetProfile"
|
|
UserService_UpdateProfile_FullMethodName = "/organize.UserService/UpdateProfile"
|
|
UserService_ResetPassword_FullMethodName = "/organize.UserService/ResetPassword"
|
|
UserService_GetPermissions_FullMethodName = "/organize.UserService/GetPermissions"
|
|
UserService_GetUserLabels_FullMethodName = "/organize.UserService/GetUserLabels"
|
|
UserService_GetUserTags_FullMethodName = "/organize.UserService/GetUserTags"
|
|
)
|
|
|
|
// UserServiceClient is the client API for UserService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// 用户服务
|
|
type UserServiceClient interface {
|
|
// 获取用户菜单
|
|
GetMenus(ctx context.Context, in *GetUserMenuRequest, opts ...grpc.CallOption) (*GetUserMenuResponse, error)
|
|
// 获取用户信息
|
|
GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error)
|
|
// 更新用户信息
|
|
UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error)
|
|
// 重置用户密码
|
|
ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error)
|
|
// 获取用户权限
|
|
GetPermissions(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error)
|
|
// 获取用户标签
|
|
GetUserLabels(ctx context.Context, in *GetUserLabelRequest, opts ...grpc.CallOption) (*GetUserLabelResponse, error)
|
|
// 获取用户标签
|
|
GetUserTags(ctx context.Context, in *GetUserTagRequest, opts ...grpc.CallOption) (*GetUserTagResponse, error)
|
|
}
|
|
|
|
type userServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
|
return &userServiceClient{cc}
|
|
}
|
|
|
|
func (c *userServiceClient) GetMenus(ctx context.Context, in *GetUserMenuRequest, opts ...grpc.CallOption) (*GetUserMenuResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUserMenuResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetMenus_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetProfileResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetProfile_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UpdateProfileResponse)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateProfile_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ResetPasswordResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ResetPassword_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetPermissions(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetPermissionResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetPermissions_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserLabels(ctx context.Context, in *GetUserLabelRequest, opts ...grpc.CallOption) (*GetUserLabelResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUserLabelResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetUserLabels_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserTags(ctx context.Context, in *GetUserTagRequest, opts ...grpc.CallOption) (*GetUserTagResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUserTagResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetUserTags_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// UserServiceServer is the server API for UserService service.
|
|
// All implementations must embed UnimplementedUserServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// 用户服务
|
|
type UserServiceServer interface {
|
|
// 获取用户菜单
|
|
GetMenus(context.Context, *GetUserMenuRequest) (*GetUserMenuResponse, error)
|
|
// 获取用户信息
|
|
GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error)
|
|
// 更新用户信息
|
|
UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error)
|
|
// 重置用户密码
|
|
ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
|
|
// 获取用户权限
|
|
GetPermissions(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error)
|
|
// 获取用户标签
|
|
GetUserLabels(context.Context, *GetUserLabelRequest) (*GetUserLabelResponse, error)
|
|
// 获取用户标签
|
|
GetUserTags(context.Context, *GetUserTagRequest) (*GetUserTagResponse, error)
|
|
mustEmbedUnimplementedUserServiceServer()
|
|
}
|
|
|
|
// UnimplementedUserServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedUserServiceServer struct{}
|
|
|
|
func (UnimplementedUserServiceServer) GetMenus(context.Context, *GetUserMenuRequest) (*GetUserMenuResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMenus not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetProfile not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateProfile not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetPermissions(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPermissions not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUserLabels(context.Context, *GetUserLabelRequest) (*GetUserLabelResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserLabels not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUserTags(context.Context, *GetUserTagRequest) (*GetUserTagResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserTags not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
|
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeUserServiceServer interface {
|
|
mustEmbedUnimplementedUserServiceServer()
|
|
}
|
|
|
|
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedUserServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&UserService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _UserService_GetMenus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserMenuRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetMenus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetMenus_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetMenus(ctx, req.(*GetUserMenuRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetProfileRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetProfile(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetProfile_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetProfile(ctx, req.(*GetProfileRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateProfileRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateProfile(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateProfile_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateProfile(ctx, req.(*UpdateProfileRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ResetPasswordRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ResetPassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ResetPassword_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ResetPassword(ctx, req.(*ResetPasswordRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetPermissionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetPermissions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetPermissions_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetPermissions(ctx, req.(*GetPermissionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUserLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserLabelRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserLabels(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUserLabels_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserLabels(ctx, req.(*GetUserLabelRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUserTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserTagRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserTags(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUserTags_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserTags(ctx, req.(*GetUserTagRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var UserService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "organize.UserService",
|
|
HandlerType: (*UserServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetMenus",
|
|
Handler: _UserService_GetMenus_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetProfile",
|
|
Handler: _UserService_GetProfile_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateProfile",
|
|
Handler: _UserService_UpdateProfile_Handler,
|
|
},
|
|
{
|
|
MethodName: "ResetPassword",
|
|
Handler: _UserService_ResetPassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPermissions",
|
|
Handler: _UserService_GetPermissions_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserLabels",
|
|
Handler: _UserService_GetUserLabels_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserTags",
|
|
Handler: _UserService_GetUserTags_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "organize.proto",
|
|
}
|
|
|
|
const (
|
|
DepartmentService_GetDepartmentLabels_FullMethodName = "/organize.DepartmentService/GetDepartmentLabels"
|
|
DepartmentService_GetDepartmentUsers_FullMethodName = "/organize.DepartmentService/GetDepartmentUsers"
|
|
DepartmentService_GetDepartmentLevelLabels_FullMethodName = "/organize.DepartmentService/GetDepartmentLevelLabels"
|
|
)
|
|
|
|
// DepartmentServiceClient is the client API for DepartmentService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type DepartmentServiceClient interface {
|
|
// 获取部门标签
|
|
GetDepartmentLabels(ctx context.Context, in *GetDepartmentLabelRequest, opts ...grpc.CallOption) (*GetDepartmentLabelResponse, error)
|
|
GetDepartmentUsers(ctx context.Context, in *GetDepartmentUserRequest, opts ...grpc.CallOption) (*GetDepartmentUserResponse, error)
|
|
GetDepartmentLevelLabels(ctx context.Context, in *GetDepartmentLevelLabelsRequest, opts ...grpc.CallOption) (*GetDepartmentLevelLabelsResponse, error)
|
|
}
|
|
|
|
type departmentServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewDepartmentServiceClient(cc grpc.ClientConnInterface) DepartmentServiceClient {
|
|
return &departmentServiceClient{cc}
|
|
}
|
|
|
|
func (c *departmentServiceClient) GetDepartmentLabels(ctx context.Context, in *GetDepartmentLabelRequest, opts ...grpc.CallOption) (*GetDepartmentLabelResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetDepartmentLabelResponse)
|
|
err := c.cc.Invoke(ctx, DepartmentService_GetDepartmentLabels_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *departmentServiceClient) GetDepartmentUsers(ctx context.Context, in *GetDepartmentUserRequest, opts ...grpc.CallOption) (*GetDepartmentUserResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetDepartmentUserResponse)
|
|
err := c.cc.Invoke(ctx, DepartmentService_GetDepartmentUsers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *departmentServiceClient) GetDepartmentLevelLabels(ctx context.Context, in *GetDepartmentLevelLabelsRequest, opts ...grpc.CallOption) (*GetDepartmentLevelLabelsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetDepartmentLevelLabelsResponse)
|
|
err := c.cc.Invoke(ctx, DepartmentService_GetDepartmentLevelLabels_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// DepartmentServiceServer is the server API for DepartmentService service.
|
|
// All implementations must embed UnimplementedDepartmentServiceServer
|
|
// for forward compatibility.
|
|
type DepartmentServiceServer interface {
|
|
// 获取部门标签
|
|
GetDepartmentLabels(context.Context, *GetDepartmentLabelRequest) (*GetDepartmentLabelResponse, error)
|
|
GetDepartmentUsers(context.Context, *GetDepartmentUserRequest) (*GetDepartmentUserResponse, error)
|
|
GetDepartmentLevelLabels(context.Context, *GetDepartmentLevelLabelsRequest) (*GetDepartmentLevelLabelsResponse, error)
|
|
mustEmbedUnimplementedDepartmentServiceServer()
|
|
}
|
|
|
|
// UnimplementedDepartmentServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedDepartmentServiceServer struct{}
|
|
|
|
func (UnimplementedDepartmentServiceServer) GetDepartmentLabels(context.Context, *GetDepartmentLabelRequest) (*GetDepartmentLabelResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetDepartmentLabels not implemented")
|
|
}
|
|
func (UnimplementedDepartmentServiceServer) GetDepartmentUsers(context.Context, *GetDepartmentUserRequest) (*GetDepartmentUserResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetDepartmentUsers not implemented")
|
|
}
|
|
func (UnimplementedDepartmentServiceServer) GetDepartmentLevelLabels(context.Context, *GetDepartmentLevelLabelsRequest) (*GetDepartmentLevelLabelsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetDepartmentLevelLabels not implemented")
|
|
}
|
|
func (UnimplementedDepartmentServiceServer) mustEmbedUnimplementedDepartmentServiceServer() {}
|
|
func (UnimplementedDepartmentServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeDepartmentServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to DepartmentServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeDepartmentServiceServer interface {
|
|
mustEmbedUnimplementedDepartmentServiceServer()
|
|
}
|
|
|
|
func RegisterDepartmentServiceServer(s grpc.ServiceRegistrar, srv DepartmentServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedDepartmentServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&DepartmentService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _DepartmentService_GetDepartmentLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetDepartmentLabelRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepartmentServiceServer).GetDepartmentLabels(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: DepartmentService_GetDepartmentLabels_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepartmentServiceServer).GetDepartmentLabels(ctx, req.(*GetDepartmentLabelRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _DepartmentService_GetDepartmentUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetDepartmentUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepartmentServiceServer).GetDepartmentUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: DepartmentService_GetDepartmentUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepartmentServiceServer).GetDepartmentUsers(ctx, req.(*GetDepartmentUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _DepartmentService_GetDepartmentLevelLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetDepartmentLevelLabelsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepartmentServiceServer).GetDepartmentLevelLabels(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: DepartmentService_GetDepartmentLevelLabels_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepartmentServiceServer).GetDepartmentLevelLabels(ctx, req.(*GetDepartmentLevelLabelsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// DepartmentService_ServiceDesc is the grpc.ServiceDesc for DepartmentService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var DepartmentService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "organize.DepartmentService",
|
|
HandlerType: (*DepartmentServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetDepartmentLabels",
|
|
Handler: _DepartmentService_GetDepartmentLabels_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetDepartmentUsers",
|
|
Handler: _DepartmentService_GetDepartmentUsers_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetDepartmentLevelLabels",
|
|
Handler: _DepartmentService_GetDepartmentLevelLabels_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "organize.proto",
|
|
}
|
|
|
|
const (
|
|
RoleService_GetRoleLabels_FullMethodName = "/organize.RoleService/GetRoleLabels"
|
|
RoleService_GetRolePermissions_FullMethodName = "/organize.RoleService/GetRolePermissions"
|
|
RoleService_SaveRolePermission_FullMethodName = "/organize.RoleService/SaveRolePermission"
|
|
)
|
|
|
|
// RoleServiceClient is the client API for RoleService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type RoleServiceClient interface {
|
|
// 获取角色标签
|
|
GetRoleLabels(ctx context.Context, in *GetRoleLabelRequest, opts ...grpc.CallOption) (*GetRoleLabelResponse, error)
|
|
// 获取角色权限
|
|
GetRolePermissions(ctx context.Context, in *GetRolePermissionRequest, opts ...grpc.CallOption) (*GetRolePermissionResponse, error)
|
|
SaveRolePermission(ctx context.Context, in *SaveRolePermissionRequest, opts ...grpc.CallOption) (*SaveRolePermissionResponse, error)
|
|
}
|
|
|
|
type roleServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
|
|
return &roleServiceClient{cc}
|
|
}
|
|
|
|
func (c *roleServiceClient) GetRoleLabels(ctx context.Context, in *GetRoleLabelRequest, opts ...grpc.CallOption) (*GetRoleLabelResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetRoleLabelResponse)
|
|
err := c.cc.Invoke(ctx, RoleService_GetRoleLabels_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *roleServiceClient) GetRolePermissions(ctx context.Context, in *GetRolePermissionRequest, opts ...grpc.CallOption) (*GetRolePermissionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetRolePermissionResponse)
|
|
err := c.cc.Invoke(ctx, RoleService_GetRolePermissions_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *roleServiceClient) SaveRolePermission(ctx context.Context, in *SaveRolePermissionRequest, opts ...grpc.CallOption) (*SaveRolePermissionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SaveRolePermissionResponse)
|
|
err := c.cc.Invoke(ctx, RoleService_SaveRolePermission_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// RoleServiceServer is the server API for RoleService service.
|
|
// All implementations must embed UnimplementedRoleServiceServer
|
|
// for forward compatibility.
|
|
type RoleServiceServer interface {
|
|
// 获取角色标签
|
|
GetRoleLabels(context.Context, *GetRoleLabelRequest) (*GetRoleLabelResponse, error)
|
|
// 获取角色权限
|
|
GetRolePermissions(context.Context, *GetRolePermissionRequest) (*GetRolePermissionResponse, error)
|
|
SaveRolePermission(context.Context, *SaveRolePermissionRequest) (*SaveRolePermissionResponse, error)
|
|
mustEmbedUnimplementedRoleServiceServer()
|
|
}
|
|
|
|
// UnimplementedRoleServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedRoleServiceServer struct{}
|
|
|
|
func (UnimplementedRoleServiceServer) GetRoleLabels(context.Context, *GetRoleLabelRequest) (*GetRoleLabelResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRoleLabels not implemented")
|
|
}
|
|
func (UnimplementedRoleServiceServer) GetRolePermissions(context.Context, *GetRolePermissionRequest) (*GetRolePermissionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRolePermissions not implemented")
|
|
}
|
|
func (UnimplementedRoleServiceServer) SaveRolePermission(context.Context, *SaveRolePermissionRequest) (*SaveRolePermissionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SaveRolePermission not implemented")
|
|
}
|
|
func (UnimplementedRoleServiceServer) mustEmbedUnimplementedRoleServiceServer() {}
|
|
func (UnimplementedRoleServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to RoleServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeRoleServiceServer interface {
|
|
mustEmbedUnimplementedRoleServiceServer()
|
|
}
|
|
|
|
func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedRoleServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&RoleService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _RoleService_GetRoleLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRoleLabelRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RoleServiceServer).GetRoleLabels(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: RoleService_GetRoleLabels_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RoleServiceServer).GetRoleLabels(ctx, req.(*GetRoleLabelRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RoleService_GetRolePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRolePermissionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RoleServiceServer).GetRolePermissions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: RoleService_GetRolePermissions_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RoleServiceServer).GetRolePermissions(ctx, req.(*GetRolePermissionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RoleService_SaveRolePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SaveRolePermissionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RoleServiceServer).SaveRolePermission(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: RoleService_SaveRolePermission_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RoleServiceServer).SaveRolePermission(ctx, req.(*SaveRolePermissionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var RoleService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "organize.RoleService",
|
|
HandlerType: (*RoleServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetRoleLabels",
|
|
Handler: _RoleService_GetRoleLabels_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetRolePermissions",
|
|
Handler: _RoleService_GetRolePermissions_Handler,
|
|
},
|
|
{
|
|
MethodName: "SaveRolePermission",
|
|
Handler: _RoleService_SaveRolePermission_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "organize.proto",
|
|
}
|
|
|
|
const (
|
|
MenuService_GetMenus_FullMethodName = "/organize.MenuService/GetMenus"
|
|
MenuService_GetMenuLevelLabels_FullMethodName = "/organize.MenuService/GetMenuLevelLabels"
|
|
)
|
|
|
|
// MenuServiceClient is the client API for MenuService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type MenuServiceClient interface {
|
|
GetMenus(ctx context.Context, in *GetMenuRequest, opts ...grpc.CallOption) (*GetMenuResponse, error)
|
|
GetMenuLevelLabels(ctx context.Context, in *GetMenuLevelLabelsRequest, opts ...grpc.CallOption) (*GetMenuLevelLabelsResponse, error)
|
|
}
|
|
|
|
type menuServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMenuServiceClient(cc grpc.ClientConnInterface) MenuServiceClient {
|
|
return &menuServiceClient{cc}
|
|
}
|
|
|
|
func (c *menuServiceClient) GetMenus(ctx context.Context, in *GetMenuRequest, opts ...grpc.CallOption) (*GetMenuResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetMenuResponse)
|
|
err := c.cc.Invoke(ctx, MenuService_GetMenus_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *menuServiceClient) GetMenuLevelLabels(ctx context.Context, in *GetMenuLevelLabelsRequest, opts ...grpc.CallOption) (*GetMenuLevelLabelsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetMenuLevelLabelsResponse)
|
|
err := c.cc.Invoke(ctx, MenuService_GetMenuLevelLabels_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MenuServiceServer is the server API for MenuService service.
|
|
// All implementations must embed UnimplementedMenuServiceServer
|
|
// for forward compatibility.
|
|
type MenuServiceServer interface {
|
|
GetMenus(context.Context, *GetMenuRequest) (*GetMenuResponse, error)
|
|
GetMenuLevelLabels(context.Context, *GetMenuLevelLabelsRequest) (*GetMenuLevelLabelsResponse, error)
|
|
mustEmbedUnimplementedMenuServiceServer()
|
|
}
|
|
|
|
// UnimplementedMenuServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedMenuServiceServer struct{}
|
|
|
|
func (UnimplementedMenuServiceServer) GetMenus(context.Context, *GetMenuRequest) (*GetMenuResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMenus not implemented")
|
|
}
|
|
func (UnimplementedMenuServiceServer) GetMenuLevelLabels(context.Context, *GetMenuLevelLabelsRequest) (*GetMenuLevelLabelsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMenuLevelLabels not implemented")
|
|
}
|
|
func (UnimplementedMenuServiceServer) mustEmbedUnimplementedMenuServiceServer() {}
|
|
func (UnimplementedMenuServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeMenuServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to MenuServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeMenuServiceServer interface {
|
|
mustEmbedUnimplementedMenuServiceServer()
|
|
}
|
|
|
|
func RegisterMenuServiceServer(s grpc.ServiceRegistrar, srv MenuServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedMenuServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&MenuService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _MenuService_GetMenus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMenuRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MenuServiceServer).GetMenus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MenuService_GetMenus_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MenuServiceServer).GetMenus(ctx, req.(*GetMenuRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _MenuService_GetMenuLevelLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMenuLevelLabelsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MenuServiceServer).GetMenuLevelLabels(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MenuService_GetMenuLevelLabels_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MenuServiceServer).GetMenuLevelLabels(ctx, req.(*GetMenuLevelLabelsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// MenuService_ServiceDesc is the grpc.ServiceDesc for MenuService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var MenuService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "organize.MenuService",
|
|
HandlerType: (*MenuServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetMenus",
|
|
Handler: _MenuService_GetMenus_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetMenuLevelLabels",
|
|
Handler: _MenuService_GetMenuLevelLabels_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "organize.proto",
|
|
}
|
|
|
|
const (
|
|
AuthService_Login_FullMethodName = "/organize.AuthService/Login"
|
|
AuthService_Logout_FullMethodName = "/organize.AuthService/Logout"
|
|
)
|
|
|
|
// AuthServiceClient is the client API for AuthService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// 授权服务
|
|
type AuthServiceClient interface {
|
|
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
|
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
|
}
|
|
|
|
type authServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
|
|
return &authServiceClient{cc}
|
|
}
|
|
|
|
func (c *authServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LoginResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_Login_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LogoutResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_Logout_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthServiceServer is the server API for AuthService service.
|
|
// All implementations must embed UnimplementedAuthServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// 授权服务
|
|
type AuthServiceServer interface {
|
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
|
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
|
mustEmbedUnimplementedAuthServiceServer()
|
|
}
|
|
|
|
// UnimplementedAuthServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedAuthServiceServer struct{}
|
|
|
|
func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
|
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AuthServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeAuthServiceServer interface {
|
|
mustEmbedUnimplementedAuthServiceServer()
|
|
}
|
|
|
|
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedAuthServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&AuthService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _AuthService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Login(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_Login_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Login(ctx, req.(*LoginRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LogoutRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Logout(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_Logout_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Logout(ctx, req.(*LogoutRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "organize.AuthService",
|
|
HandlerType: (*AuthServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Login",
|
|
Handler: _AuthService_Login_Handler,
|
|
},
|
|
{
|
|
MethodName: "Logout",
|
|
Handler: _AuthService_Logout_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "organize.proto",
|
|
}
|