v040

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "beacon"

Variables

View Source
var (
	ErrInvalidLengthBeacon        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBeacon          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBeacon = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// RegisteredBeaconPrefix prefix for registered BEACON store
	RegisteredBeaconPrefix = []byte{0x01}

	// RecordedBeaconTimestampPrefix prefix for BEACON Timestamps store
	RecordedBeaconTimestampPrefix = []byte{0x02}
)

Functions

func BeaconAllTimestampsKey added in v1.6.1

func BeaconAllTimestampsKey(beaconID uint64) []byte

BeaconAllTimestampsKey gets the key for a specific BEACON's timestamps

func BeaconKey added in v1.6.1

func BeaconKey(beaconID uint64) []byte

BeaconKey gets a specific purchase order ID key for use in the store

func BeaconTimestampKey added in v1.6.1

func BeaconTimestampKey(beaconID, timestampID uint64) []byte

BeaconTimestampKey gets the key for a single BEACON's specific timestamp ID

func GetBeaconIDBytes added in v1.6.1

func GetBeaconIDBytes(beaconID uint64) (beaconIDBz []byte)

GetBeaconIDBytes returns the byte representation of the BeaconID used for getting the highest Beacon ID from the database

func GetTimestampIDBytes added in v1.6.1

func GetTimestampIDBytes(timestampID uint64) (timestampIDBz []byte)

Types

type Beacon added in v1.6.1

type Beacon struct {
	BeaconId        uint64 `protobuf:"varint,1,opt,name=beacon_id,json=beaconId,proto3" json:"beacon_id,omitempty"`
	Moniker         string `protobuf:"bytes,2,opt,name=moniker,proto3" json:"moniker,omitempty"`
	Name            string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	LastTimestampId uint64 `protobuf:"varint,4,opt,name=last_timestamp_id,json=lastTimestampId,proto3" json:"last_timestamp_id,omitempty"`
	FirstIdInState  uint64 `protobuf:"varint,5,opt,name=first_id_in_state,json=firstIdInState,proto3" json:"first_id_in_state,omitempty"`
	NumInState      uint64 `protobuf:"varint,6,opt,name=num_in_state,json=numInState,proto3" json:"num_in_state,omitempty"`
	RegTime         uint64 `protobuf:"varint,7,opt,name=reg_time,json=regTime,proto3" json:"reg_time,omitempty"`
	Owner           string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"`
}

Beacon holds metadata about a registered beacon

func (*Beacon) Descriptor added in v1.6.1

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

func (*Beacon) GetBeaconId added in v1.6.1

func (m *Beacon) GetBeaconId() uint64

func (*Beacon) GetFirstIdInState added in v1.6.1

func (m *Beacon) GetFirstIdInState() uint64

func (*Beacon) GetLastTimestampId added in v1.6.1

func (m *Beacon) GetLastTimestampId() uint64

func (*Beacon) GetMoniker added in v1.6.1

func (m *Beacon) GetMoniker() string

func (*Beacon) GetName added in v1.6.1

func (m *Beacon) GetName() string

func (*Beacon) GetNumInState added in v1.6.1

func (m *Beacon) GetNumInState() uint64

func (*Beacon) GetOwner added in v1.6.1

func (m *Beacon) GetOwner() string

func (*Beacon) GetRegTime added in v1.6.1

func (m *Beacon) GetRegTime() uint64

func (*Beacon) Marshal added in v1.6.1

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

func (*Beacon) MarshalTo added in v1.6.1

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

func (*Beacon) MarshalToSizedBuffer added in v1.6.1

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

func (*Beacon) ProtoMessage added in v1.6.1

func (*Beacon) ProtoMessage()

func (*Beacon) Reset added in v1.6.1

func (m *Beacon) Reset()

func (*Beacon) Size added in v1.6.1

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

func (*Beacon) String added in v1.6.1

func (m *Beacon) String() string

func (*Beacon) Unmarshal added in v1.6.1

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

func (*Beacon) XXX_DiscardUnknown added in v1.6.1

func (m *Beacon) XXX_DiscardUnknown()

func (*Beacon) XXX_Marshal added in v1.6.1

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

func (*Beacon) XXX_Merge added in v1.6.1

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

func (*Beacon) XXX_Size added in v1.6.1

func (m *Beacon) XXX_Size() int

func (*Beacon) XXX_Unmarshal added in v1.6.1

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

type BeaconExport added in v1.6.1

type BeaconExport struct {
	Beacon     Beacon                        `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon"`
	Timestamps BeaconTimestampGenesisExports `protobuf:"bytes,2,rep,name=timestamps,proto3,castrepeated=BeaconTimestampGenesisExports" json:"timestamps"`
}

