event

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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