18 lines
529 B
Go
18 lines
529 B
Go
package api
|
|
|
|
type bookPostCreate struct {
|
|
Title string `json:"title" binding:"required,max=300"`
|
|
Author string `json:"author" binding:"max=100"`
|
|
Rating int `json:"rating" binding:"min=0,max=10"`
|
|
}
|
|
|
|
type userSignup struct {
|
|
Username string `json:"username" binding:"required,min=2,max=20"`
|
|
Password string `json:"password" binding:"required,min=6,max=100"`
|
|
}
|
|
|
|
type userLogin struct {
|
|
Username string `json:"username" binding:"required,min=2,max=20"`
|
|
Password string `json:"password" binding:"required,min=6,max=100"`
|
|
}
|