Documentation ¶
Index ¶
- func DeleteCookie(ctx *gin.Context, name string)
- func ToUserInfoResponse(users []usermodels.UserInfo) []usermodels.UserResponse
- func ValidateToAchievementArgs(models []clubmodels.AchievementRequest) []string
- func ValidateToActivityDetailArgs(models []clubmodels.ActivityDetailRequest) []repos.ActivityDetailArgs
- func ValidateToContentArgs(models []clubmodels.ContentRequest) []string
- func ValidateToImageArgs(models []clubmodels.ImageRequest) []uint32
- func ValidateToLinksArgs(models []clubmodels.LinkRequest) []repos.ClubLinkArgs
- func ValidateToPlaceArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubPlaceArgs
- func ValidateToScheduleArgs(models []clubmodels.ScheduleRequest) []repos.ClubScheduleArgs
- func ValidateToTPRemarkArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubTPRemarkArgs
- func ValidateToTimeArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubTimeArgs
- func ValidateToVideoArgs(models []clubmodels.VideoRequest) []string
- type IGeneralUserGetter
- 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 ¶
func ToUserInfoResponse ¶ added in v0.1.3
func ToUserInfoResponse(users []usermodels.UserInfo) []usermodels.UserResponse
func ValidateToAchievementArgs ¶ added in v0.1.3
func ValidateToAchievementArgs(models []clubmodels.AchievementRequest) []string
func ValidateToActivityDetailArgs ¶ added in v0.1.3
func ValidateToActivityDetailArgs(models []clubmodels.ActivityDetailRequest) []repos.ActivityDetailArgs
func ValidateToContentArgs ¶ added in v0.1.3
func ValidateToContentArgs(models []clubmodels.ContentRequest) []string
func ValidateToImageArgs ¶ added in v0.1.3
func ValidateToImageArgs(models []clubmodels.ImageRequest) []uint32
func ValidateToLinksArgs ¶ added in v0.1.3
func ValidateToLinksArgs(models []clubmodels.LinkRequest) []repos.ClubLinkArgs
func ValidateToPlaceArgs ¶ added in v0.1.3
func ValidateToPlaceArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubPlaceArgs
func ValidateToScheduleArgs ¶ added in v0.1.3
func ValidateToScheduleArgs(models []clubmodels.ScheduleRequest) []repos.ClubScheduleArgs
func ValidateToTPRemarkArgs ¶ added in v0.1.3
func ValidateToTPRemarkArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubTPRemarkArgs
func ValidateToTimeArgs ¶ added in v0.1.3
func ValidateToTimeArgs(models []clubmodels.ActivityDetailRequest) []repos.ClubTimeArgs
func ValidateToVideoArgs ¶ added in v0.1.3
func ValidateToVideoArgs(models []clubmodels.VideoRequest) []string
Types ¶
type IGeneralUserGetter ¶ added in v0.1.3
type IGeneralUserGetter interface {
GetAllGeneralUser() ([]models.GeneralUser, error)
}
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(getterFn IGeneralUserGetter) (WhitelistInfo, error)
Click to show internal directories.
Click to hide internal directories.