contract

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destroyer

type Destroyer interface {
	Destroy() error
}

type Error

type Error struct {
	Code    ErrorCode `json:"error_code"`
	Message string    `json:"message"`
	Inner   error     `json:"-"`
}

func NewError

func NewError(code protos.ErrorCode, message string) *Error

func NewErrorWith

func NewErrorWith(code protos.ErrorCode, message string, err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) StatusCode

func (e *Error) StatusCode() int

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorCode

type ErrorCode protos.ErrorCode

func (ErrorCode) MarshalJSON

func (e ErrorCode) MarshalJSON() ([]byte, error)

Custom json marshalling for ErrorCode.

func (ErrorCode) String

func (e ErrorCode) String() string

type HTTPRequestParser

type HTTPRequestParser interface {
	ParseBody(ctx *fiber.Ctx, out interface{}) *Error
	ParseQuery(ctx *fiber.Ctx, out interface{}) *Error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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