context

package
v1.2.19 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: GPL-3.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type H

type H map[string]interface{}

type ParamsResponse

type ParamsResponse struct {
	ParamsStr string
	// contains filtered or unexported fields
}

func NewParamsResponseFromStr

func NewParamsResponseFromStr(paramsStr string) (*ParamsResponse, error)

func (*ParamsResponse) Bytes

func (rc *ParamsResponse) Bytes(byt []byte)

func (*ParamsResponse) Get

func (rc *ParamsResponse) Get(name string) interface{}

func (*ParamsResponse) GetAddress

func (rc *ParamsResponse) GetAddress(name string) *Address

func (*ParamsResponse) GetBoolean

func (rc *ParamsResponse) GetBoolean(name string) bool

func (*ParamsResponse) GetBytes

func (rc *ParamsResponse) GetBytes(name string) []byte

func (*ParamsResponse) GetFloat32

func (rc *ParamsResponse) GetFloat32(name string) float32

func (*ParamsResponse) GetFloat64

func (rc *ParamsResponse) GetFloat64(name string) float64

func (*ParamsResponse) GetHash

func (rc *ParamsResponse) GetHash(name string) Hash

func (*ParamsResponse) GetInt

func (rc *ParamsResponse) GetInt(name string) int

func (*ParamsResponse) GetInt16

func (rc *ParamsResponse) GetInt16(name string) int16

func (*ParamsResponse) GetInt32

func (rc *ParamsResponse) GetInt32(name string) int32

func (*ParamsResponse) GetInt64

func (rc *ParamsResponse) GetInt64(name string) int64

func (*ParamsResponse) GetInt8

func (rc *ParamsResponse) GetInt8(name string) int8

func (*ParamsResponse) GetString

func (rc *ParamsResponse) GetString(name string) string

func (*ParamsResponse) GetUint

func (rc *ParamsResponse) GetUint(name string) uint

func (*ParamsResponse) GetUint16

func (rc *ParamsResponse) GetUint16(name string) uint16

func (*ParamsResponse) GetUint32

func (rc *ParamsResponse) GetUint32(name string) uint32

func (*ParamsResponse) GetUint64

func (rc *ParamsResponse) GetUint64(name string) uint64

func (*ParamsResponse) GetUint8

func (rc *ParamsResponse) GetUint8(name string) uint8

func (*ParamsResponse) Json

func (rc *ParamsResponse) Json(v any) (err error)

func (*ParamsResponse) Response

func (rc *ParamsResponse) Response() []byte

func (*ParamsResponse) String

func (rc *ParamsResponse) String(format string, values ...any)

func (*ParamsResponse) TryGetAddress

func (rc *ParamsResponse) TryGetAddress(name string) (Address, error)

func (*ParamsResponse) TryGetBoolean

func (rc *ParamsResponse) TryGetBoolean(name string) (bool, error)

func (*ParamsResponse) TryGetBytes

func (rc *ParamsResponse) TryGetBytes(name string) ([]byte, error)

func (*ParamsResponse) TryGetFloat32

func (rc *ParamsResponse) TryGetFloat32(name string) (float32, error)

func (*ParamsResponse) TryGetFloat64

func (rc *ParamsResponse) TryGetFloat64(name string) (float64, error)

func (*ParamsResponse) TryGetHash

func (rc *ParamsResponse) TryGetHash(name string) (Hash, error)

func (*ParamsResponse) TryGetInt

func (rc *ParamsResponse) TryGetInt(name string) (int, error)

func (*ParamsResponse) TryGetInt16

func (rc *ParamsResponse) TryGetInt16(name string) (int16, error)

func (*ParamsResponse) TryGetInt32

func (rc *ParamsResponse) TryGetInt32(name string) (int32, error)

func (*ParamsResponse) TryGetInt64

func (rc *ParamsResponse) TryGetInt64(name string) (int64, error)

func (*ParamsResponse) TryGetInt8

func (rc *ParamsResponse) TryGetInt8(name string) (int8, error)

