Documentation ¶
Index ¶
- func InitRouter(ctx context.Context, parentRouterGroup gin.IRouter, ...) error
- type AuthHandler
- type AuthenticationUsecase
- type GoogleUserHandler
- type GoogleUserUsecase
- type InitRouterGroupFunc
- func NewInitAuthRouterFunc(authenticationUsecase AuthenticationUsecase) InitRouterGroupFunc
- func NewInitGoogleRouterFunc(googleUserUsecase GoogleUserUsecase) InitRouterGroupFunc
- func NewInitPasswordRouterFunc(password PasswordUsecaseInterface) InitRouterGroupFunc
- func NewInitRBACRouterFunc(rbacUsecase RBACUsecase) InitRouterGroupFunc
- func NewInitTestRouterFunc() InitRouterGroupFunc
- type PasswordAuthHandler
- type PasswordUsecaseInterface
- type RBACHandler
- type RBACUsecase
- type SystemAdminInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRouter ¶
func InitRouter(ctx context.Context, parentRouterGroup gin.IRouter, initPublicRouterFunc []InitRouterGroupFunc, initPrivateRouterFunc []InitRouterGroupFunc, corsConfig cors.Config, debugConfig *libconfig.DebugConfig, appName string) error
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(authenticationUsecase AuthenticationUsecase) *AuthHandler
func (*AuthHandler) GetUserInfo ¶
func (h *AuthHandler) GetUserInfo(c *gin.Context)
func (*AuthHandler) RefreshToken ¶
func (h *AuthHandler) RefreshToken(c *gin.Context)
type AuthenticationUsecase ¶
type GoogleUserHandler ¶
type GoogleUserHandler struct {
// contains filtered or unexported fields
}
func NewGoogleAuthHandler ¶
func NewGoogleAuthHandler(googleUserUsecase GoogleUserUsecase) *GoogleUserHandler
func (*GoogleUserHandler) Authorize ¶
func (h *GoogleUserHandler) Authorize(c *gin.Context)
func (*GoogleUserHandler) GenerateState ¶
func (h *GoogleUserHandler) GenerateState(c *gin.Context)
type GoogleUserUsecase ¶
type InitRouterGroupFunc ¶
type InitRouterGroupFunc func(parentRouterGroup gin.IRouter, middleware ...gin.HandlerFunc) error
func NewInitAuthRouterFunc ¶
func NewInitAuthRouterFunc(authenticationUsecase AuthenticationUsecase) InitRouterGroupFunc
func NewInitGoogleRouterFunc ¶
func NewInitGoogleRouterFunc(googleUserUsecase GoogleUserUsecase) InitRouterGroupFunc
func NewInitPasswordRouterFunc ¶
func NewInitPasswordRouterFunc(password PasswordUsecaseInterface) InitRouterGroupFunc
func NewInitRBACRouterFunc ¶
func NewInitRBACRouterFunc(rbacUsecase RBACUsecase) InitRouterGroupFunc
func NewInitTestRouterFunc ¶
func NewInitTestRouterFunc() InitRouterGroupFunc
type PasswordAuthHandler ¶
type PasswordAuthHandler struct {
// contains filtered or unexported fields
}
func NewPasswordAuthHandler ¶
func NewPasswordAuthHandler(passwordUsecase PasswordUsecaseInterface) *PasswordAuthHandler
func (*PasswordAuthHandler) Authorize ¶
func (h *PasswordAuthHandler) Authorize(c *gin.Context)
type RBACHandler ¶
type RBACHandler struct {
// contains filtered or unexported fields
}
func NewRBACHandler ¶
func NewRBACHandler(rbacUsecase RBACUsecase) *RBACHandler
func (*RBACHandler) AddPolicyToGroup ¶
func (h *RBACHandler) AddPolicyToGroup(c *gin.Context)
func (*RBACHandler) AddPolicyToUser ¶
func (h *RBACHandler) AddPolicyToUser(c *gin.Context)
type RBACUsecase ¶
type RBACUsecase interface {
AddPolicyToUser(ctx context.Context, organizationID *domain.OrganizationID, subject domain.RBACSubject, action domain.RBACAction, object domain.RBACObject, effect domain.RBACEffect) error
}
type SystemAdminInterface ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.