helpers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodec

func RegisterCodec(codec *codec.Codec)

Types

type Auxiliaries

type Auxiliaries interface {
	Get(string) Auxiliary
	GetList() []Auxiliary
}

type Auxiliary

type Auxiliary interface {
	GetName() string
	GetKeeper() AuxiliaryKeeper
	InitializeKeeper(Mapper, Parameters, ...interface{})
}

type AuxiliaryKeeper

type AuxiliaryKeeper interface {
	Help(sdkTypes.Context, AuxiliaryRequest) AuxiliaryResponse
}

type AuxiliaryRequest

type AuxiliaryRequest interface {
	Request
}

type AuxiliaryResponse

type AuxiliaryResponse interface {
	Response
}

type CLICommand

type CLICommand interface {
	ReadInt64(CLIFlag) int64
	ReadInt(CLIFlag) int
	ReadBool(CLIFlag) bool
	ReadString(CLIFlag) string
	ReadBaseReq(context.CLIContext) rest.BaseReq

	CreateCommand(func(command *cobra.Command, args []string) error) *cobra.Command
}

type CLIFlag

type CLIFlag interface {
	GetName() string
	GetValue() interface{}
	Register(*cobra.Command)
	ReadCLIValue() interface{}
}

type Genesis

type Genesis interface {
	Default() Genesis
	Validate() error
	Import(sdkTypes.Context, Mapper, Parameters)
	Export(sdkTypes.Context, Mapper, Parameters) Genesis

	Marshall() []byte
	Unmarshall([]byte) Genesis

	Initialize([]traits.Mappable, []types.Parameter) Genesis
}

type Mapper

type Mapper interface {
	GetKVStoreKey() *sdkTypes.KVStoreKey

	Create(sdkTypes.Context, traits.Mappable)
	Read(sdkTypes.Context, types.ID) traits.Mappable
	Update(sdkTypes.Context, traits.Mappable)
	Delete(sdkTypes.Context, types.ID)
	Iterate(sdkTypes.Context, types.ID, func(traits.Mappable) bool)

	StoreDecoder(*codec.Codec, kv.Pair, kv.Pair) string

	RegisterCodec(*codec.Codec)
}

type Module

type Module interface {
	sdkTypesModule.AppModuleBasic
	sdkTypesModule.AppModule
	sdkTypesModule.AppModuleSimulation

	GetKVStoreKey() *sdkTypes.KVStoreKey
	GetDefaultParamspace() string
	GetAuxiliary(string) Auxiliary

	DecodeModuleTransactionRequest(string, json.RawMessage) (sdkTypes.Msg, error)

	Initialize(params.Subspace, ...interface{}) Module
}

type Parameters

type Parameters interface {
	String() string

	Validate() error
	Equal(Parameters) bool

	Fetch(sdkTypes.Context, types.ID) types.Parameter
	Get(types.ID) types.Parameter
	GetList() []types.Parameter
	Mutate(sdkTypes.Context, types.Parameter) Parameters

	GetKeyTable() subspace.KeyTable
	subspace.ParamSet

	Initialize(params.Subspace) Parameters
}

type Queries

type Queries interface {
	Get(string) Query
	GetList() []Query
}

type Query

type Query interface {
	GetModuleName() string
	GetName() string
	GetRoute() string
	Command(*codec.Codec) *cobra.Command
	HandleMessage(sdkTypes.Context, abciTypes.RequestQuery) ([]byte, error)
	RESTQueryHandler(context.CLIContext) http.HandlerFunc
	RegisterCodec(*codec.Codec)
	InitializeKeeper(Mapper, Parameters, ...interface{})
}

type QueryKeeper

type QueryKeeper interface {
	Enquire(sdkTypes.Context, QueryRequest) QueryResponse
}

type QueryRequest

type QueryRequest interface {
	Request
	FromCLI(CLICommand, context.CLIContext) QueryRequest
	FromMap(map[string]string) QueryRequest
}

type QueryResponse

type QueryResponse interface {
	Response
}

type Request

type Request interface {
	Validate() error
}

type Response

type Response interface {
	IsSuccessful() bool
	GetError() error
}

type Simulator

type Simulator interface {
	RandomizedGenesisState(*module.SimulationState)
	WeightedOperations(simulation.AppParams, *codec.Codec) simulation.WeightedOperations
	WeightedProposalContentList() []simulation.WeightedProposalContent
	ParamChangeList(*rand.Rand) []simulation.ParamChange
}

type Transaction

type Transaction interface {
	GetModuleName() string
	GetName() string
	GetRoute() string
	Command(*codec.Codec) *cobra.Command
	HandleMessage(sdkTypes.Context, sdkTypes.Msg) (*sdkTypes.Result, error)
	RESTRequestHandler(context.CLIContext) http.HandlerFunc
	RegisterCodec(*codec.Codec)
	DecodeTransactionRequest(json.RawMessage) (sdkTypes.Msg, error)
	InitializeKeeper(Mapper, Parameters, ...interface{})
}

type TransactionKeeper

type TransactionKeeper interface {
	Transact(sdkTypes.Context, sdkTypes.Msg) TransactionResponse
}

type TransactionRequest

type TransactionRequest interface {
	GetBaseReq() rest.BaseReq

	FromCLI(CLICommand, context.CLIContext) (TransactionRequest, error)
	FromJSON(json.RawMessage) (TransactionRequest, error)
	MakeMsg() (sdkTypes.Msg, error)

	Request
}

type TransactionResponse

type TransactionResponse interface {
	Response
}

type Transactions

type Transactions interface {
	Get(string) Transaction

	GetList() []Transaction
}

type WasmMessage

type WasmMessage interface {
	GetType() string
	GetRawMessage() json.RawMessage
}

type WasmMessagePrototype

type WasmMessagePrototype func() WasmMessage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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