func (*ParamsResponse) TryGetString

func (rc *ParamsResponse) TryGetString(name string) (string, error)

func (*ParamsResponse) TryGetUint

func (rc *ParamsResponse) TryGetUint(name string) (uint, error)

func (*ParamsResponse) TryGetUint16

func (rc *ParamsResponse) TryGetUint16(name string) (uint16, error)

func (*ParamsResponse) TryGetUint32

func (rc *ParamsResponse) TryGetUint32(name string) (uint32, error)

func (*ParamsResponse) TryGetUint64

func (rc *ParamsResponse) TryGetUint64(name string) (uint64, error)

func (*ParamsResponse) TryGetUint8

func (rc *ParamsResponse) TryGetUint8(name string) (uint8, error)

type ReadContext

type ReadContext struct {
	BlockHash *common.Hash
	// contains filtered or unexported fields
}

func NewReadContext

func NewReadContext(rdCall *common.RdCall) (*ReadContext, error)

func (*ReadContext) BindJson

func (rc *ReadContext) BindJson(v any) error

func (*ReadContext) Data

func (rc *ReadContext) Data(code int, contentType string, data []byte)

func (*ReadContext) DataOk

func (rc *ReadContext) DataOk(contentType string, data []byte)

func (*ReadContext) Err

func (rc *ReadContext) Err(code int, err error)

func (*ReadContext) ErrOk

func (rc *ReadContext) ErrOk(err error)

func (*ReadContext) GetBlockHash

func (rc *ReadContext) GetBlockHash() *common.Hash

func (*ReadContext) GetParams added in v1.2.6

func (rc *ReadContext) GetParams(key string) any

func (*ReadContext) GetString added in v1.2.6

func (rc *ReadContext) GetString(key string) string

func (*ReadContext) Json

func (rc *ReadContext) Json(code int, v any)

func (*ReadContext) JsonOk

func (rc *ReadContext) JsonOk(v any)

func (*ReadContext) Response

func (rc *ReadContext) Response() *ResponseData

func (*ReadContext) TryGetParams added in v1.2.6

func (rc *ReadContext) TryGetParams(key string) (any, error)

func (*ReadContext) TryGetString added in v1.2.6

func (rc *ReadContext) TryGetString(key string) (string, error)

type ResponseData

type ResponseData struct {
	StatusCode int

	DataInterface any
	IsJson        bool

	ContentType string
	DataBytes   []byte
}

type WriteContext

type WriteContext struct {
	*ParamsResponse

	Block    *types.Block
	Txn      *types.SignedTxn
	TxnIndex int

	Events []*types.Event
	Extra  []byte

	ExtraInterface any

	LeiCost uint64
}

func NewWriteContext

func NewWriteContext(stxn *types.SignedTxn, block *types.Block, idx int) (*WriteContext, error)

func (*WriteContext) BindJson

func (c *WriteContext) BindJson(v any) error

func (*WriteContext) EmitEvent

func (c *WriteContext) EmitEvent(bytes []byte)

func (*WriteContext) EmitExtra

func (c *WriteContext) EmitExtra(extra []byte)

func (*WriteContext) EmitJsonEvent

func (c *WriteContext) EmitJsonEvent(value any) error

func (*WriteContext) EmitStringEvent

func (c *WriteContext) EmitStringEvent(format string, values ...any)

func (*WriteContext) FromP2P

func (c *WriteContext) FromP2P() bool

func (*WriteContext) GetCaller

func (c *WriteContext) GetCaller() *common.Address

func (*WriteContext) GetTimestamp

func (c *WriteContext) GetTimestamp() uint64

func (*WriteContext) GetTxnHash

func (c *WriteContext) GetTxnHash() common.Hash

func (*WriteContext) SetLei

func (c *WriteContext) SetLei(lei uint64)

func (*WriteContext) SetLeiFn

func (c *WriteContext) SetLeiFn(fn func() uint64)

Jump to

Keyboard shortcuts

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