utils

package
v0.0.0-...-f66fa89 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrNoRows

func IsErrNoRows(err error) bool

func Message

func Message(status bool, message string) map[string]interface{}

Types

type Error

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

func NewError

func NewError(err error, format string, a ...interface{}) *Error

func NewErrorWithCodeAndMessage

func NewErrorWithCodeAndMessage(
	err error,
	httpStatus int,
	message string,
	format string,
	a ...interface{},
) *Error

func (*Error) Error

func (e *Error) Error() string

Error interface

func (*Error) HttpStatus

func (e *Error) HttpStatus() int

func (*Error) JsonResponse

func (e *Error) JsonResponse() map[string]interface{}

func (*Error) LogErrorMessages

func (e *Error) LogErrorMessages()

Jump to

Keyboard shortcuts

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