event

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateUUID

func ValidateUUID() func(fl validator.FieldLevel) bool

func ValidateUsername

func ValidateUsername() func(fl validator.FieldLevel) bool

Types

type StudentCreateRequest

type StudentCreateRequest struct {
	FirstName        string `json:"first_name,omitempty" validate:"required,min=4,max=30"`
	LastName         string `json:"last_name,omitempty" validate:"required,min=4,max=30"`
	MiddleName       string `json:"middle_name,omitempty" validate:"max=30"`
	EducationalEmail string `json:"educational_email,omitempty" validate:"required,email"`
	Username         string `json:"username,omitempty" validate:"required,min=4,max=30,username"`
	GroupId          string `json:"group_id,omitempty" validate:"required,uuid"`
}

func (*StudentCreateRequest) Validate

func (request *StudentCreateRequest) Validate() error

type StudentCreateResponse

type StudentCreateResponse struct {
	CreatedStudentID string `json:"created_student_id,omitempty"`
}

type TeacherCreateRequest

type TeacherCreateRequest struct {
	FirstName   string `json:"first_name,omitempty" validate:"required,min=4,max=30"`
	LastName    string `json:"last_name,omitempty" validate:"required,min=4,max=30"`
	MiddleName  string `json:"middle_name,omitempty" validate:"max=30"`
	ReportEmail string `json:"report_email,omitempty" validate:"required,email"`
	Username    string `json:"username,omitempty" validate:"required,min=4,max=30"`
}

func (*TeacherCreateRequest) Validate

func (request *TeacherCreateRequest) Validate() error

type TeacherCreateResponse

type TeacherCreateResponse struct {
	CreatedTeacherID string `json:"created_teacher_id,omitempty"`
}

Jump to

Keyboard shortcuts

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