Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryData ¶
type CategoryData struct { ID int `json:"id"` Type string `json:"type"` Tasks []Task `json:"tasks"` }
func DataToCategoryData ¶
func DataToCategoryData(categories []Category, tasks []Task) []CategoryData
type CategoryRequest ¶
type CategoryRequest struct {
Type string `json:"type" binding:"required"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
func NewErrorResponse ¶
func NewErrorResponse(msg string) ErrorResponse
type Task ¶
type Task struct { ID int `gorm:"primaryKey" json:"id"` Title string `json:"title" gorm:"type:varchar(255);not null"` Description string `json:"description" gorm:"type:text;not null"` CategoryID int `json:"category_id" gorm:"type:int;not null"` UserID int `json:"user_id" gorm:"type:int;not null"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at"` }
type TaskCategoryRequest ¶
type TaskRequest ¶
type User ¶
type User struct { ID int `gorm:"primaryKey" json:"id"` Fullname string `json:"fullname" gorm:"type:varchar(255);not null"` Email string `json:"email" gorm:"type:varchar(255);not null"` Password string `json:"-" gorm:"type:varchar(255);not null"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type UserRegister ¶
Click to show internal directories.
Click to hide internal directories.