cliret

package
v0.0.0-...-bd0d37b Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleResult

type RuleResult[T any] struct {
	basedto.BaseEntity `json:"-"`

	Code int    `json:"code"`
	Msg  string `json:"msg"`
	ruleparam.ReturnDto
	Data T `json:"data,omitempty"`
}

func Default

func Default[T any]() *RuleResult[T]

func NewRuleResult

func NewRuleResult[T any]() *RuleResult[T]

func (*RuleResult[T]) Check

func (self *RuleResult[T]) Check(datas any, key string, exp any) bool

func (*RuleResult[T]) CheckCode

func (self *RuleResult[T]) CheckCode(suite suite.Suite, code any)

func (*RuleResult[T]) FromResult

func (self *RuleResult[T]) FromResult(ret *basedto.IchubResult) error

func (*RuleResult[T]) IfReturnFailed

func (self *RuleResult[T]) IfReturnFailed() bool

func (*RuleResult[T]) IfReturnSuccess

func (self *RuleResult[T]) IfReturnSuccess() bool

func (*RuleResult[T]) IfSuccess

func (self *RuleResult[T]) IfSuccess() bool

func (*RuleResult[T]) IsFailed

func (self *RuleResult[T]) IsFailed() bool

func (*RuleResult[T]) ValueOf

func (self *RuleResult[T]) ValueOf(ret *clireq.RuleResult) error

Jump to

Keyboard shortcuts

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