BeaconExport holds genesis export data for a beacon, including submitted timestamps

func (*BeaconExport) Descriptor added in v1.6.1

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

func (*BeaconExport) GetBeacon added in v1.6.1

func (m *BeaconExport) GetBeacon() Beacon

func (*BeaconExport) GetTimestamps added in v1.6.1

func (m *BeaconExport) GetTimestamps() BeaconTimestampGenesisExports

func (*BeaconExport) Marshal added in v1.6.1

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

func (*BeaconExport) MarshalTo added in v1.6.1

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

func (*BeaconExport) MarshalToSizedBuffer added in v1.6.1

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

func (*BeaconExport) ProtoMessage added in v1.6.1

func (*BeaconExport) ProtoMessage()

func (*BeaconExport) Reset added in v1.6.1

func (m *BeaconExport) Reset()

func (*BeaconExport) Size added in v1.6.1

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

func (*BeaconExport) String added in v1.6.1

func (m *BeaconExport) String() string

func (*BeaconExport) Unmarshal added in v1.6.1

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

func (*BeaconExport) XXX_DiscardUnknown added in v1.6.1

func (m *BeaconExport) XXX_DiscardUnknown()

func (*BeaconExport) XXX_Marshal added in v1.6.1

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

func (*BeaconExport) XXX_Merge added in v1.6.1

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

func (*BeaconExport) XXX_Size added in v1.6.1

func (m *BeaconExport) XXX_Size() int

func (*BeaconExport) XXX_Unmarshal added in v1.6.1

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

type BeaconExports added in v1.6.1

type BeaconExports []BeaconExport

type BeaconTimestamp added in v1.6.1

type BeaconTimestamp struct {
	TimestampId uint64 `protobuf:"varint,1,opt,name=timestamp_id,json=timestampId,proto3" json:"timestamp_id,omitempty"`
	SubmitTime  uint64 `protobuf:"varint,2,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
	Hash        string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}

BeaconTimestamp holds each hash submitted to a registered beacon

func (*BeaconTimestamp) Descriptor added in v1.6.1

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

func (*BeaconTimestamp) GetHash added in v1.6.1

func (m *BeaconTimestamp) GetHash() string

func (*BeaconTimestamp) GetSubmitTime added in v1.6.1

func (m *BeaconTimestamp) GetSubmitTime() uint64

func (*BeaconTimestamp) GetTimestampId added in v1.6.1

func (m *BeaconTimestamp) GetTimestampId() uint64

func (*BeaconTimestamp) Marshal added in v1.6.1

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

func (*BeaconTimestamp) MarshalTo added in v1.6.1

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

func (*BeaconTimestamp) MarshalToSizedBuffer added in v1.6.1

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

func (*BeaconTimestamp) ProtoMessage added in v1.6.1

func (*BeaconTimestamp) ProtoMessage()

func (*BeaconTimestamp) Reset added in v1.6.1

func (m *BeaconTimestamp) Reset()

func (*BeaconTimestamp) Size added in v1.6.1

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

func (*BeaconTimestamp) String added in v1.6.1

func (m *BeaconTimestamp) String() string

func (*BeaconTimestamp) Unmarshal added in v1.6.1

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

func (*BeaconTimestamp) XXX_DiscardUnknown added in v1.6.1

func (m *BeaconTimestamp) XXX_DiscardUnknown()

func (*BeaconTimestamp) XXX_Marshal added in v1.6.1

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

func (*BeaconTimestamp) XXX_Merge added in v1.6.1

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

func (*BeaconTimestamp) XXX_Size added in v1.6.1

func (m *BeaconTimestamp) XXX_Size() int

func (*BeaconTimestamp) XXX_Unmarshal added in v1.6.1

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

type BeaconTimestampGenesisExport added in v1.6.1

type BeaconTimestampGenesisExport struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	T  uint64 `protobuf:"varint,2,opt,name=t,proto3" json:"t,omitempty"`
	H  string `protobuf:"bytes,3,opt,name=h,proto3" json:"h,omitempty"`
}

BeaconTimestampGenesisExport is a trimmed version of BeaconTimestamp for genesis exports to conserve space

func (*BeaconTimestampGenesisExport) Descriptor added in v1.6.1

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

func (*BeaconTimestampGenesisExport) GetH added in v1.6.1

func (*BeaconTimestampGenesisExport) GetId added in v1.6.1

func (*BeaconTimestampGenesisExport) GetT added in v1.6.1

func (*BeaconTimestampGenesisExport) Marshal added in v1.6.1

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

func (*BeaconTimestampGenesisExport) MarshalTo added in v1.6.1

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

func (*BeaconTimestampGenesisExport) MarshalToSizedBuffer added in v1.6.1

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

func (*BeaconTimestampGenesisExport) ProtoMessage added in v1.6.1

func (*BeaconTimestampGenesisExport) ProtoMessage()

func (*BeaconTimestampGenesisExport) Reset added in v1.6.1

func (m *BeaconTimestampGenesisExport) Reset()

func (*BeaconTimestampGenesisExport) Size added in v1.6.1

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

func (*BeaconTimestampGenesisExport) String added in v1.6.1

func (*BeaconTimestampGenesisExport) Unmarshal added in v1.6.1

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

func (*BeaconTimestampGenesisExport) XXX_DiscardUnknown added in v1.6.1

func (m *BeaconTimestampGenesisExport) XXX_DiscardUnknown()

func (*BeaconTimestampGenesisExport) XXX_Marshal added in v1.6.1

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

func (*BeaconTimestampGenesisExport) XXX_Merge added in v1.6.1

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

func (*BeaconTimestampGenesisExport) XXX_Size added in v1.6.1

func (m *BeaconTimestampGenesisExport) XXX_Size() int

func (*BeaconTimestampGenesisExport) XXX_Unmarshal added in v1.6.1

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

type BeaconTimestampGenesisExports added in v1.6.1

type BeaconTimestampGenesisExports []BeaconTimestampGenesisExport

type GenesisState added in v1.6.1

type GenesisState struct {
	// params defines all the paramaters of the module.
	Params            Params        `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	StartingBeaconId  uint64        `protobuf:"varint,2,opt,name=starting_beacon_id,json=startingBeaconId,proto3" json:"starting_beacon_id,omitempty"`
	RegisteredBeacons BeaconExports `` /* 129-byte string literal not displayed */
}

