Documentation
¶
Index ¶
- type JWTClaims
- type JWTResponse
- type LoginRequest
- type LoginResponse
- type Pagination
- type PaginationParam
- type PostPaginationResponse
- type PostQueryParam
- type PostRequest
- type PostResponse
- type PostUpdateRequest
- type PostUserResponse
- type ProfileResponse
- type RegisterRequest
- type RegisterResponse
- type UserPaginationResponse
- type UserQueryParam
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTResponse ¶
type JWTResponse struct {
Access string `json:"access" validate:"required"`
}
func (*JWTResponse) Serializer ¶
func (r *JWTResponse) Serializer(access string)
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Access string `json:"access"`
}
func (*LoginResponse) Serializer ¶
func (r *LoginResponse) Serializer(access string)
type Pagination ¶
type PaginationParam ¶
type PostPaginationResponse ¶
type PostPaginationResponse struct {
List []PostResponse `json:"list"`
Pagination *Pagination `json:"pagination"`
}
func (*PostPaginationResponse) Serializer ¶
func (p *PostPaginationResponse) Serializer(posts *models.Posts)
type PostQueryParam ¶
type PostQueryParam struct {
PaginationParam
}
type PostRequest ¶
type PostResponse ¶
type PostResponse struct {
ID uint `json:"id"`
Title string `json:"title"`
Body string `json:"body"`
User PostUserResponse `json:"user"`
}
func (*PostResponse) Serializer ¶
func (p *PostResponse) Serializer(post *models.Post)
type PostUpdateRequest ¶
type PostUserResponse ¶
type ProfileResponse ¶
type RegisterRequest ¶
type RegisterResponse ¶
func (*RegisterResponse) Serializer ¶
func (r *RegisterResponse) Serializer(user *models.User)
type UserPaginationResponse ¶
type UserPaginationResponse struct {
List []UserResponse `json:"list"`
Pagination *Pagination `json:"pagination"`
}
func (*UserPaginationResponse) Serializer ¶
func (p *UserPaginationResponse) Serializer(users *models.Users)
type UserQueryParam ¶
type UserQueryParam struct {
PaginationParam
}
type UserResponse ¶
type UserResponse struct {
Username string `json:"username"`
Email string `json:"email"`
Profile ProfileResponse `json:"profile"`
}
func (*UserResponse) Serializer ¶
func (r *UserResponse) Serializer(user *models.User)
Click to show internal directories.
Click to hide internal directories.