requests

package
v0.53.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegisterAdminRequest added in v0.2.0

type RegisterAdminRequest struct {
	FullName string `json:"full_name" validate:"required,min=4,max=255"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8,max=255,secure_password"`
}

func (*RegisterAdminRequest) ToDTO added in v0.2.0

func (request *RegisterAdminRequest) ToDTO() *dtos.RegisterUserDTO

type RegisterTeacherRequest added in v0.5.0

type RegisterTeacherRequest struct {
	FullName string `json:"full_name" validate:"required,min=4,max=255"`
	Email    string `json:"email" validate:"required,email,institutional_email"`
	Password string `json:"password" validate:"required,min=8,max=255,secure_password"`
}

func (*RegisterTeacherRequest) ToDTO added in v0.5.0

func (request *RegisterTeacherRequest) ToDTO() *dtos.RegisterUserDTO

type RegisterUserRequest

type RegisterUserRequest struct {
	FullName        string `json:"full_name" validate:"required,min=4,max=255"`
	Email           string `json:"email" validate:"required,email,institutional_email"`
	InstitutionalId string `json:"institutional_id" validate:"required,numeric,min=6,max=9"`
	Password        string `json:"password" validate:"required,min=8,max=255,secure_password"`
}

func (*RegisterUserRequest) ToDTO

func (request *RegisterUserRequest) ToDTO() *dtos.RegisterUserDTO

type UpdateAdminProfileRequest added in v0.48.0

type UpdateAdminProfileRequest struct {
	FullName string `json:"full_name" validate:"required,min=4,max=255"`
	// Admins doesn't require institutional email
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

UpdateAdminProfileRequest request with specific validations to update an admin profile

type UpdatePasswordRequest added in v0.46.0

type UpdatePasswordRequest struct {
	OldPassword string `json:"old_password" validate:"required"`
	NewPassword string `json:"new_password" validate:"required,min=8,max=255,secure_password"`
}

type UpdateStudentProfileRequest added in v0.48.0

type UpdateStudentProfileRequest struct {
	FullName string `json:"full_name" validate:"required,min=4,max=255"`
	// Students does require institutional email
	Email string `json:"email" validate:"required,email,institutional_email"`
	// Students does require institutional id
	InstitutionalId *string `json:"institutional_id" validate:"required,numeric,min=6,max=9"`
	// We don't add extra validations to the password field to avoid giving hints to attackers
	Password string `json:"password" validate:"required"`
}

UpdateStudentProfileRequest request with specific validations to update a student profile

type UpdateTeacherProfileRequest added in v0.48.0

type UpdateTeacherProfileRequest struct {
	FullName string `json:"full_name" validate:"required,min=4,max=255"`
	// Teachers does require institutional email
	Email    string `json:"email" validate:"required,email,institutional_email"`
	Password string `json:"password" validate:"required"`
}

UpdateTeacherProfileRequest request with specific validations to update a teacher profile

Jump to

Keyboard shortcuts

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