apierror

package
v1.121.0-renovate-all-... Latest Latest
Warning

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

Go to latest
Published: Jan 8, 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 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 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