Versions in this module Expand all Collapse all v1 v1.4.10 Apr 18, 2023 v1.4.9 Apr 17, 2023 v1.4.8 Apr 14, 2023 v1.4.7 Apr 14, 2023 Changes in this version + const Accepted + const BadRequest + const CodeBoolFail + const CodeBoolOk + const CodeIntOk + const Created + const Fail + const Forbidden + const InternalServerError + const InternalServerTimeout + const MessageAccepted + const MessageBadRequest + const MessageCreated + const MessageFail + const MessageForbidden + const MessageInternalServerError + const MessageInternalServerTimeout + const MessageNoContent + const MessageNotFound + const MessageOK + const MessageResetContent + const MessageUnauthorized + const NoContent + const NotFound + const OK + const ResetContent + const Unauthorized + type Err struct + Message string + func Error(msg string) *Err + func Error2Err(err error) *Err + func Errorf(format string, args ...interface{}) *Err + func WrapError(err error, msg string) *Err + func WrapErrorf(err error, code interface{}, format string, args ...interface{}) *Err + func (err *Err) Error() string + func (err *Err) StatusCode() int + func (err *Err) WithStatusCode(statusCode int) *Err + type Json map[string]interface + func (j Json) Get(key string) interface{} + func (j Json) Set(key string, val interface{}) Json + func (j Json) String() string + type Result struct + Code bool + Data interface{} + Message string + func Failed(msg string) *Result + func FailedWithErr(err error) *Result + func FailedWithFormat(format string, args ...interface{}) *Result + func New() *Result + func Succeed(data interface{}) *Result + func (res *Result) StatusCode() int + func (res *Result) WithMessage(msg string) *Result + func (res *Result) WithStatusCode(statusCode int) *Result + func (res *Result) WithSubResult(subResult *SubResult) *Result + type SubResult struct + SubCode interface{} + SubData interface{} + SubMessage string + func NewSubResult(subCode interface{}, subMsg string) *SubResult + func (sub *SubResult) WithCode(subCode interface{}) *SubResult + func (sub *SubResult) WithData(subData interface{}) *SubResult + func (sub *SubResult) WithMessage(subMsg string) *SubResult