Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct { Id Type.GormUlid `json:"id" gorm:"primaryKey;size:26;not null"` Name string `json:"name"` Description string `json:"description"` CreatedAt time.Time `json:"created_at"` ModifiedAt time.Time `json:"modified_at"` }
func Define ¶
func Define(id ulid.ULID, name string, description string) *Permission
func (*Permission) UpdateDescription ¶
func (p *Permission) UpdateDescription(description string)
func (*Permission) UpdateName ¶
func (p *Permission) UpdateName(name string)
type PermissionRepository ¶
type PermissionRepository interface { GetById(id ulid.ULID) (*Permission, error) GetByName(name string) (*Permission, error) // TODO: Include pagination GetAll() (*[]Permission, error) Add(permission *Permission) error Remove(permission *Permission) error UpdateOrAdd(permission *Permission) error }
Click to show internal directories.
Click to hide internal directories.