Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Permission ¶
type Role ¶
type Role struct { ID int64 Title string Description sql.NullString IsDefault bool Created time.Time Modified time.Time // contains filtered or unexported fields }
func (*Role) Permissions ¶
func (r *Role) Permissions(ctx context.Context) (_ []*Permission, err error)
Fetch the roles permissions; if they're already cached on the role they're returned directly, otherwise the database is queried to populate the permissions.
type User ¶
type User struct { ID int64 Name sql.NullString Email string Password string RoleID sql.NullInt64 LastLogin sql.NullTime Created time.Time Modified time.Time // contains filtered or unexported fields }
func (*User) Permissions ¶
func (u *User) Permissions(ctx context.Context) (_ []*Permission, err error)
Click to show internal directories.
Click to hide internal directories.