maker

package
v1.9.1-test3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 标记成可以退款
	FlagRefund = 1 << iota // 1
	// 标记成骚扰转账,不退款
	FlagNoisy = 1 << iota // 2
)

Variables

This section is empty.

Functions

func Require

func Require(condition bool, msg string, flags ...int) error

func ShouldRefund

func ShouldRefund(flag int) bool

func VersionFrom added in v1.4.0

func VersionFrom(ctx context.Context) int64

func WithFlag

func WithFlag(err error, flag int) error

func WithVersion added in v1.4.0

func WithVersion(ctx context.Context, version int64) context.Context

Types

type Error

type Error struct {
	Msg  string
	Flag int
}

func (Error) Error

func (e Error) Error() string

type HandlerFunc

type HandlerFunc func(r *Request) error

func HandlerVersion added in v1.8.2

func HandlerVersion(m map[int]HandlerFunc) HandlerFunc

type Request

type Request struct {
	Now        time.Time
	Version    int64
	TraceID    string
	Sender     string
	FollowID   string
	AssetID    string
	Amount     decimal.Decimal
	Action     core.Action
	SysVersion int
	Body       []byte

	// Permission
	Governors []string
	// Next Request from proposal
	Next *Request
	// contains filtered or unexported fields
}

func (*Request) Context

func (r *Request) Context() context.Context

func (*Request) Copy

func (r *Request) Copy() *Request

func (*Request) Gov

func (r *Request) Gov() bool

func (*Request) Scan

func (r *Request) Scan(dest ...interface{}) error

func (*Request) Tx

func (r *Request) Tx() *core.Transaction

func (*Request) Values

func (r *Request) Values() []interface{}

func (*Request) WithBody

func (r *Request) WithBody(values ...interface{}) *Request

func (*Request) WithContext

func (r *Request) WithContext(ctx context.Context) *Request

func (*Request) WithProposal

func (r *Request) WithProposal(p *core.Proposal) *Request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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