code

package
v0.0.0-...-6d5e59d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ErrUserNotFound - 404: User not found.
	ErrUserNotFound = iota + 200001

	// ErrTokenNotExisted - 404: Token not existed.
	ErrTokenNotExisted

	// ErrCodeNotExisted - 404: Code not existed.
	ErrCodeNotExisted

	// ErrPasswordRequired - 200: Password does not meet requirements
	ErrPasswordRequired

	// ErrEmailRequired - 200: Email does not meet requirements
	ErrEmailRequired

	// ErrUserAlreadyExisted - 200: User already existed
	ErrUserAlreadyExisted

	// ErrSendEmail -500: Send email failed
	ErrSendEmail

	// ErrPassword -200: Error password
	ErrPassword

	// ErrGetToken -400: Get Token from head failed.
	ErrGetToken

	// ErrGetTokenFromCtx -500: Get Token from context failed
	ErrGetTokenFromCtx

	// ErrGetUserIDFromCtx -500: Get User ID from context failed
	ErrGetUserIDFromCtx

	// ErrPasswordTooShort -200: Password is shorter than 8.
	ErrPasswordTooShort

	// ErrPasswordTooLong -200: Password is longer than 26.
	ErrPasswordTooLong

	// ErrPasswordTooSimple -200: The kind of character in password is less than 2.
	ErrPasswordTooSimple
)

User

View Source
const (
	// ErrTypeAssertion -500: Type assertion error
	ErrTypeAssertion int = iota + 100101

	// ErrTypeTransform -500: Type transform error
	ErrTypeTransform
)

Type Transform

View Source
const (
	// ErrBind -400: Error occurred while binding the request body to the struct.
	ErrBind int = iota + 100201

	// ErrGetFormFile -400: Can not get post form file
	ErrGetFormFile

	// ErrSaveUploadFile -500: Can not save the upload file
	ErrSaveUploadFile
)

Gin Server

View Source
const (
	// ErrDatabase - 500: Database error
	ErrDatabase int = iota + 100001
)

Database

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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