Documentation
¶
Overview ¶
Package models provides model structs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invite ¶
type Privileges ¶
type Privileges struct {
ID uint `json:"-"`
RoleID uint `json:"-"`
CanCreateServer bool `json:"canCreateServer"`
CanDeleteServer bool `json:"canDeleteServer"`
CanEditServer bool `json:"canEditServer"`
CanSeeAllServers bool `json:"canSeeAllServers"`
CanCreateRoom bool `json:"canCreateRoom"`
CanDeleteRoom bool `json:"canDeleteRoom"`
CanEditRoom bool `json:"canEditRoom"`
CanCreateInvite bool `json:"canCreateInvite"`
CanDeleteInvite bool `json:"canDeleteInvite"`
CanKickUserFromRoom bool `json:"canKickUserFromRoom"`
CanKickUserFromServer bool `json:"canKickUserFromServer"`
CanBanUserFromRoom bool `json:"canBanUserFromRoom"`
CanBanUserFromServer bool `json:"canBanUserFromServer"`
CanCreateRole bool `json:"canCreateRole"`
CanDeleteRole bool `json:"canDeleteRole"`
CanAssignRoleToUser bool `json:"canAssignRoleToUser"`
CanRemoveRoleFromUser bool `json:"canRemoveRoleRromUser"`
}
Privileges manages privileges which each role has
type PublicUser ¶
type PublicUser struct {
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
PublicKey string `json:"publickey"`
}
func (*PublicUser) IsInvalid ¶
func (u *PublicUser) IsInvalid() bool
IsEmpty returns if some or all values are empty
func (*PublicUser) IsLoginEmpty ¶
func (u *PublicUser) IsLoginEmpty() bool
IsLoginEmpty returns if all required data is set to login a user (username and password)
type Role ¶
type Role struct {
ID uint `json:"-"`
Name string `json:"name"`
Description string `json:"description"`
Privileges Privileges `json:"privileges"`
}
Role specifies a role which is used for rights management
type Room ¶
type Server ¶
type User ¶
type User struct {
Username string `json:"username" db:"username"`
Password string `json:"-" db:"password"`
Email null.String `json:"email" db:"email"`
PublicKey string `json:"-" db:"publickey"`
TwoFASecret null.String `json:"-" db:"twofa_secret"`
TwoFAVerify null.String `json:"-" db:"twofa_verify"`
}
Source Files
¶
- doc.go
- invite.go
- room.go
- server.go
- user.go
Click to show internal directories.
Click to hide internal directories.