er

package
v0.0.0-...-7208f07 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingToken means missing jwt in header
	ErrMissingToken = er.NewAPPError(http.StatusUnauthorized, 40100, "missing jwt token")

	// ErrAuthHeaderFormat means must provide Authorization header with format `Bearer {jwt}`
	ErrAuthHeaderFormat = er.NewAPPError(http.StatusUnauthorized, 40101, "Must provide Authorization header with format `Bearer {jwt}`")

	// ErrExpiredToken means jwt is expired
	ErrExpiredToken = er.NewAPPError(http.StatusUnauthorized, 40102, "jwt is expired")

	// ErrInvalidToken means jwt is invalid
	ErrInvalidToken = er.NewAPPError(http.StatusUnauthorized, 40103, "jwt is invalid")
)
View Source
var (
	// ErrExchangeByCode means Exchange by code is failure.
	ErrExchangeByCode = er.NewAPPError(http.StatusInternalServerError, 50010, "Exchange by code is failure.")

	// ErrVerifyIDToken means Verify id token is failure.
	ErrVerifyIDToken = er.NewAPPError(http.StatusInternalServerError, 50011, "Verify id token is failure.")

	// ErrIDTokenClaims means ID token claims is failure.
	ErrIDTokenClaims = er.NewAPPError(http.StatusInternalServerError, 50012, "ID token claims is failure.")

	// ErrGetUser means Get user is failed.
	ErrGetUser = er.NewAPPError(http.StatusInternalServerError, 50013, "Get user is failed.")

	// ErrUpdateUser means Update user profile is failure.
	ErrUpdateUser = er.NewAPPError(http.StatusInternalServerError, 50014, "Update user profile is failure.")

	// ErrNewToken means Create a new token from profile is failure.
	ErrNewToken = er.NewAPPError(http.StatusInternalServerError, 50015, "Create a new token from profile is failure.")

	// ErrRegisterUser means Register user is failure.
	ErrRegisterUser = er.NewAPPError(http.StatusInternalServerError, 50016, "Register user is failure.")
)
View Source
var (
	// ErrInvalidState means Invalid state parameter
	ErrInvalidState = er.NewAPPError(http.StatusBadRequest, 40010, "Invalid state parameter.")
)
View Source
var (
	// ErrPingDatabase means Ping database is failure.
	ErrPingDatabase = er.NewAPPError(http.StatusInternalServerError, 50001, "Ping database is failure.")
)
View Source
var (
	// ErrUserNotExists means User is NOT exists.
	ErrUserNotExists = er.NewAPPError(http.StatusNotFound, 40410, "User is NOT exists.")
)

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