Documentation ¶
Index ¶
- Constants
- Variables
- func ACLWriterKey(ownerAddr sdk.AccAddress, topic string, writerAddr sdk.Address) []byte
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- func NewHandler(keeper Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func OwnerKey(ownerAddr sdk.AccAddress) []byte
- func RecordKey(ownerAddr sdk.AccAddress, topic string, offset uint64) []byte
- func TopicKey(ownerAddr sdk.AccAddress, topic string) []byte
- func ValidateGenesis(data GenesisState) error
- type GenesisOwnerKey
- type GenesisRecordKey
- type GenesisState
- type GenesisTopicKey
- type GenesisWriterKey
- type Keeper
- func (k Keeper) DeleteWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, ...)
- func (k Keeper) GetOwner(ctx sdk.Context, ownerAddr sdk.AccAddress) types.Owner
- func (k Keeper) GetRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64) types.Record
- func (k Keeper) GetTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string) types.Topic
- func (k Keeper) GetWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, ...) types.Writer
- func (k Keeper) HasRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64) bool
- func (k Keeper) HasTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string) bool
- func (k Keeper) HasWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, ...) bool
- func (k Keeper) ListOwner(ctx sdk.Context) []sdk.AccAddress
- func (k Keeper) ListTopic(ctx sdk.Context, ownerAddr sdk.AccAddress) []string
- func (k Keeper) ListWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string) []sdk.AccAddress
- func (k Keeper) SetOwner(ctx sdk.Context, ownerAddr sdk.AccAddress, owner types.Owner)
- func (k Keeper) SetRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64, ...)
- func (k Keeper) SetTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string, topic types.Topic)
- func (k Keeper) SetWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, ...)
- type MsgAddRecord
- type MsgAddWriter
- type MsgCreateTopic
- type MsgDeleteWriter
- type QueryListTopicParams
- type QueryListWriterParams
- type QueryRecordParams
- type QueryTopicParams
- type QueryWriterParams
Constants ¶
View Source
const ( ModuleName = types.ModuleName StoreKey = types.StoreKey RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute )
View Source
const ( QueryListTopic = "listTopic" QueryTopic = "topic" QueryListWriter = "listWriter" QueryWriter = "writer" QueryRecord = "record" )
query endpoints supported by the aol querier
Variables ¶
View Source
var ( KeyDelimiter = []byte{0x00} OwnerKeyPrefix = []byte{0x11} // {Prefix}{Owner} TopicKeyPrefix = []byte{0x12} // {Prefix}{Owner}{Topic} ACLWriterPrefix = []byte{0x13} // {Prefix}{Owner}{Topic}{Writer} RecordKeyPrefix = []byte{0x14} // {Prefix}{Owner}{Topic}{Offset} )
View Source
var (
RegisterCodec = types.RegisterCodec
)
Functions ¶
func ACLWriterKey ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
func NewHandler ¶
NewHandler returns a handler for "aol" type messages
func NewQuerier ¶
NewQuerier is the module level router for state queries
func OwnerKey ¶
func OwnerKey(ownerAddr sdk.AccAddress) []byte
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type GenesisOwnerKey ¶
type GenesisOwnerKey struct {
OwnerAddress sdk.AccAddress `json:"owner_address"`
}
GenesisOwnerKey
func (GenesisOwnerKey) Marshal ¶
func (k GenesisOwnerKey) Marshal() string
func (*GenesisOwnerKey) Unmarshal ¶
func (k *GenesisOwnerKey) Unmarshal(key string) error
type GenesisRecordKey ¶
type GenesisRecordKey struct { OwnerAddress sdk.AccAddress `json:"owner_address"` TopicName string `json:"topic_name"` Offset uint64 `json:"offset"` }
GenesisRecordKey
func (GenesisRecordKey) Marshal ¶
func (k GenesisRecordKey) Marshal() string
func (*GenesisRecordKey) Unmarshal ¶
func (k *GenesisRecordKey) Unmarshal(key string) error
type GenesisState ¶
type GenesisState struct { Owners map[string]types.Owner `json:"owners"` Topics map[string]types.Topic `json:"topics"` Writers map[string]types.Writer `json:"writers"` Records map[string]types.Record `json:"records"` }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
type GenesisTopicKey ¶
type GenesisTopicKey struct { OwnerAddress sdk.AccAddress `json:"owner_address"` TopicName string `json:"topic_name"` }
GenesisTopicKey
func (GenesisTopicKey) Marshal ¶
func (k GenesisTopicKey) Marshal() string
func (*GenesisTopicKey) Unmarshal ¶
func (k *GenesisTopicKey) Unmarshal(key string) error
type GenesisWriterKey ¶
type GenesisWriterKey struct { OwnerAddress sdk.AccAddress `json:"owner_address"` TopicName string `json:"topic_name"` WriterAddress sdk.AccAddress `json:"writer_address"` }
GenesisWriterKey
func (GenesisWriterKey) Marshal ¶
func (k GenesisWriterKey) Marshal() string
func (*GenesisWriterKey) Unmarshal ¶
func (k *GenesisWriterKey) Unmarshal(key string) error
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func (Keeper) DeleteWriter ¶
func (k Keeper) DeleteWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress)
func (Keeper) GetWriter ¶
func (k Keeper) GetWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress) types.Writer
func (Keeper) HasWriter ¶
func (k Keeper) HasWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress) bool
func (Keeper) ListWriter ¶
func (k Keeper) ListWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string) []sdk.AccAddress
TODO Max Retrieve
type MsgAddRecord ¶
type MsgAddRecord = types.MsgAddRecord
type MsgAddWriter ¶
type MsgAddWriter = types.MsgAddWriter
type MsgCreateTopic ¶
type MsgCreateTopic = types.MsgCreateTopic
type MsgDeleteWriter ¶
type MsgDeleteWriter = types.MsgDeleteWriter
type QueryListTopicParams ¶
type QueryListTopicParams struct {
Owner sdk.AccAddress
}
type QueryListWriterParams ¶
type QueryListWriterParams struct { Owner sdk.AccAddress TopicName string }
type QueryRecordParams ¶
type QueryRecordParams struct { Owner sdk.AccAddress TopicName string Offset uint64 }
type QueryTopicParams ¶
type QueryTopicParams struct { Owner sdk.AccAddress TopicName string }
type QueryWriterParams ¶
type QueryWriterParams struct { Owner sdk.AccAddress TopicName string Writer sdk.AccAddress }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.