GenesisState defines the beacon module's genesis state.

func (*GenesisState) Descriptor added in v1.6.1

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

func (*GenesisState) GetParams added in v1.6.1

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRegisteredBeacons added in v1.6.1

func (m *GenesisState) GetRegisteredBeacons() BeaconExports

func (*GenesisState) GetStartingBeaconId added in v1.6.1

func (m *GenesisState) GetStartingBeaconId() uint64

func (*GenesisState) Marshal added in v1.6.1

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

func (*GenesisState) MarshalTo added in v1.6.1

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

func (*GenesisState) MarshalToSizedBuffer added in v1.6.1

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

func (*GenesisState) ProtoMessage added in v1.6.1

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v1.6.1

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v1.6.1

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

func (*GenesisState) String added in v1.6.1

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v1.6.1

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

func (*GenesisState) XXX_DiscardUnknown added in v1.6.1

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v1.6.1

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

func (*GenesisState) XXX_Merge added in v1.6.1

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

func (*GenesisState) XXX_Size added in v1.6.1

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v1.6.1

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

type Params added in v1.6.1

type Params struct {
	FeeRegister uint64 `protobuf:"varint,1,opt,name=fee_register,json=feeRegister,proto3" json:"fee_register,omitempty"`
	FeeRecord   uint64 `protobuf:"varint,2,opt,name=fee_record,json=feeRecord,proto3" json:"fee_record,omitempty"`
	Denom       string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"`
}

Params defines the parameters for the beacon module.

func (*Params) Descriptor added in v1.6.1

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

func (*Params) GetDenom added in v1.6.1

func (m *Params) GetDenom() string

func (*Params) GetFeeRecord added in v1.6.1

func (m *Params) GetFeeRecord() uint64

func (*Params) GetFeeRegister added in v1.6.1

func (m *Params) GetFeeRegister() uint64

func (*Params) Marshal added in v1.6.1

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

func (*Params) MarshalTo added in v1.6.1

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

func (*Params) MarshalToSizedBuffer added in v1.6.1

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

func (*Params) ProtoMessage added in v1.6.1

func (*Params) ProtoMessage()

func (*Params) Reset added in v1.6.1

func (m *Params) Reset()

func (*Params) Size added in v1.6.1

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

func (*Params) String added in v1.6.1

func (m *Params) String() string

func (*Params) Unmarshal added in v1.6.1

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

func (*Params) XXX_DiscardUnknown added in v1.6.1

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v1.6.1

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

func (*Params) XXX_Merge added in v1.6.1

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

func (*Params) XXX_Size added in v1.6.1

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v1.6.1

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

Jump to

Keyboard shortcuts

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