Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Delete(ctx context.Context, pk uuid.UUID, owner uuid.UUID) error Get(ctx context.Context, pk uuid.UUID, owner uuid.UUID) (*Tag, error) Save(ctx context.Context, tag *Tag) error Query(ctx context.Context, filters *rest.Query) ([]Tag, error) }
Repository defines methods to manipute user entry's tags
type Tag ¶
type Tag struct { UUID uuid.UUID `gorm:"type:uuid;primaryKey" json:"uuid" binding:"-"` CreatedAt time.Time `json:"createdAt" binding:"-"` UpdatedAt time.Time `json:"updatedAt" binding:"-"` DeletedAt gorm.DeletedAt `json:"-" binding:"-"` Name string `json:"name" binding:"required"` Description string `json:"description" ` Owner uuid.UUID `gorm:"index:tag_owner;not null" json:"-" ` }
Tag to iterate with database
func (*Tag) BeforeCreate ¶
BeforeCreate execute commands before creating a Tag
Click to show internal directories.
Click to hide internal directories.