slugerr

package
v0.0.0-...-d5dcd45 Latest Latest
Warning

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

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

Documentation

Overview

Package slugerr provides custom error types for the openapi HTTP API.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorTypeUnknown defines the unknown type of error.
	ErrorTypeUnknown = ErrorType{"unknown"}
	// ErrorTypeAuthorization defines the authorization type of error.
	ErrorTypeAuthorization = ErrorType{"authorization"}
	// ErrorTypeIncorrectInput defines the incorrect input type of error.
	ErrorTypeIncorrectInput = ErrorType{"incorrect-input"}
)

Functions

This section is empty.

Types

type ErrorType

type ErrorType struct {
	// contains filtered or unexported fields
}

ErrorType defines the type of error.

type SlugError

type SlugError struct {
	// contains filtered or unexported fields
}

SlugError defines error for slug.

func NewAuthorizationError

func NewAuthorizationError(err string, slug string) SlugError

NewAuthorizationError creates a new authorization error.

func NewIncorrectInputError

func NewIncorrectInputError(err string, slug string) SlugError

NewIncorrectInputError creates a new incorrect input error.

func NewSlugError

func NewSlugError(err string, slug string) SlugError

NewSlugError creates a new slug error.

func (SlugError) Error

func (s SlugError) Error() string

Error returns the error message.

func (SlugError) ErrorType

func (s SlugError) ErrorType() ErrorType

ErrorType returns the error type.

func (SlugError) Slug

func (s SlugError) Slug() string

Slug returns the slug.

Jump to

Keyboard shortcuts

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