Documentation
¶
Overview ¶
Package appv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package appv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package appv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package appv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
- func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- func RegisterPermissionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPermissionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionServiceClient) error
- func RegisterPermissionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPermissionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServiceServer) error
- func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer)
- func RegisterRoleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleServiceClient) error
- func RegisterRoleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServiceServer) error
- func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer)
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type CreatePermissionReq
- func (*CreatePermissionReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePermissionReq) GetCode() string
- func (x *CreatePermissionReq) GetName() string
- func (msg *CreatePermissionReq) MarshalJSON() ([]byte, error)
- func (*CreatePermissionReq) ProtoMessage()
- func (x *CreatePermissionReq) ProtoReflect() protoreflect.Message
- func (x *CreatePermissionReq) Reset()
- func (x *CreatePermissionReq) String() string
- func (msg *CreatePermissionReq) UnmarshalJSON(b []byte) error
- type CreateRoleReq
- func (*CreateRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRoleReq) GetCode() string
- func (x *CreateRoleReq) GetName() string
- func (msg *CreateRoleReq) MarshalJSON() ([]byte, error)
- func (*CreateRoleReq) ProtoMessage()
- func (x *CreateRoleReq) ProtoReflect() protoreflect.Message
- func (x *CreateRoleReq) Reset()
- func (x *CreateRoleReq) String() string
- func (msg *CreateRoleReq) UnmarshalJSON(b []byte) error
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReq) GetEmail() string
- func (x *CreateUserReq) GetEnabled() bool
- func (x *CreateUserReq) GetPassword() string
- func (x *CreateUserReq) GetUsername() string
- func (msg *CreateUserReq) MarshalJSON() ([]byte, error)
- func (*CreateUserReq) ProtoMessage()
- func (x *CreateUserReq) ProtoReflect() protoreflect.Message
- func (x *CreateUserReq) Reset()
- func (x *CreateUserReq) String() string
- func (msg *CreateUserReq) UnmarshalJSON(b []byte) error
- type DeletePermissionReq
- func (*DeletePermissionReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeletePermissionReq) GetId() string
- func (msg *DeletePermissionReq) MarshalJSON() ([]byte, error)
- func (*DeletePermissionReq) ProtoMessage()
- func (x *DeletePermissionReq) ProtoReflect() protoreflect.Message
- func (x *DeletePermissionReq) Reset()
- func (x *DeletePermissionReq) String() string
- func (msg *DeletePermissionReq) UnmarshalJSON(b []byte) error
- type DeleteRoleReq
- func (*DeleteRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRoleReq) GetId() string
- func (msg *DeleteRoleReq) MarshalJSON() ([]byte, error)
- func (*DeleteRoleReq) ProtoMessage()
- func (x *DeleteRoleReq) ProtoReflect() protoreflect.Message
- func (x *DeleteRoleReq) Reset()
- func (x *DeleteRoleReq) String() string
- func (msg *DeleteRoleReq) UnmarshalJSON(b []byte) error
- type DeleteUserReq
- func (*DeleteUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserReq) GetId() string
- func (msg *DeleteUserReq) MarshalJSON() ([]byte, error)
- func (*DeleteUserReq) ProtoMessage()
- func (x *DeleteUserReq) ProtoReflect() protoreflect.Message
- func (x *DeleteUserReq) Reset()
- func (x *DeleteUserReq) String() string
- func (msg *DeleteUserReq) UnmarshalJSON(b []byte) error
- type GetPermissionReq
- func (*GetPermissionReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetPermissionReq) GetId() string
- func (msg *GetPermissionReq) MarshalJSON() ([]byte, error)
- func (*GetPermissionReq) ProtoMessage()
- func (x *GetPermissionReq) ProtoReflect() protoreflect.Message
- func (x *GetPermissionReq) Reset()
- func (x *GetPermissionReq) String() string
- func (msg *GetPermissionReq) UnmarshalJSON(b []byte) error
- type GetRoleReq
- func (*GetRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetRoleReq) GetId() string
- func (msg *GetRoleReq) MarshalJSON() ([]byte, error)
- func (*GetRoleReq) ProtoMessage()
- func (x *GetRoleReq) ProtoReflect() protoreflect.Message
- func (x *GetRoleReq) Reset()
- func (x *GetRoleReq) String() string
- func (msg *GetRoleReq) UnmarshalJSON(b []byte) error
- type GetUserReq
- func (*GetUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserReq) GetId() string
- func (msg *GetUserReq) MarshalJSON() ([]byte, error)
- func (*GetUserReq) ProtoMessage()
- func (x *GetUserReq) ProtoReflect() protoreflect.Message
- func (x *GetUserReq) Reset()
- func (x *GetUserReq) String() string
- func (msg *GetUserReq) UnmarshalJSON(b []byte) error
- type ListPermissionReq
- func (*ListPermissionReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListPermissionReq) GetPaging() *common.Paging
- func (msg *ListPermissionReq) MarshalJSON() ([]byte, error)
- func (*ListPermissionReq) ProtoMessage()
- func (x *ListPermissionReq) ProtoReflect() protoreflect.Message
- func (x *ListPermissionReq) Reset()
- func (x *ListPermissionReq) String() string
- func (msg *ListPermissionReq) UnmarshalJSON(b []byte) error
- type ListPermissionResp
- func (*ListPermissionResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListPermissionResp) GetPaging() *common.Paging
- func (x *ListPermissionResp) GetRecords() []*Permission
- func (msg *ListPermissionResp) MarshalJSON() ([]byte, error)
- func (*ListPermissionResp) ProtoMessage()
- func (x *ListPermissionResp) ProtoReflect() protoreflect.Message
- func (x *ListPermissionResp) Reset()
- func (x *ListPermissionResp) String() string
- func (msg *ListPermissionResp) UnmarshalJSON(b []byte) error
- type ListRoleReq
- func (*ListRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListRoleReq) GetPaging() *common.Paging
- func (msg *ListRoleReq) MarshalJSON() ([]byte, error)
- func (*ListRoleReq) ProtoMessage()
- func (x *ListRoleReq) ProtoReflect() protoreflect.Message
- func (x *ListRoleReq) Reset()
- func (x *ListRoleReq) String() string
- func (msg *ListRoleReq) UnmarshalJSON(b []byte) error
- type ListRoleResp
- func (*ListRoleResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListRoleResp) GetPaging() *common.Paging
- func (x *ListRoleResp) GetRecords() []*Role
- func (msg *ListRoleResp) MarshalJSON() ([]byte, error)
- func (*ListRoleResp) ProtoMessage()
- func (x *ListRoleResp) ProtoReflect() protoreflect.Message
- func (x *ListRoleResp) Reset()
- func (x *ListRoleResp) String() string
- func (msg *ListRoleResp) UnmarshalJSON(b []byte) error
- type ListUserReq
- func (*ListUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserReq) GetPaging() *common.Paging
- func (msg *ListUserReq) MarshalJSON() ([]byte, error)
- func (*ListUserReq) ProtoMessage()
- func (x *ListUserReq) ProtoReflect() protoreflect.Message
- func (x *ListUserReq) Reset()
- func (x *ListUserReq) String() string
- func (msg *ListUserReq) UnmarshalJSON(b []byte) error
- type ListUserResp
- func (*ListUserResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResp) GetPaging() *common.Paging
- func (x *ListUserResp) GetRecords() []*User
- func (msg *ListUserResp) MarshalJSON() ([]byte, error)
- func (*ListUserResp) ProtoMessage()
- func (x *ListUserResp) ProtoReflect() protoreflect.Message
- func (x *ListUserResp) Reset()
- func (x *ListUserResp) String() string
- func (msg *ListUserResp) UnmarshalJSON(b []byte) error
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetPassword() string
- func (x *LoginReq) GetUsername() string
- func (msg *LoginReq) MarshalJSON() ([]byte, error)
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- func (msg *LoginReq) UnmarshalJSON(b []byte) error
- type LoginResp
- func (*LoginResp) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResp) GetAccessToken() string
- func (x *LoginResp) GetExpiresAt() int64
- func (msg *LoginResp) MarshalJSON() ([]byte, error)
- func (*LoginResp) ProtoMessage()
- func (x *LoginResp) ProtoReflect() protoreflect.Message
- func (x *LoginResp) Reset()
- func (x *LoginResp) String() string
- func (msg *LoginResp) UnmarshalJSON(b []byte) error
- type Permission
- func (*Permission) Descriptor() ([]byte, []int)deprecated
- func (x *Permission) GetCode() string
- func (x *Permission) GetId() string
- func (x *Permission) GetMetadata() *common.Metadata
- func (x *Permission) GetName() string
- func (msg *Permission) MarshalJSON() ([]byte, error)
- func (*Permission) ProtoMessage()
- func (x *Permission) ProtoReflect() protoreflect.Message
- func (x *Permission) Reset()
- func (x *Permission) String() string
- func (msg *Permission) UnmarshalJSON(b []byte) error
- type PermissionServiceClient
- type PermissionServiceServer
- type Role
- func (*Role) Descriptor() ([]byte, []int)deprecated
- func (x *Role) GetCode() string
- func (x *Role) GetId() string
- func (x *Role) GetMetadata() *common.Metadata
- func (x *Role) GetName() string
- func (x *Role) GetPermissionIds() []string
- func (msg *Role) MarshalJSON() ([]byte, error)
- func (*Role) ProtoMessage()
- func (x *Role) ProtoReflect() protoreflect.Message
- func (x *Role) Reset()
- func (x *Role) String() string
- func (msg *Role) UnmarshalJSON(b []byte) error
- type RoleServiceClient
- type RoleServiceServer
- type SetRolePermissionsReq
- func (*SetRolePermissionsReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetRolePermissionsReq) GetId() string
- func (x *SetRolePermissionsReq) GetPermissionIds() []string
- func (msg *SetRolePermissionsReq) MarshalJSON() ([]byte, error)
- func (*SetRolePermissionsReq) ProtoMessage()
- func (x *SetRolePermissionsReq) ProtoReflect() protoreflect.Message
- func (x *SetRolePermissionsReq) Reset()
- func (x *SetRolePermissionsReq) String() string
- func (msg *SetRolePermissionsReq) UnmarshalJSON(b []byte) error
- type SetUserRolesReq
- func (*SetUserRolesReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserRolesReq) GetId() string
- func (x *SetUserRolesReq) GetRoleIds() []string
- func (msg *SetUserRolesReq) MarshalJSON() ([]byte, error)
- func (*SetUserRolesReq) ProtoMessage()
- func (x *SetUserRolesReq) ProtoReflect() protoreflect.Message
- func (x *SetUserRolesReq) Reset()
- func (x *SetUserRolesReq) String() string
- func (msg *SetUserRolesReq) UnmarshalJSON(b []byte) error
- type UnimplementedAuthServiceServer
- type UnimplementedPermissionServiceServer
- func (UnimplementedPermissionServiceServer) Create(context.Context, *CreatePermissionReq) (*Permission, error)
- func (UnimplementedPermissionServiceServer) Delete(context.Context, *DeletePermissionReq) (*common.Empty, error)
- func (UnimplementedPermissionServiceServer) Get(context.Context, *GetPermissionReq) (*Permission, error)
- func (UnimplementedPermissionServiceServer) List(context.Context, *ListPermissionReq) (*ListPermissionResp, error)
- func (UnimplementedPermissionServiceServer) Update(context.Context, *UpdatePermissionReq) (*Permission, error)
- type UnimplementedRoleServiceServer
- func (UnimplementedRoleServiceServer) Create(context.Context, *CreateRoleReq) (*Role, error)
- func (UnimplementedRoleServiceServer) Delete(context.Context, *DeleteRoleReq) (*common.Empty, error)
- func (UnimplementedRoleServiceServer) Get(context.Context, *GetRoleReq) (*Role, error)
- func (UnimplementedRoleServiceServer) List(context.Context, *ListRoleReq) (*ListRoleResp, error)
- func (UnimplementedRoleServiceServer) SetPermissions(context.Context, *SetRolePermissionsReq) (*common.Empty, error)
- func (UnimplementedRoleServiceServer) Update(context.Context, *UpdateRoleReq) (*Role, error)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserReq) (*User, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserReq) (*common.Empty, error)
- func (UnimplementedUserServiceServer) Get(context.Context, *GetUserReq) (*User, error)
- func (UnimplementedUserServiceServer) List(context.Context, *ListUserReq) (*ListUserResp, error)
- func (UnimplementedUserServiceServer) SetRoles(context.Context, *SetUserRolesReq) (*common.Empty, error)
- func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserReq) (*User, error)
- type UnsafeAuthServiceServer
- type UnsafePermissionServiceServer
- type UnsafeRoleServiceServer
- type UnsafeUserServiceServer
- type UpdatePermissionReq
- func (*UpdatePermissionReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePermissionReq) GetId() string
- func (x *UpdatePermissionReq) GetName() string
- func (msg *UpdatePermissionReq) MarshalJSON() ([]byte, error)
- func (*UpdatePermissionReq) ProtoMessage()
- func (x *UpdatePermissionReq) ProtoReflect() protoreflect.Message
- func (x *UpdatePermissionReq) Reset()
- func (x *UpdatePermissionReq) String() string
- func (msg *UpdatePermissionReq) UnmarshalJSON(b []byte) error
- type UpdateRoleReq
- func (*UpdateRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRoleReq) GetId() string
- func (x *UpdateRoleReq) GetName() string
- func (msg *UpdateRoleReq) MarshalJSON() ([]byte, error)
- func (*UpdateRoleReq) ProtoMessage()
- func (x *UpdateRoleReq) ProtoReflect() protoreflect.Message
- func (x *UpdateRoleReq) Reset()
- func (x *UpdateRoleReq) String() string
- func (msg *UpdateRoleReq) UnmarshalJSON(b []byte) error
- type UpdateUserReq
- func (*UpdateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserReq) GetEmail() string
- func (x *UpdateUserReq) GetEnabled() bool
- func (x *UpdateUserReq) GetId() string
- func (msg *UpdateUserReq) MarshalJSON() ([]byte, error)
- func (*UpdateUserReq) ProtoMessage()
- func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
- func (x *UpdateUserReq) Reset()
- func (x *UpdateUserReq) String() string
- func (msg *UpdateUserReq) UnmarshalJSON(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatarFileId() string
- func (x *User) GetEmail() string
- func (x *User) GetEnabled() bool
- func (x *User) GetId() string
- func (x *User) GetMetadata() *common.Metadata
- func (x *User) GetRoleIds() []string
- func (x *User) GetUsername() string
- func (msg *User) MarshalJSON() ([]byte, error)
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (msg *User) UnmarshalJSON(b []byte) error
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( PermissionService_Create_FullMethodName = "/app.v1.PermissionService/Create" PermissionService_Get_FullMethodName = "/app.v1.PermissionService/Get" PermissionService_List_FullMethodName = "/app.v1.PermissionService/List" PermissionService_Update_FullMethodName = "/app.v1.PermissionService/Update" PermissionService_Delete_FullMethodName = "/app.v1.PermissionService/Delete" )
const ( RoleService_Create_FullMethodName = "/app.v1.RoleService/Create" RoleService_Get_FullMethodName = "/app.v1.RoleService/Get" RoleService_List_FullMethodName = "/app.v1.RoleService/List" RoleService_Update_FullMethodName = "/app.v1.RoleService/Update" RoleService_Delete_FullMethodName = "/app.v1.RoleService/Delete" RoleService_SetPermissions_FullMethodName = "/app.v1.RoleService/SetPermissions" )
const ( UserService_Create_FullMethodName = "/app.v1.UserService/Create" UserService_Get_FullMethodName = "/app.v1.UserService/Get" UserService_List_FullMethodName = "/app.v1.UserService/List" UserService_Update_FullMethodName = "/app.v1.UserService/Update" UserService_Delete_FullMethodName = "/app.v1.UserService/Delete" UserService_SetRoles_FullMethodName = "/app.v1.UserService/SetRoles" )
const (
AuthService_Login_FullMethodName = "/app.v1.AuthService/Login"
)
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "app.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _AuthService_Login_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "app/v1/auth.proto", }
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 File_app_v1_auth_proto protoreflect.FileDescriptor
var File_app_v1_permission_proto protoreflect.FileDescriptor
var File_app_v1_role_proto protoreflect.FileDescriptor
var File_app_v1_user_proto protoreflect.FileDescriptor
var PermissionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "app.v1.PermissionService", HandlerType: (*PermissionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _PermissionService_Create_Handler, }, { MethodName: "Get", Handler: _PermissionService_Get_Handler, }, { MethodName: "List", Handler: _PermissionService_List_Handler, }, { MethodName: "Update", Handler: _PermissionService_Update_Handler, }, { MethodName: "Delete", Handler: _PermissionService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "app/v1/permission.proto", }
PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService 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: "app.v1.RoleService", HandlerType: (*RoleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _RoleService_Create_Handler, }, { MethodName: "Get", Handler: _RoleService_Get_Handler, }, { MethodName: "List", Handler: _RoleService_List_Handler, }, { MethodName: "Update", Handler: _RoleService_Update_Handler, }, { MethodName: "Delete", Handler: _RoleService_Delete_Handler, }, { MethodName: "SetPermissions", Handler: _RoleService_SetPermissions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "app/v1/role.proto", }
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 UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "app.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, { MethodName: "List", Handler: _UserService_List_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "SetRoles", Handler: _UserService_SetRoles_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "app/v1/user.proto", }
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)
Functions ¶
func RegisterAuthServiceHandler ¶
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandlerClient ¶
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthServiceHandlerFromEndpoint ¶
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerServer ¶
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
func RegisterPermissionServiceHandler ¶
func RegisterPermissionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPermissionServiceHandler registers the http handlers for service PermissionService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPermissionServiceHandlerClient ¶
func RegisterPermissionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionServiceClient) error
RegisterPermissionServiceHandlerClient registers the http handlers for service PermissionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PermissionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PermissionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PermissionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterPermissionServiceHandlerFromEndpoint ¶
func RegisterPermissionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPermissionServiceHandlerFromEndpoint is same as RegisterPermissionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPermissionServiceHandlerServer ¶
func RegisterPermissionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServiceServer) error
RegisterPermissionServiceHandlerServer registers the http handlers for service PermissionService to "mux". UnaryRPC :call PermissionServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPermissionServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterPermissionServiceServer ¶
func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer)
func RegisterRoleServiceHandler ¶
func RegisterRoleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRoleServiceHandler registers the http handlers for service RoleService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRoleServiceHandlerClient ¶
func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleServiceClient) error
RegisterRoleServiceHandlerClient registers the http handlers for service RoleService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RoleServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RoleServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RoleServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterRoleServiceHandlerFromEndpoint ¶
func RegisterRoleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRoleServiceHandlerFromEndpoint is same as RegisterRoleServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRoleServiceHandlerServer ¶
func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServiceServer) error
RegisterRoleServiceHandlerServer registers the http handlers for service RoleService to "mux". UnaryRPC :call RoleServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoleServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterRoleServiceServer ¶
func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer)
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
// Login 校验用户名和密码并签发访问令牌。
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
}
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.
AuthService 提供用户身份认证能力。
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface {
// Login 校验用户名和密码并签发访问令牌。
Login(context.Context, *LoginReq) (*LoginResp, error)
// contains filtered or unexported methods
}
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
AuthService 提供用户身份认证能力。
type CreatePermissionReq ¶
type CreatePermissionReq struct {
// code 是权限检查使用的唯一编码。
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
// name 是权限显示名称。
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
CreatePermissionReq 是创建权限请求。
func (*CreatePermissionReq) Descriptor
deprecated
func (*CreatePermissionReq) Descriptor() ([]byte, []int)
Deprecated: Use CreatePermissionReq.ProtoReflect.Descriptor instead.
func (*CreatePermissionReq) GetCode ¶
func (x *CreatePermissionReq) GetCode() string
func (*CreatePermissionReq) GetName ¶
func (x *CreatePermissionReq) GetName() string
func (*CreatePermissionReq) MarshalJSON ¶
func (msg *CreatePermissionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*CreatePermissionReq) ProtoMessage ¶
func (*CreatePermissionReq) ProtoMessage()
func (*CreatePermissionReq) ProtoReflect ¶
func (x *CreatePermissionReq) ProtoReflect() protoreflect.Message
func (*CreatePermissionReq) Reset ¶
func (x *CreatePermissionReq) Reset()
func (*CreatePermissionReq) String ¶
func (x *CreatePermissionReq) String() string
func (*CreatePermissionReq) UnmarshalJSON ¶
func (msg *CreatePermissionReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type CreateRoleReq ¶
type CreateRoleReq struct {
// code 是角色的唯一编码。
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
// name 是角色显示名称。
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
CreateRoleReq 是角色创建请求。
func (*CreateRoleReq) Descriptor
deprecated
func (*CreateRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateRoleReq.ProtoReflect.Descriptor instead.
func (*CreateRoleReq) GetCode ¶
func (x *CreateRoleReq) GetCode() string
func (*CreateRoleReq) GetName ¶
func (x *CreateRoleReq) GetName() string
func (*CreateRoleReq) MarshalJSON ¶
func (msg *CreateRoleReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*CreateRoleReq) ProtoMessage ¶
func (*CreateRoleReq) ProtoMessage()
func (*CreateRoleReq) ProtoReflect ¶
func (x *CreateRoleReq) ProtoReflect() protoreflect.Message
func (*CreateRoleReq) Reset ¶
func (x *CreateRoleReq) Reset()
func (*CreateRoleReq) String ¶
func (x *CreateRoleReq) String() string
func (*CreateRoleReq) UnmarshalJSON ¶
func (msg *CreateRoleReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type CreateUserReq ¶
type CreateUserReq struct {
// username 是唯一登录用户名。
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// email 是唯一联系邮箱。
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// password 是用户的初始登录密码。
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
// enabled 表示创建后是否允许用户登录和访问接口。
Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
// contains filtered or unexported fields
}
CreateUserReq 是用户创建请求。
func (*CreateUserReq) Descriptor
deprecated
func (*CreateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.
func (*CreateUserReq) GetEmail ¶
func (x *CreateUserReq) GetEmail() string
func (*CreateUserReq) GetEnabled ¶
func (x *CreateUserReq) GetEnabled() bool
func (*CreateUserReq) GetPassword ¶
func (x *CreateUserReq) GetPassword() string
func (*CreateUserReq) GetUsername ¶
func (x *CreateUserReq) GetUsername() string
func (*CreateUserReq) MarshalJSON ¶
func (msg *CreateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) ProtoReflect ¶
func (x *CreateUserReq) ProtoReflect() protoreflect.Message
func (*CreateUserReq) Reset ¶
func (x *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (x *CreateUserReq) String() string
func (*CreateUserReq) UnmarshalJSON ¶
func (msg *CreateUserReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeletePermissionReq ¶
type DeletePermissionReq struct {
// id 是待删除的权限标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
DeletePermissionReq 是权限删除请求。
func (*DeletePermissionReq) Descriptor
deprecated
func (*DeletePermissionReq) Descriptor() ([]byte, []int)
Deprecated: Use DeletePermissionReq.ProtoReflect.Descriptor instead.
func (*DeletePermissionReq) GetId ¶
func (x *DeletePermissionReq) GetId() string
func (*DeletePermissionReq) MarshalJSON ¶
func (msg *DeletePermissionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*DeletePermissionReq) ProtoMessage ¶
func (*DeletePermissionReq) ProtoMessage()
func (*DeletePermissionReq) ProtoReflect ¶
func (x *DeletePermissionReq) ProtoReflect() protoreflect.Message
func (*DeletePermissionReq) Reset ¶
func (x *DeletePermissionReq) Reset()
func (*DeletePermissionReq) String ¶
func (x *DeletePermissionReq) String() string
func (*DeletePermissionReq) UnmarshalJSON ¶
func (msg *DeletePermissionReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeleteRoleReq ¶
type DeleteRoleReq struct {
// id 是待删除的角色标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
DeleteRoleReq 是角色删除请求。
func (*DeleteRoleReq) Descriptor
deprecated
func (*DeleteRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRoleReq.ProtoReflect.Descriptor instead.
func (*DeleteRoleReq) GetId ¶
func (x *DeleteRoleReq) GetId() string
func (*DeleteRoleReq) MarshalJSON ¶
func (msg *DeleteRoleReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*DeleteRoleReq) ProtoMessage ¶
func (*DeleteRoleReq) ProtoMessage()
func (*DeleteRoleReq) ProtoReflect ¶
func (x *DeleteRoleReq) ProtoReflect() protoreflect.Message
func (*DeleteRoleReq) Reset ¶
func (x *DeleteRoleReq) Reset()
func (*DeleteRoleReq) String ¶
func (x *DeleteRoleReq) String() string
func (*DeleteRoleReq) UnmarshalJSON ¶
func (msg *DeleteRoleReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeleteUserReq ¶
type DeleteUserReq struct {
// id 是待删除的用户标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
DeleteUserReq 是用户删除请求。
func (*DeleteUserReq) Descriptor
deprecated
func (*DeleteUserReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserReq.ProtoReflect.Descriptor instead.
func (*DeleteUserReq) GetId ¶
func (x *DeleteUserReq) GetId() string
func (*DeleteUserReq) MarshalJSON ¶
func (msg *DeleteUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*DeleteUserReq) ProtoMessage ¶
func (*DeleteUserReq) ProtoMessage()
func (*DeleteUserReq) ProtoReflect ¶
func (x *DeleteUserReq) ProtoReflect() protoreflect.Message
func (*DeleteUserReq) Reset ¶
func (x *DeleteUserReq) Reset()
func (*DeleteUserReq) String ¶
func (x *DeleteUserReq) String() string
func (*DeleteUserReq) UnmarshalJSON ¶
func (msg *DeleteUserReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type GetPermissionReq ¶
type GetPermissionReq struct {
// id 是待查询的权限标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
GetPermissionReq 是权限查询请求。
func (*GetPermissionReq) Descriptor
deprecated
func (*GetPermissionReq) Descriptor() ([]byte, []int)
Deprecated: Use GetPermissionReq.ProtoReflect.Descriptor instead.
func (*GetPermissionReq) GetId ¶
func (x *GetPermissionReq) GetId() string
func (*GetPermissionReq) MarshalJSON ¶
func (msg *GetPermissionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*GetPermissionReq) ProtoMessage ¶
func (*GetPermissionReq) ProtoMessage()
func (*GetPermissionReq) ProtoReflect ¶
func (x *GetPermissionReq) ProtoReflect() protoreflect.Message
func (*GetPermissionReq) Reset ¶
func (x *GetPermissionReq) Reset()
func (*GetPermissionReq) String ¶
func (x *GetPermissionReq) String() string
func (*GetPermissionReq) UnmarshalJSON ¶
func (msg *GetPermissionReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type GetRoleReq ¶
type GetRoleReq struct {
// id 是待查询的角色标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
GetRoleReq 是角色查询请求。
func (*GetRoleReq) Descriptor
deprecated
func (*GetRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use GetRoleReq.ProtoReflect.Descriptor instead.
func (*GetRoleReq) GetId ¶
func (x *GetRoleReq) GetId() string
func (*GetRoleReq) MarshalJSON ¶
func (msg *GetRoleReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*GetRoleReq) ProtoMessage ¶
func (*GetRoleReq) ProtoMessage()
func (*GetRoleReq) ProtoReflect ¶
func (x *GetRoleReq) ProtoReflect() protoreflect.Message
func (*GetRoleReq) Reset ¶
func (x *GetRoleReq) Reset()
func (*GetRoleReq) String ¶
func (x *GetRoleReq) String() string
func (*GetRoleReq) UnmarshalJSON ¶
func (msg *GetRoleReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type GetUserReq ¶
type GetUserReq struct {
// id 是待查询的用户标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
GetUserReq 是用户查询请求。
func (*GetUserReq) Descriptor
deprecated
func (*GetUserReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead.
func (*GetUserReq) GetId ¶
func (x *GetUserReq) GetId() string
func (*GetUserReq) MarshalJSON ¶
func (msg *GetUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*GetUserReq) ProtoMessage ¶
func (*GetUserReq) ProtoMessage()
func (*GetUserReq) ProtoReflect ¶
func (x *GetUserReq) ProtoReflect() protoreflect.Message
func (*GetUserReq) Reset ¶
func (x *GetUserReq) Reset()
func (*GetUserReq) String ¶
func (x *GetUserReq) String() string
func (*GetUserReq) UnmarshalJSON ¶
func (msg *GetUserReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListPermissionReq ¶
type ListPermissionReq struct {
// paging 指定页码和每页数量。
Paging *common.Paging `protobuf:"bytes,1,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListPermissionReq 是权限分页查询请求。
func (*ListPermissionReq) Descriptor
deprecated
func (*ListPermissionReq) Descriptor() ([]byte, []int)
Deprecated: Use ListPermissionReq.ProtoReflect.Descriptor instead.
func (*ListPermissionReq) GetPaging ¶
func (x *ListPermissionReq) GetPaging() *common.Paging
func (*ListPermissionReq) MarshalJSON ¶
func (msg *ListPermissionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListPermissionReq) ProtoMessage ¶
func (*ListPermissionReq) ProtoMessage()
func (*ListPermissionReq) ProtoReflect ¶
func (x *ListPermissionReq) ProtoReflect() protoreflect.Message
func (*ListPermissionReq) Reset ¶
func (x *ListPermissionReq) Reset()
func (*ListPermissionReq) String ¶
func (x *ListPermissionReq) String() string
func (*ListPermissionReq) UnmarshalJSON ¶
func (msg *ListPermissionReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListPermissionResp ¶
type ListPermissionResp struct {
// records 是当前页权限记录。
Records []*Permission `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// paging 包含规范化分页参数和总记录数。
Paging *common.Paging `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListPermissionResp 是权限分页查询结果。
func (*ListPermissionResp) Descriptor
deprecated
func (*ListPermissionResp) Descriptor() ([]byte, []int)
Deprecated: Use ListPermissionResp.ProtoReflect.Descriptor instead.
func (*ListPermissionResp) GetPaging ¶
func (x *ListPermissionResp) GetPaging() *common.Paging
func (*ListPermissionResp) GetRecords ¶
func (x *ListPermissionResp) GetRecords() []*Permission
func (*ListPermissionResp) MarshalJSON ¶
func (msg *ListPermissionResp) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListPermissionResp) ProtoMessage ¶
func (*ListPermissionResp) ProtoMessage()
func (*ListPermissionResp) ProtoReflect ¶
func (x *ListPermissionResp) ProtoReflect() protoreflect.Message
func (*ListPermissionResp) Reset ¶
func (x *ListPermissionResp) Reset()
func (*ListPermissionResp) String ¶
func (x *ListPermissionResp) String() string
func (*ListPermissionResp) UnmarshalJSON ¶
func (msg *ListPermissionResp) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListRoleReq ¶
type ListRoleReq struct {
// paging 指定页码和每页数量。
Paging *common.Paging `protobuf:"bytes,1,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListRoleReq 是角色分页查询请求。
func (*ListRoleReq) Descriptor
deprecated
func (*ListRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use ListRoleReq.ProtoReflect.Descriptor instead.
func (*ListRoleReq) GetPaging ¶
func (x *ListRoleReq) GetPaging() *common.Paging
func (*ListRoleReq) MarshalJSON ¶
func (msg *ListRoleReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListRoleReq) ProtoMessage ¶
func (*ListRoleReq) ProtoMessage()
func (*ListRoleReq) ProtoReflect ¶
func (x *ListRoleReq) ProtoReflect() protoreflect.Message
func (*ListRoleReq) Reset ¶
func (x *ListRoleReq) Reset()
func (*ListRoleReq) String ¶
func (x *ListRoleReq) String() string
func (*ListRoleReq) UnmarshalJSON ¶
func (msg *ListRoleReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListRoleResp ¶
type ListRoleResp struct {
// records 是当前页角色记录。
Records []*Role `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// paging 包含规范化分页参数和总记录数。
Paging *common.Paging `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListRoleResp 是角色分页查询结果。
func (*ListRoleResp) Descriptor
deprecated
func (*ListRoleResp) Descriptor() ([]byte, []int)
Deprecated: Use ListRoleResp.ProtoReflect.Descriptor instead.
func (*ListRoleResp) GetPaging ¶
func (x *ListRoleResp) GetPaging() *common.Paging
func (*ListRoleResp) GetRecords ¶
func (x *ListRoleResp) GetRecords() []*Role
func (*ListRoleResp) MarshalJSON ¶
func (msg *ListRoleResp) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListRoleResp) ProtoMessage ¶
func (*ListRoleResp) ProtoMessage()
func (*ListRoleResp) ProtoReflect ¶
func (x *ListRoleResp) ProtoReflect() protoreflect.Message
func (*ListRoleResp) Reset ¶
func (x *ListRoleResp) Reset()
func (*ListRoleResp) String ¶
func (x *ListRoleResp) String() string
func (*ListRoleResp) UnmarshalJSON ¶
func (msg *ListRoleResp) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListUserReq ¶
type ListUserReq struct {
// paging 指定页码和每页数量。
Paging *common.Paging `protobuf:"bytes,1,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListUserReq 是用户分页查询请求。
func (*ListUserReq) Descriptor
deprecated
func (*ListUserReq) Descriptor() ([]byte, []int)
Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.
func (*ListUserReq) GetPaging ¶
func (x *ListUserReq) GetPaging() *common.Paging
func (*ListUserReq) MarshalJSON ¶
func (msg *ListUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListUserReq) ProtoMessage ¶
func (*ListUserReq) ProtoMessage()
func (*ListUserReq) ProtoReflect ¶
func (x *ListUserReq) ProtoReflect() protoreflect.Message
func (*ListUserReq) Reset ¶
func (x *ListUserReq) Reset()
func (*ListUserReq) String ¶
func (x *ListUserReq) String() string
func (*ListUserReq) UnmarshalJSON ¶
func (msg *ListUserReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ListUserResp ¶
type ListUserResp struct {
// records 是当前页用户记录。
Records []*User `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// paging 包含规范化分页参数和总记录数。
Paging *common.Paging `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"`
// contains filtered or unexported fields
}
ListUserResp 是用户分页查询结果。
func (*ListUserResp) Descriptor
deprecated
func (*ListUserResp) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResp.ProtoReflect.Descriptor instead.
func (*ListUserResp) GetPaging ¶
func (x *ListUserResp) GetPaging() *common.Paging
func (*ListUserResp) GetRecords ¶
func (x *ListUserResp) GetRecords() []*User
func (*ListUserResp) MarshalJSON ¶
func (msg *ListUserResp) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ListUserResp) ProtoMessage ¶
func (*ListUserResp) ProtoMessage()
func (*ListUserResp) ProtoReflect ¶
func (x *ListUserResp) ProtoReflect() protoreflect.Message
func (*ListUserResp) Reset ¶
func (x *ListUserResp) Reset()
func (*ListUserResp) String ¶
func (x *ListUserResp) String() string
func (*ListUserResp) UnmarshalJSON ¶
func (msg *ListUserResp) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type LoginReq ¶
type LoginReq struct {
// username 是登录用户名。
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// password 是登录密码。
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
LoginReq 是用户登录请求。
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) GetUsername ¶
func (*LoginReq) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
func (*LoginReq) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type LoginResp ¶
type LoginResp struct {
// access_token 是后续请求使用的 Bearer JWT。
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
// expires_at 是令牌失效时间的 Unix 秒时间戳。
ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
LoginResp 是登录成功后的令牌信息。
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) GetAccessToken ¶
func (*LoginResp) GetExpiresAt ¶
func (*LoginResp) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
func (*LoginResp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type Permission ¶
type Permission struct {
// id 是权限标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// code 是权限检查使用的唯一编码。
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// name 是权限显示名称。
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// metadata 是权限的审计信息。
Metadata *common.Metadata `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}
Permission 表示可分配给角色的权限。
func (*Permission) Descriptor
deprecated
func (*Permission) Descriptor() ([]byte, []int)
Deprecated: Use Permission.ProtoReflect.Descriptor instead.
func (*Permission) GetCode ¶
func (x *Permission) GetCode() string
func (*Permission) GetId ¶
func (x *Permission) GetId() string
func (*Permission) GetMetadata ¶
func (x *Permission) GetMetadata() *common.Metadata
func (*Permission) GetName ¶
func (x *Permission) GetName() string
func (*Permission) MarshalJSON ¶
func (msg *Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Permission) ProtoMessage ¶
func (*Permission) ProtoMessage()
func (*Permission) ProtoReflect ¶
func (x *Permission) ProtoReflect() protoreflect.Message
func (*Permission) Reset ¶
func (x *Permission) Reset()
func (*Permission) String ¶
func (x *Permission) String() string
func (*Permission) UnmarshalJSON ¶
func (msg *Permission) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PermissionServiceClient ¶
type PermissionServiceClient interface {
// Create 创建权限。
Create(ctx context.Context, in *CreatePermissionReq, opts ...grpc.CallOption) (*Permission, error)
// Get 按标识查询权限。
Get(ctx context.Context, in *GetPermissionReq, opts ...grpc.CallOption) (*Permission, error)
// List 分页查询权限。
List(ctx context.Context, in *ListPermissionReq, opts ...grpc.CallOption) (*ListPermissionResp, error)
// Update 更新权限名称。
Update(ctx context.Context, in *UpdatePermissionReq, opts ...grpc.CallOption) (*Permission, error)
// Delete 删除非内置权限。
Delete(ctx context.Context, in *DeletePermissionReq, opts ...grpc.CallOption) (*common.Empty, error)
}
PermissionServiceClient is the client API for PermissionService 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.
PermissionService 提供权限资源管理能力。
func NewPermissionServiceClient ¶
func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient
type PermissionServiceServer ¶
type PermissionServiceServer interface {
// Create 创建权限。
Create(context.Context, *CreatePermissionReq) (*Permission, error)
// Get 按标识查询权限。
Get(context.Context, *GetPermissionReq) (*Permission, error)
// List 分页查询权限。
List(context.Context, *ListPermissionReq) (*ListPermissionResp, error)
// Update 更新权限名称。
Update(context.Context, *UpdatePermissionReq) (*Permission, error)
// Delete 删除非内置权限。
Delete(context.Context, *DeletePermissionReq) (*common.Empty, error)
// contains filtered or unexported methods
}
PermissionServiceServer is the server API for PermissionService service. All implementations must embed UnimplementedPermissionServiceServer for forward compatibility.
PermissionService 提供权限资源管理能力。
type Role ¶
type Role struct {
// id 是角色标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// code 是角色的唯一编码。
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// name 是角色显示名称。
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// permission_ids 是角色关联的权限标识集合。
PermissionIds []string `protobuf:"bytes,4,rep,name=permission_ids,json=permissionIds,proto3" json:"permission_ids,omitempty"`
// metadata 是角色的审计信息。
Metadata *common.Metadata `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}
Role 表示一组可分配给用户的权限。
func (*Role) Descriptor
deprecated
func (*Role) GetMetadata ¶
func (*Role) GetPermissionIds ¶
func (*Role) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
func (*Role) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type RoleServiceClient ¶
type RoleServiceClient interface {
// Create 创建角色。
Create(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*Role, error)
// Get 按标识查询角色。
Get(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*Role, error)
// List 分页查询角色。
List(ctx context.Context, in *ListRoleReq, opts ...grpc.CallOption) (*ListRoleResp, error)
// Update 更新角色名称。
Update(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*Role, error)
// Delete 删除非管理员角色。
Delete(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*common.Empty, error)
// SetPermissions 替换角色关联的权限集合。
SetPermissions(ctx context.Context, in *SetRolePermissionsReq, opts ...grpc.CallOption) (*common.Empty, error)
}
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.
RoleService 提供角色及其权限关系的管理能力。
func NewRoleServiceClient ¶
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient
type RoleServiceServer ¶
type RoleServiceServer interface {
// Create 创建角色。
Create(context.Context, *CreateRoleReq) (*Role, error)
// Get 按标识查询角色。
Get(context.Context, *GetRoleReq) (*Role, error)
// List 分页查询角色。
List(context.Context, *ListRoleReq) (*ListRoleResp, error)
// Update 更新角色名称。
Update(context.Context, *UpdateRoleReq) (*Role, error)
// Delete 删除非管理员角色。
Delete(context.Context, *DeleteRoleReq) (*common.Empty, error)
// SetPermissions 替换角色关联的权限集合。
SetPermissions(context.Context, *SetRolePermissionsReq) (*common.Empty, error)
// contains filtered or unexported methods
}
RoleServiceServer is the server API for RoleService service. All implementations must embed UnimplementedRoleServiceServer for forward compatibility.
RoleService 提供角色及其权限关系的管理能力。
type SetRolePermissionsReq ¶
type SetRolePermissionsReq struct {
// id 是待设置权限的角色标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// permission_ids 是替换后的权限标识集合。
PermissionIds []string `protobuf:"bytes,2,rep,name=permission_ids,json=permissionIds,proto3" json:"permission_ids,omitempty"`
// contains filtered or unexported fields
}
SetRolePermissionsReq 是角色权限替换请求。
func (*SetRolePermissionsReq) Descriptor
deprecated
func (*SetRolePermissionsReq) Descriptor() ([]byte, []int)
Deprecated: Use SetRolePermissionsReq.ProtoReflect.Descriptor instead.
func (*SetRolePermissionsReq) GetId ¶
func (x *SetRolePermissionsReq) GetId() string
func (*SetRolePermissionsReq) GetPermissionIds ¶
func (x *SetRolePermissionsReq) GetPermissionIds() []string
func (*SetRolePermissionsReq) MarshalJSON ¶
func (msg *SetRolePermissionsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SetRolePermissionsReq) ProtoMessage ¶
func (*SetRolePermissionsReq) ProtoMessage()
func (*SetRolePermissionsReq) ProtoReflect ¶
func (x *SetRolePermissionsReq) ProtoReflect() protoreflect.Message
func (*SetRolePermissionsReq) Reset ¶
func (x *SetRolePermissionsReq) Reset()
func (*SetRolePermissionsReq) String ¶
func (x *SetRolePermissionsReq) String() string
func (*SetRolePermissionsReq) UnmarshalJSON ¶
func (msg *SetRolePermissionsReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SetUserRolesReq ¶
type SetUserRolesReq struct {
// id 是待设置角色的用户标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// role_ids 是替换后的角色标识集合。
RoleIds []string `protobuf:"bytes,2,rep,name=role_ids,json=roleIds,proto3" json:"role_ids,omitempty"`
// contains filtered or unexported fields
}
SetUserRolesReq 是用户角色替换请求。
func (*SetUserRolesReq) Descriptor
deprecated
func (*SetUserRolesReq) Descriptor() ([]byte, []int)
Deprecated: Use SetUserRolesReq.ProtoReflect.Descriptor instead.
func (*SetUserRolesReq) GetId ¶
func (x *SetUserRolesReq) GetId() string
func (*SetUserRolesReq) GetRoleIds ¶
func (x *SetUserRolesReq) GetRoleIds() []string
func (*SetUserRolesReq) MarshalJSON ¶
func (msg *SetUserRolesReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SetUserRolesReq) ProtoMessage ¶
func (*SetUserRolesReq) ProtoMessage()
func (*SetUserRolesReq) ProtoReflect ¶
func (x *SetUserRolesReq) ProtoReflect() protoreflect.Message
func (*SetUserRolesReq) Reset ¶
func (x *SetUserRolesReq) Reset()
func (*SetUserRolesReq) String ¶
func (x *SetUserRolesReq) String() string
func (*SetUserRolesReq) UnmarshalJSON ¶
func (msg *SetUserRolesReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
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 UnimplementedPermissionServiceServer ¶
type UnimplementedPermissionServiceServer struct{}
UnimplementedPermissionServiceServer 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.
func (UnimplementedPermissionServiceServer) Create ¶
func (UnimplementedPermissionServiceServer) Create(context.Context, *CreatePermissionReq) (*Permission, error)
func (UnimplementedPermissionServiceServer) Delete ¶
func (UnimplementedPermissionServiceServer) Delete(context.Context, *DeletePermissionReq) (*common.Empty, error)
func (UnimplementedPermissionServiceServer) Get ¶
func (UnimplementedPermissionServiceServer) Get(context.Context, *GetPermissionReq) (*Permission, error)
func (UnimplementedPermissionServiceServer) List ¶
func (UnimplementedPermissionServiceServer) List(context.Context, *ListPermissionReq) (*ListPermissionResp, error)
func (UnimplementedPermissionServiceServer) Update ¶
func (UnimplementedPermissionServiceServer) Update(context.Context, *UpdatePermissionReq) (*Permission, error)
type UnimplementedRoleServiceServer ¶
type UnimplementedRoleServiceServer struct{}
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.
func (UnimplementedRoleServiceServer) Create ¶
func (UnimplementedRoleServiceServer) Create(context.Context, *CreateRoleReq) (*Role, error)
func (UnimplementedRoleServiceServer) Delete ¶
func (UnimplementedRoleServiceServer) Delete(context.Context, *DeleteRoleReq) (*common.Empty, error)
func (UnimplementedRoleServiceServer) Get ¶
func (UnimplementedRoleServiceServer) Get(context.Context, *GetRoleReq) (*Role, error)
func (UnimplementedRoleServiceServer) List ¶
func (UnimplementedRoleServiceServer) List(context.Context, *ListRoleReq) (*ListRoleResp, error)
func (UnimplementedRoleServiceServer) SetPermissions ¶
func (UnimplementedRoleServiceServer) SetPermissions(context.Context, *SetRolePermissionsReq) (*common.Empty, error)
func (UnimplementedRoleServiceServer) Update ¶
func (UnimplementedRoleServiceServer) Update(context.Context, *UpdateRoleReq) (*Role, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
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.
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserReq) (*User, error)
func (UnimplementedUserServiceServer) Delete ¶
func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserReq) (*common.Empty, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *GetUserReq) (*User, error)
func (UnimplementedUserServiceServer) List ¶
func (UnimplementedUserServiceServer) List(context.Context, *ListUserReq) (*ListUserResp, error)
func (UnimplementedUserServiceServer) SetRoles ¶
func (UnimplementedUserServiceServer) SetRoles(context.Context, *SetUserRolesReq) (*common.Empty, error)
func (UnimplementedUserServiceServer) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserReq) (*User, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
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 UnsafePermissionServiceServer ¶
type UnsafePermissionServiceServer interface {
// contains filtered or unexported methods
}
UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PermissionServiceServer will result in compilation errors.
type UnsafeRoleServiceServer ¶
type UnsafeRoleServiceServer interface {
// contains filtered or unexported methods
}
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 UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
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 UpdatePermissionReq ¶
type UpdatePermissionReq struct {
// id 是待更新的权限标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// name 是新的权限显示名称。
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
UpdatePermissionReq 是权限更新请求。
func (*UpdatePermissionReq) Descriptor
deprecated
func (*UpdatePermissionReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePermissionReq.ProtoReflect.Descriptor instead.
func (*UpdatePermissionReq) GetId ¶
func (x *UpdatePermissionReq) GetId() string
func (*UpdatePermissionReq) GetName ¶
func (x *UpdatePermissionReq) GetName() string
func (*UpdatePermissionReq) MarshalJSON ¶
func (msg *UpdatePermissionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*UpdatePermissionReq) ProtoMessage ¶
func (*UpdatePermissionReq) ProtoMessage()
func (*UpdatePermissionReq) ProtoReflect ¶
func (x *UpdatePermissionReq) ProtoReflect() protoreflect.Message
func (*UpdatePermissionReq) Reset ¶
func (x *UpdatePermissionReq) Reset()
func (*UpdatePermissionReq) String ¶
func (x *UpdatePermissionReq) String() string
func (*UpdatePermissionReq) UnmarshalJSON ¶
func (msg *UpdatePermissionReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type UpdateRoleReq ¶
type UpdateRoleReq struct {
// id 是待更新的角色标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// name 是新的角色显示名称。
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
UpdateRoleReq 是角色更新请求。
func (*UpdateRoleReq) Descriptor
deprecated
func (*UpdateRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRoleReq.ProtoReflect.Descriptor instead.
func (*UpdateRoleReq) GetId ¶
func (x *UpdateRoleReq) GetId() string
func (*UpdateRoleReq) GetName ¶
func (x *UpdateRoleReq) GetName() string
func (*UpdateRoleReq) MarshalJSON ¶
func (msg *UpdateRoleReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*UpdateRoleReq) ProtoMessage ¶
func (*UpdateRoleReq) ProtoMessage()
func (*UpdateRoleReq) ProtoReflect ¶
func (x *UpdateRoleReq) ProtoReflect() protoreflect.Message
func (*UpdateRoleReq) Reset ¶
func (x *UpdateRoleReq) Reset()
func (*UpdateRoleReq) String ¶
func (x *UpdateRoleReq) String() string
func (*UpdateRoleReq) UnmarshalJSON ¶
func (msg *UpdateRoleReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type UpdateUserReq ¶
type UpdateUserReq struct {
// id 是待更新的用户标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// email 是新的唯一联系邮箱。
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// enabled 表示更新后是否允许用户登录和访问接口。
Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
// contains filtered or unexported fields
}
UpdateUserReq 是用户更新请求。
func (*UpdateUserReq) Descriptor
deprecated
func (*UpdateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserReq.ProtoReflect.Descriptor instead.
func (*UpdateUserReq) GetEmail ¶
func (x *UpdateUserReq) GetEmail() string
func (*UpdateUserReq) GetEnabled ¶
func (x *UpdateUserReq) GetEnabled() bool
func (*UpdateUserReq) GetId ¶
func (x *UpdateUserReq) GetId() string
func (*UpdateUserReq) MarshalJSON ¶
func (msg *UpdateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*UpdateUserReq) ProtoMessage ¶
func (*UpdateUserReq) ProtoMessage()
func (*UpdateUserReq) ProtoReflect ¶
func (x *UpdateUserReq) ProtoReflect() protoreflect.Message
func (*UpdateUserReq) Reset ¶
func (x *UpdateUserReq) Reset()
func (*UpdateUserReq) String ¶
func (x *UpdateUserReq) String() string
func (*UpdateUserReq) UnmarshalJSON ¶
func (msg *UpdateUserReq) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type User ¶
type User struct {
// id 是用户标识。
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// username 是唯一登录用户名。
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// email 是唯一联系邮箱。
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// enabled 表示用户是否允许登录和访问接口。
Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
// avatar_file_id 是当前头像文件标识,未设置时为空。
AvatarFileId string `protobuf:"bytes,5,opt,name=avatar_file_id,json=avatarFileId,proto3" json:"avatar_file_id,omitempty"`
// role_ids 是用户关联的角色标识集合。
RoleIds []string `protobuf:"bytes,6,rep,name=role_ids,json=roleIds,proto3" json:"role_ids,omitempty"`
// metadata 是用户的审计信息。
Metadata *common.Metadata `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}
User 表示可登录并被授予角色的用户。
func (*User) Descriptor
deprecated
func (*User) GetAvatarFileId ¶
func (*User) GetEnabled ¶
func (*User) GetMetadata ¶
func (*User) GetRoleIds ¶
func (*User) GetUsername ¶
func (*User) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type UserServiceClient ¶
type UserServiceClient interface {
// Create 创建用户。
Create(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*User, error)
// Get 按标识查询用户。
Get(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*User, error)
// List 分页查询用户。
List(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error)
// Update 更新用户邮箱和启用状态。
Update(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*User, error)
// Delete 删除非当前登录用户。
Delete(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*common.Empty, error)
// SetRoles 替换用户关联的角色集合。
SetRoles(ctx context.Context, in *SetUserRolesReq, opts ...grpc.CallOption) (*common.Empty, error)
}
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.
UserService 提供用户及其角色关系的管理能力。
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
// Create 创建用户。
Create(context.Context, *CreateUserReq) (*User, error)
// Get 按标识查询用户。
Get(context.Context, *GetUserReq) (*User, error)
// List 分页查询用户。
List(context.Context, *ListUserReq) (*ListUserResp, error)
// Update 更新用户邮箱和启用状态。
Update(context.Context, *UpdateUserReq) (*User, error)
// Delete 删除非当前登录用户。
Delete(context.Context, *DeleteUserReq) (*common.Empty, error)
// SetRoles 替换用户关联的角色集合。
SetRoles(context.Context, *SetUserRolesReq) (*common.Empty, error)
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
UserService 提供用户及其角色关系的管理能力。