apierror

package
v1.136.0-renovate-gola... Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequest

type BadRequest struct {
	Field  string `json:"field,omitempty"`
	Reason string `json:"reason"`
	// contains filtered or unexported fields
}

func BadRequestError

func BadRequestError(field string, reason string, error error) *BadRequest

func (BadRequest) Error

func (b BadRequest) Error() string

func (BadRequest) HTTPStatus

func (b BadRequest) HTTPStatus() int

func (BadRequest) HasData

func (b BadRequest) HasData() bool

type BadRequests

type BadRequests struct {
	Reasons []string `json:"reasons"`
}

func BadRequestsError

func BadRequestsError(reasons []string) *BadRequests

func (BadRequests) Error

func (b BadRequests) Error() string

func (BadRequests) HTTPStatus

func (b BadRequests) HTTPStatus() int

func (BadRequests) HasData

func (b BadRequests) HasData() bool

type Forbidden added in v1.135.0

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

func ForbiddenError added in v1.135.0

func ForbiddenError(error error) *Forbidden

func (Forbidden) Error added in v1.135.0

func (s Forbidden) Error() string

func (Forbidden) HTTPStatus added in v1.135.0

func (s Forbidden) HTTPStatus() int

func (Forbidden) Unwrap added in v1.135.0

func (s Forbidden) Unwrap() error

type InternalServer added in v1.135.0

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

func InternalServerError added in v1.135.0

func InternalServerError(error error) *InternalServer

func (InternalServer) Error added in v1.135.0

func (s InternalServer) Error() string

func (InternalServer) HTTPStatus added in v1.135.0

func (s InternalServer) HTTPStatus() int

func (InternalServer) Unwrap added in v1.135.0

func (s InternalServer) Unwrap() error

type NotFound

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

func NotFoundError

func NotFoundError(error error) *NotFound

func (NotFound) Error

func (n NotFound) Error() string

func (NotFound) HTTPStatus

func (n NotFound) HTTPStatus() int

func (NotFound) Unwrap

func (n NotFound) Unwrap() error

type StatusError added in v1.135.0

type StatusError struct {
	StatusCode int
}

func (StatusError) Error added in v1.135.0

func (s StatusError) Error() string

func (StatusError) HTTPStatus added in v1.135.0

func (s StatusError) HTTPStatus() int

type Unauthorized added in v1.120.0

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

func (Unauthorized) Error added in v1.120.0

func (u Unauthorized) Error() string

func (Unauthorized) HTTPStatus added in v1.120.0

func (u Unauthorized) HTTPStatus() int

func (Unauthorized) Unwrap added in v1.120.0

func (u Unauthorized) Unwrap() error

type ValidationError

type ValidationError struct {
	Errors ValidationErrors `json:"validation_errors"`
}

func (ValidationError) Error

func (ve ValidationError) Error() string

func (ValidationError) HTTPStatus

func (ve ValidationError) HTTPStatus() int

func (ValidationError) HasData

func (ve ValidationError) HasData() bool

type ValidationErrors

type ValidationErrors map[string]map[string]string

Jump to

Keyboard shortcuts

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