common

package
v0.0.0-...-0953be8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Genders = []string{"male", "female", "human"}

Genders represents a user's gender

Functions

This section is empty.

Types

type SemesterKey

type SemesterKey string

SemesterKey represents a semester identifier

type UserWhitelistItem

type UserWhitelistItem struct {
	MailPrefixPattern string `yaml:"prefix-pattern"`
	MailPrefixDisplay string `yaml:"prefix-display"`
	MailSuffixPattern string `yaml:"suffix-pattern"`
	MailSuffixDisplay string `yaml:"suffix-display"`
	PasswordPattern   string `yaml:"password-pattern"`
	// contains filtered or unexported fields
}

UserWhitelistItem is used to specify a set of requirements which a user has to fulfil in order to register

func (*UserWhitelistItem) MailDomainRegex

func (u *UserWhitelistItem) MailDomainRegex() *regexp.Regexp

MailDomainRegex returns the regex to validate the everything after the @-sign of a user's email address

func (*UserWhitelistItem) MailLocalPartRegex

func (u *UserWhitelistItem) MailLocalPartRegex() *regexp.Regexp

MailLocalPartRegex returns the regex to validate the everything before the @-sign of a user's email address

func (*UserWhitelistItem) PasswordRegex

func (u *UserWhitelistItem) PasswordRegex() *regexp.Regexp

PasswordRegex returns the regex to validate a user's chosen password

func (*UserWhitelistItem) Validate

func (u *UserWhitelistItem) Validate() error

Validate checks whether the current item contains valid regexes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL