Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bucketlist ¶
type Bucketlist struct { gorm.Model Name string `json:"name"` CreatedBy string `json:"created_by"` UserID uint `json:"user_id"` Item []BucketlistItem `json:"item,omitempty"` }
Bucketlist field (Model) defined
func GetAllBucketlist ¶
func GetAllBucketlist(user uint) []*Bucketlist
GetAllBucketlist function defined
func UpdateBucketlist ¶
func UpdateBucketlist(id uint, name string) *Bucketlist
UpdateBucketlist by ID functio defined
func (*Bucketlist) AfterDelete ¶
func (bucketlist *Bucketlist) AfterDelete(tx *gorm.DB) (err error)
AfterDelete hook defined for cascade delete
func (*Bucketlist) Create ¶
func (bucketlist *Bucketlist) Create() map[string]interface{}
Create a bucketlist function defined
type BucketlistItem ¶
type BucketlistItem struct { gorm.Model Name string `json:"name"` Done bool `json:"done"` BucketlistID uint `json:"bucketlist_id,omitempty"` }
BucketlistItem field (Model) defined
func GetBucketItem ¶
func GetBucketItem(id uint) *BucketlistItem
GetBucketItem by ID function defined
func UpdateBucketItem ¶
func UpdateBucketItem(id uint, name string, done bool) *BucketlistItem
UpdateBucketItem by ID functio defined
func (*BucketlistItem) Create ¶
func (bucketlistItem *BucketlistItem) Create() map[string]interface{}
Create method for Bucketlist defined
type Token ¶
type Token struct { UserID uint Email string jwt.StandardClaims }
Token JWT claims struct
func GenerateUserClaims ¶
GenerateUserClaims function defined get new claim
Click to show internal directories.
Click to hide internal directories.