Documentation ¶
Index ¶
- type FileEmity
- func (fm *FileEmity) AppendMsg(msg ...interface{}) *FileEmity
- func (fm FileEmity) Err(data int, msg ...interface{}) *FileEmity
- func (fm FileEmity) ErrString(data int, msg ...interface{}) string
- func (fm *FileEmity) IncCode(iCode int) *FileEmity
- func (fm *FileEmity) IncData(iCode int) int
- func (fm *FileEmity) InsertMsg(msg ...interface{}) *FileEmity
- func (fm *FileEmity) SetData(data interface{}) *FileEmity
- func (fm *FileEmity) SetMsg(msg ...interface{}) *FileEmity
- func (fm FileEmity) Success(data interface{}, disposition, sType string, msg ...interface{}) *FileEmity
- func (fm *FileEmity) ToStr() string
- type MsgEmity
- func (m *MsgEmity) AppendMsg(msg ...interface{}) *MsgEmity
- func (m MsgEmity) Err(data int, msg ...interface{}) *MsgEmity
- func (m MsgEmity) ErrString(data int, msg ...interface{}) string
- func (m *MsgEmity) IncCode(iCode int) *MsgEmity
- func (m *MsgEmity) IncData(iCode int) int
- func (m *MsgEmity) InsertMsg(msg ...interface{}) *MsgEmity
- func (m *MsgEmity) SetData(data interface{}) *MsgEmity
- func (m *MsgEmity) SetMsg(msg ...interface{}) *MsgEmity
- func (m MsgEmity) Success(data interface{}, msg ...interface{}) *MsgEmity
- func (m MsgEmity) SuccessString(data interface{}, msg ...interface{}) string
- func (m *MsgEmity) ToStr() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileEmity ¶
type FileEmity struct { Gsuccess bool `json:"success"` Gmsg string `json:"msg"` Gdata interface{} `json:"data"` //[]byte Gdisposition string `json:"disposition"` Gtype string `json:"type"` Glength int `json:"length"` GsLength string `json:"sLength"` }
文件结构体,用于http返回传递消息
func (FileEmity) ErrString ¶
*
- 返回包含'错误信息'的结构体Json字符串
- @param data 码值
- @param msg 描述信息
- @return 返回Json字符串
type MsgEmity ¶
type MsgEmity struct { Gsuccess bool `json:"success"` Gmsg string `json:"msg"` Gdata interface{} `json:"data"` }
消息结构体,用于方法间传递消息
func (MsgEmity) ErrString ¶
*
- 返回包含'错误信息'的结构体Json字符串
- @param data 码值
- @param msg 描述信息
- @return 返回Json字符串
func (MsgEmity) Success ¶
*
- 构造消息结构体,返回包含'正确信息'的结构体
- @param data 码值|数据
- @param msg 描述信息
- @return 返回新创建的结构体
func (MsgEmity) SuccessString ¶
*
- 返回包含'正确信息'的结构体Json字符串
- @param data 码值|数据
- @param msg 描述信息
- @return 返回Json字符串
Click to show internal directories.
Click to hide internal directories.