Documentation
¶
Index ¶
- func NewCode() src.Result
- func NewErrno() src.Result
- type CodeResult
- func (o *CodeResult) IsHtml() bool
- func (o *CodeResult) IsString() bool
- func (o *CodeResult) String() string
- func (o *CodeResult) With(data any) src.Result
- func (o *CodeResult) WithCodeError(code int, message string) src.Result
- func (o *CodeResult) WithEmpty() src.Result
- func (o *CodeResult) WithError(err error) src.Result
- func (o *CodeResult) WithHtml(body []byte) src.Result
- func (o *CodeResult) WithList(items any) src.Result
- func (o *CodeResult) WithPaging(items any, total int64, page, size int) src.Result
- func (o *CodeResult) WithString(str string) src.Result
- type ErrnoResult
- func (o *ErrnoResult) IsHtml() bool
- func (o *ErrnoResult) IsString() bool
- func (o *ErrnoResult) String() string
- func (o *ErrnoResult) With(data any) src.Result
- func (o *ErrnoResult) WithCodeError(code int, message string) src.Result
- func (o *ErrnoResult) WithEmpty() src.Result
- func (o *ErrnoResult) WithError(err error) src.Result
- func (o *ErrnoResult) WithHtml(body []byte) src.Result
- func (o *ErrnoResult) WithList(items any) src.Result
- func (o *ErrnoResult) WithPaging(items any, total int64, page, size int) src.Result
- func (o *ErrnoResult) WithString(str string) src.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodeResult ¶
type CodeResult struct {
Data any `json:"data,omitempty" xml:"data,omitempty"`
DataType src.DataType `json:"type" xml:"type"`
Code int `json:"code" xml:"code"`
Message string `json:"message" xml:"message"`
// contains filtered or unexported fields
}
func (*CodeResult) IsHtml ¶ added in v1.0.5
func (o *CodeResult) IsHtml() bool
func (*CodeResult) IsString ¶ added in v1.0.5
func (o *CodeResult) IsString() bool
func (*CodeResult) String ¶
func (o *CodeResult) String() string
func (*CodeResult) WithCodeError ¶
func (o *CodeResult) WithCodeError(code int, message string) src.Result
func (*CodeResult) WithEmpty ¶
func (o *CodeResult) WithEmpty() src.Result
func (*CodeResult) WithPaging ¶
func (*CodeResult) WithString ¶
func (o *CodeResult) WithString(str string) src.Result
type ErrnoResult ¶
type ErrnoResult struct {
Data any `json:"data,omitempty" xml:"data,omitempty"`
DataType src.DataType `json:"type" xml:"type"`
Errno int `json:"errno" xml:"errno"`
Error string `json:"error" xml:"error"`
// contains filtered or unexported fields
}
func (*ErrnoResult) IsHtml ¶ added in v1.0.5
func (o *ErrnoResult) IsHtml() bool
func (*ErrnoResult) IsString ¶ added in v1.0.5
func (o *ErrnoResult) IsString() bool
func (*ErrnoResult) String ¶
func (o *ErrnoResult) String() string
func (*ErrnoResult) WithCodeError ¶
func (o *ErrnoResult) WithCodeError(code int, message string) src.Result
func (*ErrnoResult) WithEmpty ¶
func (o *ErrnoResult) WithEmpty() src.Result
func (*ErrnoResult) WithHtml ¶ added in v1.0.5
func (o *ErrnoResult) WithHtml(body []byte) src.Result
func (*ErrnoResult) WithPaging ¶
func (*ErrnoResult) WithString ¶
func (o *ErrnoResult) WithString(str string) src.Result
Click to show internal directories.
Click to hide internal directories.