Documentation ¶
Index ¶
Constants ¶
View Source
const ( Sucess int = iota SignatureNotCorrect InterIOErr UnmarshalJsonErr ActionErr MethodNotCorrect UserNotAuthorized )
View Source
const (
VerifySignature int = iota
)
Variables ¶
View Source
var ErrDesc map[int]string = map[int]string{ Sucess: "success", MethodNotCorrect: "method not correct", InterIOErr: "server read error", UnmarshalJsonErr: "unmarshal json object error", ActionErr: "action not correct", SignatureNotCorrect: "signature not correct", }
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Action int `json:"action"` PayLoad interface{} `json:"payload"` }
type Response ¶
type Response struct { Success bool `json:"success"` ErrMsg string `json:"msg"` ErrCode int `json:"err_code"` PayLoad interface{} `json:"payload"` }
func ResponseError ¶
func ResponseSuccess ¶
func ResponseSuccess(v interface{}) *Response
func SimpleSuccessResponse ¶
func SimpleSuccessResponse() *Response
type VerfiyPlainMsg ¶
type VerifyReq ¶
type VerifyReq struct { Signature string `json:"sig"` ///hex string VerfiyPlainMsg }
type VerifyResp ¶
type VerifyResp struct {
Signature *VerifyReq `json:"signature"`
}
Click to show internal directories.
Click to hide internal directories.