Documentation ¶
Index ¶
- func UploadHandler() gin.HandlerFunc
- type ActivationData
- type ArticleCreatePayload
- type ArticleHandlerV1
- type ArticleUpdatePayload
- type CategoryCreatePayload
- type CategoryHandlerV1
- type CommentHandlerV1
- type CommentPayload
- type LogHandlerV1
- type LoginPayload
- type RegisterPayload
- type UserHandlerV1
- func (u *UserHandlerV1) ActivationHandler() gin.HandlerFunc
- func (UserHandlerV1) Auth() gin.HandlerFunc
- func (UserHandlerV1) ChangeUserInfo() gin.HandlerFunc
- func (UserHandlerV1) CheckEmail() gin.HandlerFunc
- func (UserHandlerV1) CheckUsername() gin.HandlerFunc
- func (UserHandlerV1) GetToken() gin.HandlerFunc
- func (UserHandlerV1) GetUserFromID() gin.HandlerFunc
- func (UserHandlerV1) GetUserFromUsername() gin.HandlerFunc
- func (u *UserHandlerV1) Register() gin.HandlerFunc
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UploadHandler ¶
func UploadHandler() gin.HandlerFunc
Types ¶
type ActivationData ¶
type ArticleCreatePayload ¶
type ArticleCreatePayload struct { Title string `json:"title" validate:"required"` Content string `json:"content" validate:"required"` CategoryID int `json:"category_id" validate:"required"` Status models.StatusArticle `json:"status" validate:"required"` }
type ArticleHandlerV1 ¶
type ArticleHandlerV1 struct{}
func NewArticleHandlerV1 ¶
func NewArticleHandlerV1() ArticleHandlerV1
func (ArticleHandlerV1) Create ¶
func (ArticleHandlerV1) Create() gin.HandlerFunc
func (ArticleHandlerV1) Delete ¶
func (ArticleHandlerV1) Delete() gin.HandlerFunc
func (ArticleHandlerV1) Detail ¶
func (ArticleHandlerV1) Detail() gin.HandlerFunc
func (ArticleHandlerV1) Get ¶
func (ArticleHandlerV1) Get() gin.HandlerFunc
func (ArticleHandlerV1) Update ¶
func (ArticleHandlerV1) Update() gin.HandlerFunc
type ArticleUpdatePayload ¶
type ArticleUpdatePayload struct { Title string `json:"title" ` Content string `json:"content"` CategoryID int `json:"category_id"` Status models.StatusArticle `json:"status"` }
type CategoryCreatePayload ¶
type CategoryHandlerV1 ¶
type CategoryHandlerV1 struct{}
func NewCategoryHandlerV1 ¶
func NewCategoryHandlerV1() CategoryHandlerV1
func (CategoryHandlerV1) Create ¶
func (CategoryHandlerV1) Create() gin.HandlerFunc
func (CategoryHandlerV1) Delete ¶
func (CategoryHandlerV1) Delete() gin.HandlerFunc
func (CategoryHandlerV1) Detail ¶
func (CategoryHandlerV1) Detail() gin.HandlerFunc
func (CategoryHandlerV1) Get ¶
func (CategoryHandlerV1) Get() gin.HandlerFunc
func (CategoryHandlerV1) Update ¶
func (CategoryHandlerV1) Update() gin.HandlerFunc
type CommentHandlerV1 ¶
type CommentHandlerV1 struct{}
func NewCommentHandlerV1 ¶
func NewCommentHandlerV1() CommentHandlerV1
func (CommentHandlerV1) Create ¶
func (CommentHandlerV1) Create() gin.HandlerFunc
func (CommentHandlerV1) Delete ¶
func (CommentHandlerV1) Delete() gin.HandlerFunc
func (CommentHandlerV1) Detail ¶
func (CommentHandlerV1) Detail() gin.HandlerFunc
func (CommentHandlerV1) Get ¶
func (CommentHandlerV1) Get() gin.HandlerFunc
func (CommentHandlerV1) Update ¶
func (CommentHandlerV1) Update() gin.HandlerFunc
type CommentPayload ¶
type CommentPayload struct {
Text string `json:"text" validate:"required"`
}
type LogHandlerV1 ¶
type LogHandlerV1 struct{}
func NewLogHandlerV1 ¶
func NewLogHandlerV1() LogHandlerV1
func (LogHandlerV1) Get ¶
func (LogHandlerV1) Get() gin.HandlerFunc
type LoginPayload ¶
type RegisterPayload ¶
type RegisterPayload struct { FirstName string `json:"first_name" validate:"required,max=50"` LastName string `json:"last_name" validate:"required,max=50"` Username string `json:"username" validate:"required,max=50"` Email string `json:"email" validate:"required,email"` Password string `json:"password" validate:"required,min=5,max=15"` }
type UserHandlerV1 ¶
type UserHandlerV1 struct{}
func NewUserHandlerV1 ¶
func NewUserHandlerV1() UserHandlerV1
func (*UserHandlerV1) ActivationHandler ¶
func (u *UserHandlerV1) ActivationHandler() gin.HandlerFunc
ActivationHandler is function to handle activation code to user.
func (UserHandlerV1) Auth ¶
func (UserHandlerV1) Auth() gin.HandlerFunc
func (UserHandlerV1) ChangeUserInfo ¶
func (UserHandlerV1) ChangeUserInfo() gin.HandlerFunc
func (UserHandlerV1) CheckEmail ¶
func (UserHandlerV1) CheckEmail() gin.HandlerFunc
func (UserHandlerV1) CheckUsername ¶
func (UserHandlerV1) CheckUsername() gin.HandlerFunc
func (UserHandlerV1) GetToken ¶
func (UserHandlerV1) GetToken() gin.HandlerFunc
func (UserHandlerV1) GetUserFromID ¶
func (UserHandlerV1) GetUserFromID() gin.HandlerFunc
func (UserHandlerV1) GetUserFromUsername ¶
func (UserHandlerV1) GetUserFromUsername() gin.HandlerFunc
func (*UserHandlerV1) Register ¶
func (u *UserHandlerV1) Register() gin.HandlerFunc
type Validation ¶
Click to show internal directories.
Click to hide internal directories.