Documentation ¶
Index ¶
- Constants
- Variables
- func BeaconAllTimestampsKey(beaconID uint64) []byte
- func BeaconKey(beaconID uint64) []byte
- func BeaconTimestampKey(beaconID, timestampID uint64) []byte
- func GetBeaconIDBytes(beaconID uint64) (beaconIDBz []byte)
- func GetTimestampIDBytes(timestampID uint64) (timestampIDBz []byte)
- type Beacon
- func (*Beacon) Descriptor() ([]byte, []int)
- func (m *Beacon) GetBeaconId() uint64
- func (m *Beacon) GetFirstIdInState() uint64
- func (m *Beacon) GetLastTimestampId() uint64
- func (m *Beacon) GetMoniker() string
- func (m *Beacon) GetName() string
- func (m *Beacon) GetNumInState() uint64
- func (m *Beacon) GetOwner() string
- func (m *Beacon) GetRegTime() uint64
- func (m *Beacon) Marshal() (dAtA []byte, err error)
- func (m *Beacon) MarshalTo(dAtA []byte) (int, error)
- func (m *Beacon) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Beacon) ProtoMessage()
- func (m *Beacon) Reset()
- func (m *Beacon) Size() (n int)
- func (m *Beacon) String() string
- func (m *Beacon) Unmarshal(dAtA []byte) error
- func (m *Beacon) XXX_DiscardUnknown()
- func (m *Beacon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Beacon) XXX_Merge(src proto.Message)
- func (m *Beacon) XXX_Size() int
- func (m *Beacon) XXX_Unmarshal(b []byte) error
- type BeaconExport
- func (*BeaconExport) Descriptor() ([]byte, []int)
- func (m *BeaconExport) GetBeacon() Beacon
- func (m *BeaconExport) GetTimestamps() BeaconTimestampGenesisExports
- func (m *BeaconExport) Marshal() (dAtA []byte, err error)
- func (m *BeaconExport) MarshalTo(dAtA []byte) (int, error)
- func (m *BeaconExport) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BeaconExport) ProtoMessage()
- func (m *BeaconExport) Reset()
- func (m *BeaconExport) Size() (n int)
- func (m *BeaconExport) String() string
- func (m *BeaconExport) Unmarshal(dAtA []byte) error
- func (m *BeaconExport) XXX_DiscardUnknown()
- func (m *BeaconExport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BeaconExport) XXX_Merge(src proto.Message)
- func (m *BeaconExport) XXX_Size() int
- func (m *BeaconExport) XXX_Unmarshal(b []byte) error
- type BeaconExports
- type BeaconTimestamp
- func (*BeaconTimestamp) Descriptor() ([]byte, []int)
- func (m *BeaconTimestamp) GetHash() string
- func (m *BeaconTimestamp) GetSubmitTime() uint64
- func (m *BeaconTimestamp) GetTimestampId() uint64
- func (m *BeaconTimestamp) Marshal() (dAtA []byte, err error)
- func (m *BeaconTimestamp) MarshalTo(dAtA []byte) (int, error)
- func (m *BeaconTimestamp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BeaconTimestamp) ProtoMessage()
- func (m *BeaconTimestamp) Reset()
- func (m *BeaconTimestamp) Size() (n int)
- func (m *BeaconTimestamp) String() string
- func (m *BeaconTimestamp) Unmarshal(dAtA []byte) error
- func (m *BeaconTimestamp) XXX_DiscardUnknown()
- func (m *BeaconTimestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BeaconTimestamp) XXX_Merge(src proto.Message)
- func (m *BeaconTimestamp) XXX_Size() int
- func (m *BeaconTimestamp) XXX_Unmarshal(b []byte) error
- type BeaconTimestampGenesisExport
- func (*BeaconTimestampGenesisExport) Descriptor() ([]byte, []int)
- func (m *BeaconTimestampGenesisExport) GetH() string
- func (m *BeaconTimestampGenesisExport) GetId() uint64
- func (m *BeaconTimestampGenesisExport) GetT() uint64
- func (m *BeaconTimestampGenesisExport) Marshal() (dAtA []byte, err error)
- func (m *BeaconTimestampGenesisExport) MarshalTo(dAtA []byte) (int, error)
- func (m *BeaconTimestampGenesisExport) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BeaconTimestampGenesisExport) ProtoMessage()
- func (m *BeaconTimestampGenesisExport) Reset()
- func (m *BeaconTimestampGenesisExport) Size() (n int)
- func (m *BeaconTimestampGenesisExport) String() string
- func (m *BeaconTimestampGenesisExport) Unmarshal(dAtA []byte) error
- func (m *BeaconTimestampGenesisExport) XXX_DiscardUnknown()
- func (m *BeaconTimestampGenesisExport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BeaconTimestampGenesisExport) XXX_Merge(src proto.Message)
- func (m *BeaconTimestampGenesisExport) XXX_Size() int
- func (m *BeaconTimestampGenesisExport) XXX_Unmarshal(b []byte) error
- type BeaconTimestampGenesisExports
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetRegisteredBeacons() BeaconExports
- func (m *GenesisState) GetStartingBeaconId() uint64
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetDenom() string
- func (m *Params) GetFeeRecord() uint64
- func (m *Params) GetFeeRegister() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
Constants ¶
const ModuleName = "beacon"
Variables ¶
var ( ErrInvalidLengthBeacon = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBeacon = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBeacon = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
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
BeaconAllTimestampsKey gets the key for a specific BEACON's timestamps
func BeaconKey ¶ added in v1.6.1
BeaconKey gets a specific purchase order ID key for use in the store
func BeaconTimestampKey ¶ added in v1.6.1
BeaconTimestampKey gets the key for a single BEACON's specific timestamp ID
func GetBeaconIDBytes ¶ added in v1.6.1
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
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) GetBeaconId ¶ added in v1.6.1
func (*Beacon) GetFirstIdInState ¶ added in v1.6.1
func (*Beacon) GetLastTimestampId ¶ added in v1.6.1
func (*Beacon) GetMoniker ¶ added in v1.6.1
func (*Beacon) GetNumInState ¶ added in v1.6.1
func (*Beacon) GetRegTime ¶ added in v1.6.1
func (*Beacon) MarshalToSizedBuffer ¶ added in v1.6.1
func (*Beacon) ProtoMessage ¶ added in v1.6.1
func (*Beacon) ProtoMessage()
func (*Beacon) XXX_DiscardUnknown ¶ added in v1.6.1
func (m *Beacon) XXX_DiscardUnknown()
func (*Beacon) XXX_Marshal ¶ added in v1.6.1
func (*Beacon) XXX_Unmarshal ¶ added in v1.6.1
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 (m *BeaconTimestampGenesisExport) GetH() string
func (*BeaconTimestampGenesisExport) GetId ¶ added in v1.6.1
func (m *BeaconTimestampGenesisExport) GetId() uint64
func (*BeaconTimestampGenesisExport) GetT ¶ added in v1.6.1
func (m *BeaconTimestampGenesisExport) GetT() uint64
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 (m *BeaconTimestampGenesisExport) String() string
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) GetFeeRecord ¶ added in v1.6.1
func (*Params) GetFeeRegister ¶ added in v1.6.1
func (*Params) MarshalToSizedBuffer ¶ added in v1.6.1
func (*Params) ProtoMessage ¶ added in v1.6.1
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v1.6.1
func (m *Params) XXX_DiscardUnknown()