util

package
v0.0.0-...-92b599d Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirSize

func DirSize(path string) (int64, error)

func IsRichError

func IsRichError(err error) bool

func JSONErrorHandler

func JSONErrorHandler(ctx *fiber.Ctx, err error) error

func NewRichError

func NewRichError(status int, reason string, detail any) error

func NewRichErrorFromFiberError

func NewRichErrorFromFiberError(err *fiber.Error, detail any) error

Types

type RichError

type RichError struct {
	Status int
	Reason string
	Detail any
}

func (*RichError) AsJSON

func (r *RichError) AsJSON() ([]byte, error)

func (*RichError) Error

func (r *RichError) Error() string

Jump to

Keyboard shortcuts

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