common

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FixationStore

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

func NewFixationStore

func NewFixationStore(storeKey sdk.StoreKey, cdc codec.BinaryCodec, prefix string) *FixationStore

NewFixationStore returns a new FixationStore object

func (*FixationStore) AppendEntry

func (fs *FixationStore) AppendEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) error

AppendEntry adds a new entry to the store

func (*FixationStore) FindEntry

func (fs *FixationStore) FindEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (error, bool)

get entry with index and block without influencing the entry's refs

func (FixationStore) GetAllEntryIndices

func (fs FixationStore) GetAllEntryIndices(ctx sdk.Context) []string

GetAllEntryIndex returns all EntryIndex

func (*FixationStore) GetCdc

func (fs *FixationStore) GetCdc() codec.BinaryCodec

GetCdc returns the Fixation store's codec

func (*FixationStore) GetEntry

func (fs *FixationStore) GetEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (error, bool)

get entry with index and block with ref increase

func (*FixationStore) GetPrefix

func (fs *FixationStore) GetPrefix() string

Getprefix returns the Fixation store's fixation key

func (*FixationStore) GetStoreKey

func (fs *FixationStore) GetStoreKey() sdk.StoreKey

GetStoreKey returns the Fixation store's store key

func (*FixationStore) ModifyEntry

func (fs *FixationStore) ModifyEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) error

ModifyEntry modifies an exisiting entry in the store

func (*FixationStore) PutEntry

func (fs *FixationStore) PutEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (error, bool)

get entry with index and block with ref decrease

func (FixationStore) SetEntryIndex

func (fs FixationStore) SetEntryIndex(ctx sdk.Context, index string)

SetEntryIndex appends an entry index in the store with a new id and updates the count. It returns the index in the list of the added value (for example, if the first value of the list is added, it'll return 0 (the first index in the list))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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