Documentation ¶
Index ¶
- type Todo
- type TodoDao
- func (d *TodoDao) CreateInstance(todo *Todo) error
- func (d *TodoDao) DeleteInstance(userId, id int64) error
- func (d *TodoDao) RetrieveInstance(userId, id int64) (*Todo, error)
- func (d *TodoDao) RetrieveInstances(userIds []int64) ([]*Todo, error)
- func (d *TodoDao) UpdateInstance(userId, id int64, content string) error
- type User
- type UserDao
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Todo ¶
type Todo struct { ID int64 `json:"id" gorm:"column:id;primarykey"` UserId int64 `json:"user_id" gorm:"column:user_id"` Content string `json:"content" gorm:"column:content"` Completed bool `json:"completed" gorm:"column:completed;default:false"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"` DeletedAt gorm.DeletedAt `json:"-" gorm:"column:deleted_at;index"` }
type TodoDao ¶
type TodoDao struct {
// contains filtered or unexported fields
}
func (*TodoDao) CreateInstance ¶
func (*TodoDao) DeleteInstance ¶
func (*TodoDao) RetrieveInstance ¶
func (*TodoDao) RetrieveInstances ¶
type User ¶
type User struct { ID int64 `json:"id" gorm:"column:id;primarykey"` Username string `json:"username" gorm:"column:username;unique"` Password string `json:"-" gorm:"column:password"` Email string `json:"email" gorm:"column:email;unique"` Avatar string `json:"avatar" gorm:"column:avatar"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"` DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at;index"` }
type UserDao ¶
type UserDao struct {
// contains filtered or unexported fields
}
func (*UserDao) CreateInstance ¶
func (*UserDao) RetrieveInstance ¶
func (*UserDao) RetrieveInstances ¶
func (*UserDao) UpdateInstanceOfPassword ¶
Click to show internal directories.
Click to hide internal directories.