context

package
v0.0.0-...-74afdde Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context
}

func NewGoBContext

func NewGoBContext(height int64, logger *logrus.Entry, cmCtx cmsdk.Context) Context

create a new context

func (Context) BlockHeight

func (c Context) BlockHeight() int64

--------- GET context-------------------

func (Context) CMCtx

func (c Context) CMCtx() cmsdk.Context

func (Context) Logger

func (c Context) Logger() *logrus.Entry

func (Context) MsgType

func (c Context) MsgType() string

func (Context) TxHash

func (c Context) TxHash() string

func (Context) Value

func (c Context) Value(key interface{}) interface{}

context value for the provided key

func (Context) WithBlockHeight

func (c Context) WithBlockHeight(height int64) Context

--------- SET context-------------------

func (Context) WithCMContext

func (c Context) WithCMContext(cmctx cmsdk.Context) Context

func (Context) WithInt32

func (c Context) WithInt32(key interface{}, value int32) Context

func (Context) WithLogger

func (c Context) WithLogger(logger *logrus.Entry) Context

func (Context) WithMsgType

func (c Context) WithMsgType(msgType string) Context

func (Context) WithString

func (c Context) WithString(key interface{}, value string) Context

func (Context) WithTxHash

func (c Context) WithTxHash(txHash string) Context

func (Context) WithUint32

func (c Context) WithUint32(key interface{}, value uint32) Context

func (Context) WithUint64

func (c Context) WithUint64(key interface{}, value uint64) Context

func (Context) WithValue

func (c Context) WithValue(key interface{}, value interface{}) Context

nolint

Jump to

Keyboard shortcuts

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