handler

package
v2.3.76 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

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

func NewAuthHandlers

func NewAuthHandlers[Model profile.IModel, 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 profile.IModel, CreateInput, UpdateInput, UpdateProfileInput any] struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers[Model profile.IModel, CreateInput, UpdateInput, UpdateProfileInput any](
	authService service2.IAuthService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	permissionService service2.IPermissionService,
	roleService service2.IRoleService,
	userService service2.IUserService[Model, CreateInput, UpdateInput, UpdateProfileInput],
	settingService service2.ISettingService,
	sessionService service2.ISessionService,
	tr mw.ITransaction,
	tokenMiddleware middleware2.ITokenMiddleware,
	permissionMiddleware middleware2.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

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

func NewPermissionHandlers

func NewPermissionHandlers(
	permissionService service.IPermissionService,

) *PermissionHandler

func (*PermissionHandler) Init

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

func (*PermissionHandler) List

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

type RoleHandler

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

func NewRoleHandlers

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

func (*RoleHandler) Create

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

func (*RoleHandler) Delete

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

func (*RoleHandler) GetById

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

func (*RoleHandler) Init

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

func (*RoleHandler) List

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

func (*RoleHandler) Update

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

type SessionHandler added in v2.3.7

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

func NewSessionHandlers added in v2.3.7

func NewSessionHandlers(
	sessionService service.ISessionService,
	tr mw.ITransaction,
) *SessionHandler

func (*SessionHandler) Init added in v2.3.7

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

type SettingHandler

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

func NewSettingHandlers

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

func (*SettingHandler) Get

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

func (*SettingHandler) Init

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

func (*SettingHandler) Update

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

type UserHandler

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

func NewUserHandlers

func NewUserHandlers[Model profile.IModel, 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

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

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete

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

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById

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

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

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

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) List

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

func (*UserHandler[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update

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