Documentation ¶
Index ¶
- func RegisterLegacyAminoCodec(legacyAmino *codec.LegacyAmino)
- type Auxiliaries
- type Auxiliary
- type AuxiliaryKeeper
- type AuxiliaryRequest
- type AuxiliaryResponse
- type Block
- type CLICommand
- type CLIFlag
- type Codec
- type Collection
- type Genesis
- type Invariants
- type Keeper
- type Key
- type Mappable
- type Mapper
- type Message
- type Module
- type ParameterManager
- type Queries
- type Query
- type QueryKeeper
- type QueryRequest
- type QueryResponse
- type Record
- type Request
- type Response
- type Simulator
- type Transaction
- type TransactionKeeper
- type TransactionRequest
- type TransactionResponse
- type Transactions
- type ValidatableParameter
- type WasmMessage
- type WasmMessagePrototype
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(legacyAmino *codec.LegacyAmino)
Types ¶
type Auxiliaries ¶
type Auxiliary ¶
type Auxiliary interface { GetName() string GetKeeper() AuxiliaryKeeper Initialize(Mapper, ParameterManager, ...interface{}) Auxiliary }
type AuxiliaryKeeper ¶
type AuxiliaryKeeper interface { Help(context.Context, AuxiliaryRequest) (AuxiliaryResponse, error) Keeper }
type AuxiliaryRequest ¶
type AuxiliaryRequest interface { Request }
type AuxiliaryResponse ¶
type AuxiliaryResponse interface { }
type Block ¶
type Block interface { Begin(context.Context, abciTypes.RequestBeginBlock) End(context.Context, abciTypes.RequestEndBlock) Initialize(Mapper, ParameterManager, ...interface{}) Block }
type CLICommand ¶
type Codec ¶
type Codec interface { client.TxConfig codec.Codec GetProtoCodec() *codec.ProtoCodec GetLegacyAmino() *codec.LegacyAmino InterfaceRegistry() types.InterfaceRegistry Initialize(module.BasicManager) Codec }
type Collection ¶
type Collection interface { GetMappable(Key) Mappable Get() []Record GetMappables() []Mappable // TODO convert rest of the accumulators to below logic // The accumulator function should return true if the iterated Mappable is to be included in the returned collection IterateAll(func(Record) bool) Collection Iterate(Key, func(Record) bool) IteratePaginated(Key, int32, func(Record) bool) Fetch(Key) Collection FetchRecord(Key) Record FetchAll() Collection FetchPaginated(Key, int32) Collection Add(Record) Collection Remove(Record) Collection Mutate(Record) Collection Initialize(context.Context, Mapper) Collection }
Collection a list of mappable with create CRUD methods
type Genesis ¶
type Genesis interface { proto.Message Default() Genesis ValidateBasic(ParameterManager) error Import(context.Context, Mapper, ParameterManager) Export(context.Context, Mapper, ParameterManager) Genesis Encode(sdkCodec.JSONCodec) []byte Decode(sdkCodec.JSONCodec, []byte) Genesis Initialize([]Record, lists.ParameterList) Genesis }
type Invariants ¶
type Invariants interface {
Register(sdkTypes.InvariantRegistry)
}
type Keeper ¶
type Keeper interface {
Initialize(Mapper, ParameterManager, []interface{}) Keeper
}
type Key ¶
type Key interface { GenerateStorePrefixBytes() []byte GenerateStoreKeyBytes() []byte GeneratePrefixedStoreKeyBytes() []byte IsPartial() bool // TODO ** check all key impls Equals(Key) bool }
Key SHOULD be derivable from the object it is referencing and SHOULD not be totally arbitrary or sequential
type Mappable ¶
type Mappable interface { codec.ProtoMarshaler RegisterLegacyAminoCodec(*codec.LegacyAmino) ValidateBasic() error }
type Mapper ¶
type Mapper interface { NewCollection(context.Context) Collection Upsert(context.Context, Record) Read(context.Context, Key) Record Delete(context.Context, Key) FetchAll(context.Context) []Record Iterate(context.Context, Key, func(Record) bool) IterateAll(context.Context, func(Record) bool) IteratePaginated(context.Context, Key, int32, func(Record) bool) StoreDecoder(kv.Pair, kv.Pair) string Initialize(*sdkTypes.KVStoreKey) Mapper }
type Message ¶
type Message interface { // TODO check if register message code is required RegisterLegacyAminoCodec(*codec.LegacyAmino) RegisterInterface(types.InterfaceRegistry) Type() string sdkTypes.Msg }
type Module ¶
type Module interface { sdkModuleTypes.EndBlockAppModule sdkModuleTypes.BeginBlockAppModule sdkModuleTypes.AppModuleSimulation GetAuxiliary(string) Auxiliary DecodeModuleTransactionRequest(string, json.RawMessage) (sdkTypes.Msg, error) Initialize(*sdkTypes.KVStoreKey, paramsTypes.Subspace, ...interface{}) Module GetTransactions() Transactions }
type ParameterManager ¶
type ParameterManager interface { Get() lists.ParameterList GetValidatableParameter(ids.PropertyID) ValidatableParameter GetParameter(ids.PropertyID) parameters.Parameter ValidateParameter(parameters.Parameter) error Fetch(context.Context) ParameterManager Set(context.Context, lists.ParameterList) GetKeyTable() paramsTypes.KeyTable RESTQueryHandler(client.Context) http.HandlerFunc Initialize(paramsTypes.Subspace) ParameterManager }
type Query ¶
type Query interface { GetName() string Command() *cobra.Command HandleQuery(context.Context, abciTypes.RequestQuery) ([]byte, error) RESTQueryHandler(client.Context) http.HandlerFunc RegisterService(module.Configurator) RegisterGRPCGatewayRoute(client.Context, *runtime.ServeMux) Initialize(Mapper, ParameterManager, ...interface{}) Query }
type QueryKeeper ¶
type QueryKeeper interface { Enquire(context.Context, QueryRequest) (QueryResponse, error) Keeper }
type QueryRequest ¶
type QueryRequest interface { Request FromCLI(CLICommand, client.Context) (QueryRequest, error) FromHTTPRequest(*http.Request) (QueryRequest, error) Encode() ([]byte, error) Decode([]byte) (QueryRequest, error) }
type QueryResponse ¶
type Simulator ¶
type Simulator interface { RandomizedGenesisState(*module.SimulationState) WeightedOperations(module.SimulationState, Module) simulation.WeightedOperations WeightedProposalContentList(module.SimulationState) []simulationTypes.WeightedProposalContent ParamChangeList(*rand.Rand) []simulationTypes.ParamChange }
type Transaction ¶
type Transaction interface { GetName() string Command() *cobra.Command HandleMessage(context.Context, Message) (*sdkTypes.Result, error) RESTRequestHandler(client.Context) http.HandlerFunc RegisterLegacyAminoCodec(amino *codec.LegacyAmino) RegisterInterfaces(types.InterfaceRegistry) RegisterService(module.Configurator) RegisterGRPCGatewayRoute(client.Context, *runtime.ServeMux) DecodeTransactionRequest(json.RawMessage) (sdkTypes.Msg, error) InitializeKeeper(Mapper, ParameterManager, ...interface{}) Transaction }
type TransactionKeeper ¶
type TransactionRequest ¶
type TransactionRequest interface { GetBaseReq() rest.BaseReq FromCLI(CLICommand, client.Context) (TransactionRequest, error) FromJSON(json.RawMessage) (TransactionRequest, error) MakeMsg() (sdkTypes.Msg, error) RegisterLegacyAminoCodec(*codec.LegacyAmino) Request }
type TransactionResponse ¶
type Transactions ¶
type Transactions interface { Get() []Transaction GetTransaction(string) Transaction }
type ValidatableParameter ¶
type ValidatableParameter interface { GetParameter() parameters.Parameter Mutate(data.Data) ValidatableParameter GetValidator() func(i interface{}) error Validate() error }
type WasmMessage ¶
type WasmMessage interface { GetType() string GetRawMessage() json.RawMessage }
type WasmMessagePrototype ¶
type WasmMessagePrototype func() WasmMessage
Source Files ¶
- auxilary_request.go
- auxiliaries.go
- auxiliary.go
- auxiliary_keeper.go
- auxiliary_response.go
- block.go
- cli_command.go
- cli_flag.go
- codec.go
- collection.go
- genesis.go
- invariants.go
- keeper.go
- key.go
- legacy_codec.go
- mappable.go
- mapper.go
- message.go
- module.go
- parameter_manager.go
- queries.go
- query.go
- query_keeper.go
- query_request.go
- query_response.go
- record.go
- request.go
- response.go
- simulator.go
- transaction.go
- transaction_keeper.go
- transaction_request.go
- transaction_response.go
- transactions.go
- validatable_parameter.go
- wasm_message.go
Click to show internal directories.
Click to hide internal directories.