Versions in this module Expand all Collapse all v1 v1.0.8 Feb 10, 2025 Changes in this version type ErrorGetter + Code func() int + Message func() string v1.0.7 Nov 18, 2024 v1.0.6 Sep 5, 2024 v1.0.5 Sep 5, 2024 Changes in this version type Result + IsHtml func() bool + IsString func() bool + WithHtml func(body []byte) Result v1.0.3 Sep 3, 2024 v1.0.2 Aug 15, 2024 v1.0.1 Aug 15, 2024 v1.0.0 Jul 24, 2024 v0 v0.1.0 Jul 23, 2024 Changes in this version + const DefaultCodeInternal + const DefaultCodeUnknown + const DefaultCodeUnknownMessage + func ToJSON(v Result, pretties ...bool) string + type Configuration struct + Type ResultType + var Config *Configuration + func (o *Configuration) After() error + type DataType string + const DataTypeError + const DataTypeList + const DataTypeObject + const DataTypePaging + type Error struct + Code int + Message string + func NewError(code int, message string) Error + func (o Error) Error() string + func (o Error) GetCode() int + func (o Error) GetMessage() string + type ErrorGetter interface + GetCode func() int + GetMessage func() string + type Paginator struct + Body any + Paging *Paging + func NewPaginator(body any, total int64, page, size int) *Paginator + type Paging struct + Curr int + First int + Last int + Next int + Prev int + Size int + Total int64 + func NewPaging(total int64, page int, size int) *Paging + type Result interface + String func() string + With func(data any) Result + WithCodeError func(code int, message string) Result + WithEmpty func() Result + WithError func(err error) Result + WithList func(items any) Result + WithPaging func(items any, total int64, page, size int) Result + WithString func(str string) Result + type ResultConstructor func() Result + type ResultType string + const DefaultResultType + const ResultTypeCode + const ResultTypeErrno