Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidGroupType = errors.New("invalid group type") ErrInvalidRole = errors.New("invalid role") )
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
ID string `json:"id"`
Name string `json:"name"`
TenantId string `json:"tenant" default:"default"`
Description string `json:"description"`
Type GroupType `json:"type" default:"local"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Group represents a group of users.
type GroupType ¶
type GroupType int
func ParseGroupType ¶
ParseGroupType converts a string to a GroupType.
func (GroupType) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*GroupType) UnmarshalJSON ¶
UnmarshalJSON unmarshals a quoted json string to the enum value
type GroupUser ¶
type GroupUser struct {
ID string `json:"id"`
Role Role `json:"role"`
TenantId string `json:"tenant" default:"default"`
}
GroupUser represents a user's membership in a group.
type Role ¶
type Role int
func (Role) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Role) UnmarshalJSON ¶
UnmarshalJSON unmarshals a quoted json string to the enum value
Click to show internal directories.
Click to hide internal directories.