keeper

package
v0.0.0-...-305c64e Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMeasureIDBytes

func GetMeasureIDBytes(id uint64) []byte

GetMeasureIDBytes returns the byte representation of the ID

func GetMeasureIDFromBytes

func GetMeasureIDFromBytes(bz []byte) uint64

GetMeasureIDFromBytes returns ID in uint64 format from a byte array

func GetTimeseriesIDBytes

func GetTimeseriesIDBytes(id uint64) []byte

GetTimeseriesIDBytes returns the byte representation of the ID

func GetTimeseriesIDFromBytes

func GetTimeseriesIDFromBytes(bz []byte) uint64

GetTimeseriesIDFromBytes returns ID in uint64 format from a byte array

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,

) *Keeper

func (Keeper) AppendMeasure

func (k Keeper) AppendMeasure(
	ctx sdk.Context,
	measure types.Measure,
) uint64

AppendMeasure appends a measure in the store with a new id and update the count

func (Keeper) AppendTimeseries

func (k Keeper) AppendTimeseries(
	ctx sdk.Context,
	timeseries types.Timeseries,
) uint64

AppendTimeseries appends a timeseries in the store with a new id and update the count

func (Keeper) GetAllMeasure

func (k Keeper) GetAllMeasure(ctx sdk.Context) (list []types.Measure)

GetAllMeasure returns all measure

func (Keeper) GetAllTimeseries

func (k Keeper) GetAllTimeseries(ctx sdk.Context) (list []types.Timeseries)

GetAllTimeseries returns all timeseries

func (Keeper) GetMeasure

func (k Keeper) GetMeasure(ctx sdk.Context, id uint64) (val types.Measure, found bool)

GetMeasure returns a measure from its id

func (Keeper) GetMeasureCount

func (k Keeper) GetMeasureCount(ctx sdk.Context) uint64

GetMeasureCount get the total number of measure

func (Keeper) GetTimeseries

func (k Keeper) GetTimeseries(ctx sdk.Context, id uint64) (val types.Timeseries, found bool)

GetTimeseries returns a timeseries from its id

func (Keeper) GetTimeseriesCount

func (k Keeper) GetTimeseriesCount(ctx sdk.Context) uint64

GetTimeseriesCount get the total number of timeseries

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) RemoveMeasure

func (k Keeper) RemoveMeasure(ctx sdk.Context, id uint64)

RemoveMeasure removes a measure from the store

func (Keeper) RemoveTimeseries

func (k Keeper) RemoveTimeseries(ctx sdk.Context, id uint64)

RemoveTimeseries removes a timeseries from the store

func (Keeper) SetMeasure

func (k Keeper) SetMeasure(ctx sdk.Context, measure types.Measure)

SetMeasure set a specific measure in the store

func (Keeper) SetMeasureCount

func (k Keeper) SetMeasureCount(ctx sdk.Context, count uint64)

SetMeasureCount set the total number of measure

func (Keeper) SetTimeseries

func (k Keeper) SetTimeseries(ctx sdk.Context, timeseries types.Timeseries)

SetTimeseries set a specific timeseries in the store

func (Keeper) SetTimeseriesCount

func (k Keeper) SetTimeseriesCount(ctx sdk.Context, count uint64)

SetTimeseriesCount set the total number of timeseries

Jump to

Keyboard shortcuts

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