handler

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

func NewHandler(biz biz.IBiz) *Handler

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL