Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { ID uuid.UUID `db:"id" json:"id" validate:"uuid"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt *time.Time `db:"updated_at" json:"updated_at"` IsDeleted bool `db:"is_deleted" json:"is_deleted"` UserID int `db:"user_id" json:"user_id" validate:"required"` Title string `db:"title" json:"title" validate:"required,lte=255"` Author string `db:"author" json:"author" validate:"required,lte=255"` Status int `db:"status" json:"status" validate:"required,len=1"` Meta Meta `db:"meta" json:"meta" validate:"required,dive"` }
Book struct to describe book object.
type CreateUser ¶
type CreateUser struct { IsAdmin bool `json:"is_admin"` IsActive bool `json:"is_active"` UserName string `json:"username" validate:"required,lte=50,gte=5"` Email string `json:"email" validate:"required,email,lte=150"` Password string `json:"password" validate:"required,lte=100,gte=10"` FirstName string `json:"first_name" validate:"required,lte=100"` LastName string `json:"last_name" validate:"required,lte=100"` }
type Meta ¶
type Meta struct { Picture string `json:"picture"` Description string `json:"description"` Rating int `json:"rating" validate:"min=1,max=10"` }
Meta struct to describe book attributes.
type UpdateUser ¶
type User ¶
type User struct { ID int `db:"id"` CreatedAt time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` IsActive bool `db:"is_active"` IsDeleted bool `db:"is_deleted"` IsAdmin bool `db:"is_admin"` UserName string `db:"username"` Email string `db:"email"` Password string `db:"password"` FirstName string `db:"first_name"` LastName string `db:"last_name"` }
User struct to describe User object.
Click to show internal directories.
Click to hide internal directories.