server_errors

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogAndSendServerError

func LogAndSendServerError(c *gin.Context, err error)

Types

type ServerError

type ServerError struct {
	Errors struct {
		Fields map[string][]string `json:"fields"`
		Server []string            `json:"server"`
	} `json:"errors"`
}

func SingleFieldError

func SingleFieldError(field string, fieldError string) *ServerError

func SingleServerError

func SingleServerError(serverErrorDescription string) *ServerError

func (*ServerError) AddFieldError

func (se *ServerError) AddFieldError(field string, fieldError string)

func (*ServerError) AddServerError

func (se *ServerError) AddServerError(serverErrorDescription string)

Jump to

Keyboard shortcuts

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