conf

package
v0.0.0-...-b30913e Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoError = &ApiError{0, "No error.", ""}
	ErrJSON    = &ApiError{http.StatusInternalServerError, "error of json.marshal.", ""}
)

Functions

func GiveResponse

func GiveResponse(some interface{}) (response *gin.H)

Types

type ApiError

type ApiError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Href    string `json:"href"`
}

ApiError structure for processing errors

func NewApiError

func NewApiError(err error) *ApiError

NewApiError

func (*ApiError) Error

func (err *ApiError) Error() string

func (*ApiError) PrintError

func (err *ApiError) PrintError()
type Header gin.H

type MsgState

type MsgState struct {
	Errors   map[int]gin.H
	Messages map[int]gin.H
}

func NewMsgState

func NewMsgState() *MsgState

NewMsgState will return a new state

func (*MsgState) SetErrors

func (errst *MsgState) SetErrors()

SetRnd fill GeoState the n points

Jump to

Keyboard shortcuts

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