types

package
v0.0.0-...-8551cdf Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCfg

type BaseCfg struct {
	Name       string          `json:"name"`
	ExtCfgFile string          `json:"ext_cfg_file"`
	CfgRaw     json.RawMessage `json:"cfg"`
}

func (BaseCfg) UnmarshalData

func (b BaseCfg) UnmarshalData(data interface{}) error

UnmarshalData unmarshal data to struct

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context for plugin ctx

func NewContext

func NewContext(logger log.Logger) Context

NewContext create a new context

func NewCtx

func NewCtx(ctx sdk.Context) Context

func (Context) ChainID

func (c Context) ChainID() string

func (Context) Logger

func (c Context) Logger() log.Logger

func (Context) WithChainID

func (c Context) WithChainID(chainID string) Context

type Event

type Event struct {
	Type       string
	Attributes map[string]string
}

func FromSdkEvent

func FromSdkEvent(evt sdk.Event) Event

type MsgEvent

type MsgEvent struct {
	Evt Event
}

MsgEvent event msg for plugin handler

func NewMsgEvent

func NewMsgEvent(evt sdk.Event) *MsgEvent

NewMsgEvent new msg event

type MsgStdTx

type MsgStdTx struct {
	Tx types.StdTx
}

MsgStdTx stdTx msg for plugin handler

func NewMsgStdTx

func NewMsgStdTx(tx types.StdTx) *MsgStdTx

NewMsgStdTx creates a new msg

type Plugin

type Plugin interface {
	Init(Context) error
	Start(Context) error
	Stop(Context) error

	EvtHandler() PluginEvtHandler
	MsgHandler() PluginMsgHandler
	TxHandler() PluginTxHandler

	Logger() log.Logger
	Name() string
}

type PluginEvtHandler

type PluginEvtHandler func(ctx Context, evt Event)

type PluginMsgHandler

type PluginMsgHandler func(ctx Context, msg sdk.Msg)

type PluginTxHandler

type PluginTxHandler func(ctx Context, tx chainTypes.StdTx)

Jump to

Keyboard shortcuts

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