Documentation ¶
Index ¶
- Variables
- func IsAuthError(e error) bool
- func ShouldBind[T any](gc *gin.Context, obj T) error
- type Auth
- type Handler
- type Handlers
- type HealthGetHandler
- type HealthGetResponse
- type UserCreateHandler
- type UserCreateRequest
- type UserCreateResponse
- type UserFindHandler
- type UserFindRequest
- type UserFindResponse
- type UserFindResponseUser
- type UserGetHandler
- type UserGetRequest
- type UserGetResponse
- type UserUpdateHandler
- type UserUpdateRequest
- type UserUpdateResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAuthValue = errors.New("invalid auth header value")
View Source
var ErrNoAuthValue = errors.New("no auth value")
View Source
var ErrNotSupportedAuthType = errors.New("not supported auth type")
Functions ¶
func IsAuthError ¶
Types ¶
type Handler ¶
type Handler gin.HandlerFunc
type HealthGetHandler ¶
type HealthGetHandler struct{}
Get health check
func NewHealthGetHandler ¶
func NewHealthGetHandler() *HealthGetHandler
func (*HealthGetHandler) Handle ¶
func (h *HealthGetHandler) Handle(gc *gin.Context)
type HealthGetResponse ¶
type HealthGetResponse struct {
Message string `json:"message"`
}
Get health check
type UserCreateHandler ¶
type UserCreateHandler struct {
// contains filtered or unexported fields
}
Create user
func NewUserCreateHandler ¶
func NewUserCreateHandler( txm port.TransactionManager, passwordManager port.PasswordManager, userInteractor interactor.UserInteractor, ) *UserCreateHandler
func (*UserCreateHandler) Handle ¶
func (h *UserCreateHandler) Handle(gc *gin.Context)
type UserCreateRequest ¶
type UserCreateRequest struct { Name string `json:"name" form:"name" binding:"required"` Email string `json:"email" form:"email" binding:"required"` }
Create user
type UserCreateResponse ¶
type UserCreateResponse struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` }
Create user
type UserFindHandler ¶
type UserFindHandler struct {
// contains filtered or unexported fields
}
Find users
func NewUserFindHandler ¶
func NewUserFindHandler( txm port.TransactionManager, userInteractor interactor.UserInteractor, ) *UserFindHandler
func (*UserFindHandler) Handle ¶
func (h *UserFindHandler) Handle(gc *gin.Context)
type UserFindRequest ¶
type UserFindRequest struct {
Email *string `json:"email" form:"email"`
}
Find users
type UserFindResponse ¶
type UserFindResponse struct {
Users []*UserFindResponseUser `json:"users"`
}
Find users
type UserFindResponseUser ¶
type UserFindResponseUser struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` }
Find users
type UserGetHandler ¶
type UserGetHandler struct {
// contains filtered or unexported fields
}
Get user
func NewUserGetHandler ¶
func NewUserGetHandler( txm port.TransactionManager, userInteractor interactor.UserInteractor, ) *UserGetHandler
func (*UserGetHandler) Handle ¶
func (h *UserGetHandler) Handle(gc *gin.Context)
type UserGetRequest ¶
type UserGetRequest struct {
ID string `json:"id" uri:"id" binding:"required"`
}
Get user
type UserGetResponse ¶
type UserGetResponse struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` }
Get user
type UserUpdateHandler ¶
type UserUpdateHandler struct {
// contains filtered or unexported fields
}
Update user
func NewUserUpdateHandler ¶
func NewUserUpdateHandler( txm port.TransactionManager, userInteractor interactor.UserInteractor, ) *UserUpdateHandler
func (*UserUpdateHandler) Handle ¶
func (h *UserUpdateHandler) Handle(gc *gin.Context)
type UserUpdateRequest ¶
type UserUpdateRequest struct { ID string `json:"id" uri:"id" binding:"required"` Name string `json:"name" form:"name" binding:"required"` Email string `json:"email" form:"email" binding:"required"` }
Update user
type UserUpdateResponse ¶
type UserUpdateResponse struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` }
Update user
Click to show internal directories.
Click to hide internal directories.