types

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimerVersionKey = "Timer_Version"
	NextTimerPrefix = "Timer_Next_"
	TimerPrefix     = "Timer_Value_"
)

Variables

View Source
var (
	ErrInvalidLengthTimer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTimer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTimer = fmt.Errorf("proto: unexpected end of group")
)
View Source
var NextTimerKey = []string{
	"NextBlock",
	"NextDate",
}
View Source
var TimerTypePrefix = []string{
	"Block_",
	"Time_",
}

Functions

func DecodeBlockAndKey

func DecodeBlockAndKey(encodedKey []byte) (uint64, []byte)

func DecodeKey

func DecodeKey(encodedKey []byte) uint64

func EncodeBlockAndKey

func EncodeBlockAndKey(block uint64, key []byte) []byte

func EncodeKey

func EncodeKey(key uint64) []byte

func KeyPrefix

func KeyPrefix(p string) []byte

Types

type GenesisState

type GenesisState struct {
	Version         uint64              `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	NextBlockHeight uint64              `protobuf:"varint,2,opt,name=next_block_height,json=nextBlockHeight,proto3" json:"next_block_height,omitempty"`
	NextBlockTime   uint64              `protobuf:"varint,3,opt,name=next_block_time,json=nextBlockTime,proto3" json:"next_block_time,omitempty"`
	TimeEntries     []GenesisTimerEntry `protobuf:"bytes,4,rep,name=time_entries,json=timeEntries,proto3" json:"time_entries"`
	BlockEntries    []GenesisTimerEntry `protobuf:"bytes,5,rep,name=block_entries,json=blockEntries,proto3" json:"block_entries"`
}

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetBlockEntries

func (m *GenesisState) GetBlockEntries() []GenesisTimerEntry

func (*GenesisState) GetNextBlockHeight

func (m *GenesisState) GetNextBlockHeight() uint64

func (*GenesisState) GetNextBlockTime

func (m *GenesisState) GetNextBlockTime() uint64

func (*GenesisState) GetTimeEntries

func (m *GenesisState) GetTimeEntries() []GenesisTimerEntry

func (*GenesisState) GetVersion

func (m *GenesisState) GetVersion() uint64

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type GenesisTimerEntry

type GenesisTimerEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	Data  []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}

func (*GenesisTimerEntry) Descriptor

func (*GenesisTimerEntry) Descriptor() ([]byte, []int)

func (*GenesisTimerEntry) GetData

func (m *GenesisTimerEntry) GetData() []byte

func (*GenesisTimerEntry) GetKey

func (m *GenesisTimerEntry) GetKey() string

func (*GenesisTimerEntry) GetValue

func (m *GenesisTimerEntry) GetValue() uint64

func (*GenesisTimerEntry) Marshal

func (m *GenesisTimerEntry) Marshal() (dAtA []byte, err error)

func (*GenesisTimerEntry) MarshalTo

func (m *GenesisTimerEntry) MarshalTo(dAtA []byte) (int, error)

func (*GenesisTimerEntry) MarshalToSizedBuffer

func (m *GenesisTimerEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisTimerEntry) ProtoMessage

func (*GenesisTimerEntry) ProtoMessage()

func (*GenesisTimerEntry) Reset

func (m *GenesisTimerEntry) Reset()

func (*GenesisTimerEntry) Size

func (m *GenesisTimerEntry) Size() (n int)

func (*GenesisTimerEntry) String

func (m *GenesisTimerEntry) String() string

func (*GenesisTimerEntry) Unmarshal

func (m *GenesisTimerEntry) Unmarshal(dAtA []byte) error

func (*GenesisTimerEntry) XXX_DiscardUnknown

func (m *GenesisTimerEntry) XXX_DiscardUnknown()

func (*GenesisTimerEntry) XXX_Marshal

func (m *GenesisTimerEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisTimerEntry) XXX_Merge

func (m *GenesisTimerEntry) XXX_Merge(src proto.Message)

func (*GenesisTimerEntry) XXX_Size

func (m *GenesisTimerEntry) XXX_Size() int

func (*GenesisTimerEntry) XXX_Unmarshal

func (m *GenesisTimerEntry) XXX_Unmarshal(b []byte) error

type TimerType

type TimerType int
const (
	BlockHeight TimerType = iota
	BlockTime
)

Jump to

Keyboard shortcuts

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