handler

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

type AuthHandler[Model, CreateInput, UpdateInput, UpdateProfileInput any] struct {
	// contains filtered or unexported fields
}

func NewAuthHandlers

func NewAuthHandlers[Model, CreateInput, UpdateInput, UpdateProfileInput any](
	authService service.IAuthService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	tr mw.ITransaction,
	tokenMiddleware middleware.ITokenMiddleware,
	profileTransformer profile.ITransformer[Model],
	profileRequest profile.IRequest[CreateInput, UpdateInput, UpdateProfileInput],
) *AuthHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]

func (*AuthHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init

func (h *AuthHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init(api *gin.RouterGroup)

type Handler

type Handler[Model, CreateInput, UpdateInput, UpdateProfileInput any] struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers[Model, CreateInput, UpdateInput, UpdateProfileInput any](
	authService service.IAuthService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	permissionService service.IPermissionService,
	roleService service.IRoleService,
	userService service.IUserService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	settingService service.ISettingService,
	tr mw.ITransaction,
	tokenMiddleware middleware.ITokenMiddleware,
	permissionMiddleware middleware.IPermissionMiddleware,
	profileTransformer profile.ITransformer[Model],
	profileRequest profile.IRequest[CreateInput, UpdateInput, UpdateProfileInput],
) *Handler[Model, CreateInput, UpdateInput, UpdateProfileInput]

func (*Handler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init

func (h *Handler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init(api *gin.RouterGroup)

type IHandler

type IHandler interface {
	Init(api *gin.RouterGroup)
}

type PermissionHandler added in v2.0.4

type PermissionHandler struct {
	// contains filtered or unexported fields
}

func NewPermissionHandlers added in v2.0.4

func NewPermissionHandlers(
	permissionService service.IPermissionService,

) *PermissionHandler

func (*PermissionHandler) Init added in v2.0.4

func (h *PermissionHandler) Init(api *gin.RouterGroup)

func (*PermissionHandler) List added in v2.0.4

func (h *PermissionHandler) List(c *gin.Context)

type RoleHandler added in v2.0.4

type RoleHandler struct {
	// contains filtered or unexported fields
}

func NewRoleHandlers added in v2.0.4

func NewRoleHandlers(
	roleService service.IRoleService,
	tr mw.ITransaction,
) *RoleHandler

func (*RoleHandler) Create added in v2.0.4

func (h *RoleHandler) Create(c *gin.Context)

func (*RoleHandler) Delete added in v2.0.4

func (h *RoleHandler) Delete(c *gin.Context)

func (*RoleHandler) GetById added in v2.0.4

func (h *RoleHandler) GetById(c *gin.Context)

func (*RoleHandler) Init added in v2.0.4

func (h *RoleHandler) Init(api *gin.RouterGroup)

func (*RoleHandler) List added in v2.0.4

func (h *RoleHandler) List(c *gin.Context)

func (*RoleHandler) Update added in v2.0.4

func (h *RoleHandler) Update(c *gin.Context)

type SettingHandler added in v2.0.18

type SettingHandler struct {
	// contains filtered or unexported fields
}

func NewSettingHandlers added in v2.0.18

func NewSettingHandlers(
	settingService service.ISettingService,
	tr mw.ITransaction,
) *SettingHandler

func (*SettingHandler) Get added in v2.0.18

func (h *SettingHandler) Get(c *gin.Context)

func (*SettingHandler) Init added in v2.0.18

func (h *SettingHandler) Init(api *gin.RouterGroup)

func (*SettingHandler) Update added in v2.0.18

func (h *SettingHandler) Update(c *gin.Context)

type UserHandler added in v2.0.4

type UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput any] struct {
	// contains filtered or unexported fields
}

func NewUserHandlers added in v2.0.4

func NewUserHandlers[Model, CreateInput, UpdateInput, UpdateProfileInput any](
	userService service.IUserService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	tr mw.ITransaction,
	profileTransformer profile.ITransformer[Model],
	profileRequest profile.IRequest[CreateInput, UpdateInput, UpdateProfileInput],
) *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Create added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Create(c *gin.Context)

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete(c *gin.Context)

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById(c *gin.Context)

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Init(api *gin.RouterGroup)

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) List added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) List(c *gin.Context)

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update added in v2.0.4

func (h *UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update(c *gin.Context)

Jump to

Keyboard shortcuts

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