Documentation ¶
Index ¶
- func DeleteCookie(ctx *gin.Context, name string)
- type SessionData
- type Whitelist
- func (w *Whitelist) AddGeneralUser(email string)
- func (w *Whitelist) AdminEmails() []string
- func (w *Whitelist) EmailDomains() []string
- func (w *Whitelist) GeneralEmails() []string
- func (w *Whitelist) IsAdminUser(email string) bool
- func (w *Whitelist) IsDomainUser(email string) bool
- func (w *Whitelist) IsGeneralUser(email string) bool
- func (w *Whitelist) IsUser(email string) bool
- func (w *Whitelist) Users() []string
- type WhitelistInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCookie ¶
Types ¶
type SessionData ¶
type SessionData struct { SessionUUID string `json:"session_uuid"` UserUUID string `json:"user_uuid"` Email string `json:"email"` Name string `json:"name"` Role string `json:"role"` AvatarURL string `json:"avatar"` }
func ByteSliceToSessionData ¶
func ByteSliceToSessionData(b []byte) (*SessionData, error)
func NewSessionData ¶
func NewSessionData(sessionUUID, userUUID, email, name, role, avatarURL string) *SessionData
type Whitelist ¶
type Whitelist struct {
// contains filtered or unexported fields
}
func (*Whitelist) AddGeneralUser ¶
func (*Whitelist) AdminEmails ¶
func (*Whitelist) EmailDomains ¶
func (*Whitelist) GeneralEmails ¶
func (*Whitelist) IsAdminUser ¶
func (*Whitelist) IsDomainUser ¶
func (*Whitelist) IsGeneralUser ¶
type WhitelistInfo ¶
type WhitelistInfo interface { Users() []string GeneralEmails() []string AdminEmails() []string EmailDomains() []string IsUser(email string) bool IsDomainUser(email string) bool IsGeneralUser(email string) bool IsAdminUser(email string) bool AddGeneralUser(email string) }
func NewWhitelist ¶
func NewWhitelist(userRepo repos.UserRepo) (WhitelistInfo, error)
Click to show internal directories.
Click to hide internal directories.