code

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package code defines the base errors with corresponding error code.

Index

Constants

View Source
const (
	// ErrSuccess - 200: OK.
	ErrSuccess int = iota + 100001

	// ErrUnknown - 500: Internal server error.
	ErrUnknown

	// ErrBadParams - 400: Bad request parameters.
	ErrBadParams

	// ErrPageNotFound - 404: Not found.
	ErrNotFound
)

Common: basic errors (1000xx).

View Source
const (
	// ErrPasswordInvalid - 401: Password invalid.
	ErrPasswordInvalid int = iota + 100101

	// ErrHeaderInvalid - 401: Authorization header invalid.
	ErrHeaderInvalid

	// ErrSignatureInvalid - 401: Signature invalid.
	ErrSignatureInvalid

	// ErrTokenInvalid - 401: Token invalid.
	ErrTokenInvalid

	// ErrTokenExpired - 401: Token expired.
	ErrTokenExpired

	// PermissionDenied - 403: Permission denied.
	ErrPermissionDenied
)

common: authorization / authentication errors (1001xx).

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

common: database errors (1002xx).

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