e

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Type     string         `json:"type"`
	Field    string         `json:"field,omitempty"`
	Message  string         `json:"message"`
	Solution string         `json:"solution,omitempty"`
	Params   *[]interface{} `json:"params,omitempty"`
}

func Context

func Context(message interface{}, params ...interface{}) *Error

func Field

func Field(field, message interface{}, params ...interface{}) *Error

func New

func New(t, field, message, solution string, params ...interface{}) *Error

func (*Error) SetFiled

func (e *Error) SetFiled(field string) *Error

func (*Error) SetMessage

func (e *Error) SetMessage(message string) *Error

func (*Error) SetParams

func (e *Error) SetParams(params ...interface{}) *Error

func (*Error) SetSolution

func (e *Error) SetSolution(s string) *Error

func (*Error) SetType

func (e *Error) SetType(t string) *Error

type Errors

type Errors []Error

func (*Errors) Clear

func (e *Errors) Clear() *Errors

func (*Errors) Exist

func (e *Errors) Exist() bool

func (*Errors) Push

func (e *Errors) Push(error *Error) *Errors

Jump to

Keyboard shortcuts

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