keeper

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

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}
)

Functions

func ACLWriterKey

func ACLWriterKey(ownerAddr sdk.AccAddress, topic string, writerAddr sdk.Address) []byte

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState)

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

func OwnerKey

func OwnerKey(ownerAddr sdk.AccAddress) []byte

func RecordKey

func RecordKey(ownerAddr sdk.AccAddress, topic string, offset uint64) []byte

func TopicKey

func TopicKey(ownerAddr sdk.AccAddress, topic string) []byte

Types

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 NewKeeper

func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the aol Keeper

func (Keeper) DeleteWriter

func (k Keeper) DeleteWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress)

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, ownerAddr sdk.AccAddress) types.Owner

func (Keeper) GetRecord

func (k Keeper) GetRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64) types.Record

func (Keeper) GetTopic

func (k Keeper) GetTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string) types.Topic

func (Keeper) GetWriter

func (k Keeper) GetWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress) types.Writer

func (Keeper) HasRecord

func (k Keeper) HasRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64) bool

func (Keeper) HasTopic

func (k Keeper) HasTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string) bool

func (Keeper) HasWriter

func (k Keeper) HasWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress) bool

func (Keeper) ListOwner

func (k Keeper) ListOwner(ctx sdk.Context) []sdk.AccAddress

func (Keeper) ListTopic

func (k Keeper) ListTopic(ctx sdk.Context, ownerAddr sdk.AccAddress) []string

func (Keeper) ListWriter

func (k Keeper) ListWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string) []sdk.AccAddress

TODO Max Retrieve

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, ownerAddr sdk.AccAddress, owner types.Owner)

func (Keeper) SetRecord

func (k Keeper) SetRecord(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, offset uint64, record types.Record)

func (Keeper) SetTopic

func (k Keeper) SetTopic(ctx sdk.Context, ownerAddr sdk.AccAddress, topicName string, topic types.Topic)

func (Keeper) SetWriter

func (k Keeper) SetWriter(ctx sdk.Context, ownerAddr sdk.AccAddress, topic string, writerAddr sdk.AccAddress, writer types.Writer)

Jump to

Keyboard shortcuts

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