Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusSuccess = "success" StatusFailure = "failure" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiResponse ¶
func Format ¶
func Format(action string, err *er.WdbError, data interface{}, notices ...string) ApiResponse
func (ApiResponse) Marshal ¶
func (r ApiResponse) Marshal() []byte
type Error ¶
type Error struct { Code string `json:"code,omitempty"` Stack ErrorStack `json:"stack,omitempty"` }
type ErrorStack ¶
type ErrorStack []string
type Response ¶
type Response struct { Action string `json:"action"` Status string `json:"status"` Error *Error `json:"error,omitempty"` Data *interface{} `json:"data,omitempty"` // would be removed in future in favour of Response. See : https://github.com/TanmoySG/wunderDB/issues/121 Response *interface{} `json:"response,omitempty"` Notices []string `json:"notices,omitempty"` }
Click to show internal directories.
Click to hide internal directories.