Documentation
¶
Index ¶
- Variables
- type Handler
- func (h *Handler) Auth(ctx context.Context, rq *v1.AuthRequest) (*v1.AuthResponse, error)
- func (h *Handler) Authenticate(ctx context.Context, rq *v1.AuthenticateRequest) (*v1.AuthenticateResponse, error)
- func (h *Handler) Authorize(ctx context.Context, rq *v1.AuthorizeRequest) (*v1.AuthorizeResponse, error)
- func (h *Handler) CreateSecret(ctx context.Context, rq *v1.CreateSecretRequest) (*v1.CreateSecretResponse, error)
- func (h *Handler) CreateUser(ctx context.Context, rq *v1.CreateUserRequest) (*v1.CreateUserResponse, error)
- func (h *Handler) DeleteSecret(ctx context.Context, rq *v1.DeleteSecretRequest) (*v1.DeleteSecretResponse, error)
- func (h *Handler) DeleteUser(ctx context.Context, rq *v1.DeleteUserRequest) (*v1.DeleteUserResponse, error)
- func (h *Handler) GetSecret(ctx context.Context, rq *v1.GetSecretRequest) (*v1.GetSecretResponse, error)
- func (h *Handler) GetUser(ctx context.Context, rq *v1.GetUserRequest) (*v1.GetUserResponse, error)
- func (h *Handler) ListSecret(ctx context.Context, rq *v1.ListSecretRequest) (*v1.ListSecretResponse, error)
- func (h *Handler) ListUser(ctx context.Context, rq *v1.ListUserRequest) (*v1.ListUserResponse, error)
- func (h *Handler) Login(ctx context.Context, rq *v1.LoginRequest) (*v1.LoginReply, error)
- func (h *Handler) Logout(ctx context.Context, rq *v1.LogoutRequest) (*v1.LogoutResponse, error)
- func (h *Handler) RefreshToken(ctx context.Context, rq *v1.RefreshTokenRequest) (*v1.LoginReply, error)
- func (h *Handler) UpdatePassword(ctx context.Context, rq *v1.UpdatePasswordRequest) (*v1.UpdatePasswordResponse, error)
- func (h *Handler) UpdateSecret(ctx context.Context, rq *v1.UpdateSecretRequest) (*v1.UpdateSecretResponse, error)
- func (h *Handler) UpdateUser(ctx context.Context, rq *v1.UpdateUserRequest) (*v1.UpdateUserResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ProviderSet = wire.NewSet(NewHandler, wire.Bind(new(v1.UserCenterServer), new(*Handler)))
ProviderSet contains providers for creating instances of the biz struct.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
v1.UnimplementedUserCenterServer
// contains filtered or unexported fields
}
Handler implements a gRPC service.
func NewHandler ¶
NewHandler creates a new instance of *Handler.
func (*Handler) Auth ¶
func (h *Handler) Auth(ctx context.Context, rq *v1.AuthRequest) (*v1.AuthResponse, error)
Auth authenticates and authorizes the user token for an object/action.
func (*Handler) Authenticate ¶
func (h *Handler) Authenticate(ctx context.Context, rq *v1.AuthenticateRequest) (*v1.AuthenticateResponse, error)
Authenticate validates the user token and returns the user ID.
func (*Handler) Authorize ¶
func (h *Handler) Authorize(ctx context.Context, rq *v1.AuthorizeRequest) (*v1.AuthorizeResponse, error)
Authorize checks whether the user is authorized for the object/action.
func (*Handler) CreateSecret ¶
func (h *Handler) CreateSecret(ctx context.Context, rq *v1.CreateSecretRequest) (*v1.CreateSecretResponse, error)
CreateSecret handles the creation of a new secret.
func (*Handler) CreateUser ¶
func (h *Handler) CreateUser(ctx context.Context, rq *v1.CreateUserRequest) (*v1.CreateUserResponse, error)
CreateUser handles the creation of a new user.
func (*Handler) DeleteSecret ¶
func (h *Handler) DeleteSecret(ctx context.Context, rq *v1.DeleteSecretRequest) (*v1.DeleteSecretResponse, error)
DeleteSecret handles the deletion of one or more secrets.
func (*Handler) DeleteUser ¶
func (h *Handler) DeleteUser(ctx context.Context, rq *v1.DeleteUserRequest) (*v1.DeleteUserResponse, error)
DeleteUser handles the deletion of one or more users.
func (*Handler) GetSecret ¶
func (h *Handler) GetSecret(ctx context.Context, rq *v1.GetSecretRequest) (*v1.GetSecretResponse, error)
GetSecret retrieves information about a specific secret.
func (*Handler) GetUser ¶
func (h *Handler) GetUser(ctx context.Context, rq *v1.GetUserRequest) (*v1.GetUserResponse, error)
GetUser retrieves information about a specific user.
func (*Handler) ListSecret ¶
func (h *Handler) ListSecret(ctx context.Context, rq *v1.ListSecretRequest) (*v1.ListSecretResponse, error)
ListSecret retrieves a list of secrets based on query parameters.
func (*Handler) ListUser ¶
func (h *Handler) ListUser(ctx context.Context, rq *v1.ListUserRequest) (*v1.ListUserResponse, error)
ListUser retrieves a list of users based on query parameters.
func (*Handler) Login ¶
func (h *Handler) Login(ctx context.Context, rq *v1.LoginRequest) (*v1.LoginReply, error)
Login authenticates the user credentials and returns a token on success.
func (*Handler) Logout ¶
func (h *Handler) Logout(ctx context.Context, rq *v1.LogoutRequest) (*v1.LogoutResponse, error)
Logout invalidates the user token.
func (*Handler) RefreshToken ¶
func (h *Handler) RefreshToken(ctx context.Context, rq *v1.RefreshTokenRequest) (*v1.LoginReply, error)
RefreshToken generates a new token using the refresh token.
func (*Handler) UpdatePassword ¶
func (h *Handler) UpdatePassword(ctx context.Context, rq *v1.UpdatePasswordRequest) (*v1.UpdatePasswordResponse, error)
UpdatePassword receives an UpdatePasswordRequest and updates the user's password in the datastore.
func (*Handler) UpdateSecret ¶
func (h *Handler) UpdateSecret(ctx context.Context, rq *v1.UpdateSecretRequest) (*v1.UpdateSecretResponse, error)
UpdateSecret handles updating an existing secret's details.
func (*Handler) UpdateUser ¶
func (h *Handler) UpdateUser(ctx context.Context, rq *v1.UpdateUserRequest) (*v1.UpdateUserResponse, error)
UpdateUser handles updating an existing user's details.