model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Timestamp time.Time `json:"timestamp" binding:"required"`
	Message   string    `json:"message" binding:"required"`
	Status    int       `json:"status" binding:"required,min=400,max=599"`
	Path      string    `json:"path" format:"url_path" binding:"required" example:"/api/v0/example"`
}

func NewErrorResponse

func NewErrorResponse(message string, status int, path string) ErrorResponse

func NewErrorResponseFromError

func NewErrorResponseFromError(error error, status int, path string) ErrorResponse

type I18nError

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

func NewI18nError

func NewI18nError(message, tag string) I18nError

func NewI18nErrorWithArgs

func NewI18nErrorWithArgs(message, tag string, args interface{}) I18nError

func (I18nError) Args

func (e I18nError) Args() interface{}

func (I18nError) Error

func (e I18nError) Error() string

func (I18nError) Tag

func (e I18nError) Tag() string

Jump to

Keyboard shortcuts

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