results

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCode

func NewCode() src.Result

func NewErrno

func NewErrno() src.Result

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) With

func (o *CodeResult) With(data any) src.Result

func (*CodeResult) WithCodeError

func (o *CodeResult) WithCodeError(code int, message string) src.Result

func (*CodeResult) WithEmpty

func (o *CodeResult) WithEmpty() src.Result

func (*CodeResult) WithError

func (o *CodeResult) WithError(err error) src.Result

func (*CodeResult) WithHtml added in v1.0.5

func (o *CodeResult) WithHtml(body []byte) src.Result

func (*CodeResult) WithList

func (o *CodeResult) WithList(items any) src.Result

func (*CodeResult) WithPaging

func (o *CodeResult) WithPaging(items any, total int64, page, size int) src.Result

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) With

func (o *ErrnoResult) With(data any) src.Result

func (*ErrnoResult) WithCodeError

func (o *ErrnoResult) WithCodeError(code int, message string) src.Result

func (*ErrnoResult) WithEmpty

func (o *ErrnoResult) WithEmpty() src.Result

func (*ErrnoResult) WithError

func (o *ErrnoResult) WithError(err error) src.Result

func (*ErrnoResult) WithHtml added in v1.0.5

func (o *ErrnoResult) WithHtml(body []byte) src.Result

func (*ErrnoResult) WithList

func (o *ErrnoResult) WithList(items any) src.Result

func (*ErrnoResult) WithPaging

func (o *ErrnoResult) WithPaging(items any, total int64, page, size int) src.Result

func (*ErrnoResult) WithString

func (o *ErrnoResult) WithString(str string) src.Result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL