Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Slug string `json:"slug"` Title string `json:"title"` Description string `json:"description"` Body string `json:"body"` TagList []string `json:"tagList"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Favorited bool `json:"favorited"` FavoritesCount int `json:"favoritesCount"` Author Author `json:"author"` }
type ArticleRequest ¶
type ArticleResponse ¶
type ArticleResponse struct {
Article *Article `json:"article"`
}
type ArticlesResponse ¶
type ArticlesResponse struct {
Articles Articles `json:"articles"`
}
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
User LoginUser `json:"user"`
}
LoginResponse is the response of login request
type RefreshTokenResponse ¶
type RefreshTokenResponse struct { AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` }
RefreshTokenResponse is the response of refresh token request
type UserRequest ¶
type UserRequest struct { User struct { Name string `form:"username" json:"username" binding:"exists,min=4,max=255"` Email string `form:"email" json:"email" binding:"exists,email"` Password string `form:"password" json:"password" binding:"exists,min=8,max=255"` Bio string `json:"bio"` Image string `json:"image"` } `json:"user"` }
Click to show internal directories.
Click to hide internal directories.