errors

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(format string, args ...any) error

func Forbidden

func Forbidden(format string, args ...any) error

func Internal

func Internal(format string, args ...any) error

func New

func New(format string, args ...any) error

func NotFound

func NotFound(format string, args ...any) error

func Unauthorized

func Unauthorized(format string, args ...any) error

Types

type Error

type Error struct {
	Status int
	// contains filtered or unexported fields
}

Error represents an error with an HTTP status code.

func (*Error) HTTP

func (e *Error) HTTP() int

HTTP returns the HTTP status code for the error.

type Validation

type Validation struct {
	Path    folio.Path
	Message string
}

Validation represents a result of a validation.

func (Validation) String

func (v Validation) String() string

String returns the string representation of the validation

type Validator

type Validator interface {
	Validate(value any) ([]Validation, bool)
}

Validator represents a validator

func NewValidator

func NewValidator() Validator

NewValidator creates a new validator

Jump to

Keyboard shortcuts

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