domain

package
v0.0.0-...-04f365a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBearerTokenNotActive = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("bearer token not active"),
}
View Source
var ErrCredentialsNotMatch = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("credentials do not match"),
}
View Source
var ErrEmailNotFound = &RequestError{
	StatusCode: http.StatusNotFound,
	Err:        errors.New("email not found"),
}
View Source
var ErrExpiredBearerToken = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("expired bearer token"),
}
View Source
var ErrInvalidAPIKey = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("invalid api key"),
}
View Source
var ErrInvalidBearerToken = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("invalid bearer token"),
}
View Source
var ErrNoAPIKey = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("no api key provided"),
}
View Source
var ErrNoBearerToken = &RequestError{
	StatusCode: http.StatusUnauthorized,
	Err:        errors.New("no bearer token provided"),
}
View Source
var ErrNotFound = &RequestError{
	StatusCode: http.StatusNotFound,
	Err:        errors.New("something not found"),
}
View Source
var ErrRoleCantAccessResource = &RequestError{
	StatusCode: http.StatusForbidden,
	Err:        errors.New("role can't access resource"),
}
View Source
var ErrUserEmailAlreadyExists = &RequestError{
	StatusCode: http.StatusConflict,
	Err:        errors.New("user email already exists"),
}
View Source
var ErrUserNotFound = &RequestError{
	StatusCode: http.StatusNotFound,
	Err:        errors.New("user not found"),
}

Functions

This section is empty.

Types

type RequestError

type RequestError struct {
	StatusCode int
	Err        error
}

func (*RequestError) Error

func (r *RequestError) Error() string

type SerializableError

type SerializableError interface {
	Serialize() any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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