model

package
v0.0.0-...-9e8b3cb Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Data map[string]interface{} `json:"data"`
	Code int                    `json:"code"`
	Msg  string                 `json:"msg"`
}

func ErrorResponse

func ErrorResponse(errno int, msg string) *Response

func NewResponse

func NewResponse() *Response

func (*Response) AddResponseInfo

func (s *Response) AddResponseInfo(key string, val interface{})

func (*Response) SetErrorInfo

func (s *Response) SetErrorInfo(errno int, msg string)

func (*Response) SetResponseDataInfo

func (s *Response) SetResponseDataInfo(key string, value string)

func (*Response) SetSuccess

func (s *Response) SetSuccess()

func (*Response) SetSuccessInfo

func (s *Response) SetSuccessInfo(code int, msg string)

func (Response) ToJson

func (s Response) ToJson() string

Jump to

Keyboard shortcuts

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