maker

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: GPL-3.0 Imports: 7 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 WithFlag

func WithFlag(err error, flag int) error

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

type Request

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

	// Permission
	Gov    bool //  Action from approved proposal
	Oracle bool // Action from price oracle

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