Documentation ¶
Index ¶
Constants ¶
View Source
const ( TeacherAccountType = AccountType("TEACHER") StudentAccountType = AccountType("STUDENT") )
Variables ¶
This section is empty.
Functions ¶
func ValidateAccountType ¶
func ValidateAccountType() func(fl validator.FieldLevel) bool
func ValidatePassword ¶
func ValidatePassword() func(fl validator.FieldLevel) bool
func ValidateUsername ¶
func ValidateUsername() func(fl validator.FieldLevel) bool
Types ¶
type AccountType ¶
type AccountType string
type CredentialsCreateRequest ¶
type CredentialsCreateRequest struct { Username string `json:"username" validate:"required,min=4,max=30,username"` Password string `json:"password" validate:"required,min=8,max=30,password"` AccountType AccountType `json:"account_type" validate:"required,accountType"` }
func (*CredentialsCreateRequest) Validate ¶
func (request *CredentialsCreateRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.