election

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket added in v0.2.0

type Bucket struct {
	Voter                []byte               `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"`
	Candidate            []byte               `protobuf:"bytes,2,opt,name=candidate,proto3" json:"candidate,omitempty"`
	Amount               []byte               `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	StartTime            *timestamp.Timestamp `protobuf:"bytes,4,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration             *duration.Duration   `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"`
	Decay                bool                 `protobuf:"varint,6,opt,name=decay,proto3" json:"decay,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Bucket) Descriptor added in v0.2.0

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

func (*Bucket) GetAmount added in v0.2.0

func (m *Bucket) GetAmount() []byte

func (*Bucket) GetCandidate added in v0.2.0

func (m *Bucket) GetCandidate() []byte

func (*Bucket) GetDecay added in v0.2.0

func (m *Bucket) GetDecay() bool

func (*Bucket) GetDuration added in v0.2.0

func (m *Bucket) GetDuration() *duration.Duration

func (*Bucket) GetStartTime added in v0.2.0

func (m *Bucket) GetStartTime() *timestamp.Timestamp

func (*Bucket) GetVoter added in v0.2.0

func (m *Bucket) GetVoter() []byte

func (*Bucket) ProtoMessage added in v0.2.0

func (*Bucket) ProtoMessage()

func (*Bucket) Reset added in v0.2.0

func (m *Bucket) Reset()

func (*Bucket) String added in v0.2.0

func (m *Bucket) String() string

func (*Bucket) XXX_DiscardUnknown added in v0.2.0

func (m *Bucket) XXX_DiscardUnknown()

func (*Bucket) XXX_Marshal added in v0.2.0

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

func (*Bucket) XXX_Merge added in v0.2.0

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

func (*Bucket) XXX_Size added in v0.2.0

func (m *Bucket) XXX_Size() int

func (*Bucket) XXX_Unmarshal added in v0.2.0

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

type Candidate

type Candidate struct {
	Name                 []byte   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Address              []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	OperatorAddress      []byte   `protobuf:"bytes,3,opt,name=operatorAddress,proto3" json:"operatorAddress,omitempty"`
	RewardAddress        []byte   `protobuf:"bytes,4,opt,name=rewardAddress,proto3" json:"rewardAddress,omitempty"`
	SelfStakingWeight    uint64   `protobuf:"varint,5,opt,name=selfStakingWeight,proto3" json:"selfStakingWeight,omitempty"`
	Score                []byte   `protobuf:"bytes,6,opt,name=score,proto3" json:"score,omitempty"`
	SelfStakingTokens    []byte   `protobuf:"bytes,7,opt,name=selfStakingTokens,proto3" json:"selfStakingTokens,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Candidate) Descriptor

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

func (*Candidate) GetAddress

func (m *Candidate) GetAddress() []byte

func (*Candidate) GetName

func (m *Candidate) GetName() []byte

func (*Candidate) GetOperatorAddress

func (m *Candidate) GetOperatorAddress() []byte

func (*Candidate) GetRewardAddress

func (m *Candidate) GetRewardAddress() []byte

func (*Candidate) GetScore

func (m *Candidate) GetScore() []byte

func (*Candidate) GetSelfStakingTokens

func (m *Candidate) GetSelfStakingTokens() []byte

func (*Candidate) GetSelfStakingWeight

func (m *Candidate) GetSelfStakingWeight() uint64

func (*Candidate) ProtoMessage

func (*Candidate) ProtoMessage()

func (*Candidate) Reset

func (m *Candidate) Reset()

func (*Candidate) String

func (m *Candidate) String() string

func (*Candidate) XXX_DiscardUnknown

func (m *Candidate) XXX_DiscardUnknown()

func (*Candidate) XXX_Marshal

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

func (*Candidate) XXX_Merge

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

func (*Candidate) XXX_Size

func (m *Candidate) XXX_Size() int

func (*Candidate) XXX_Unmarshal

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

type ElectionResult

type ElectionResult struct {
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Delegates            []*Candidate         `protobuf:"bytes,2,rep,name=delegates,proto3" json:"delegates,omitempty"`
	DelegateVotes        []*VoteList          `protobuf:"bytes,3,rep,name=delegateVotes,proto3" json:"delegateVotes,omitempty"`
	TotalVotedStakes     []byte               `protobuf:"bytes,4,opt,name=totalVotedStakes,proto3" json:"totalVotedStakes,omitempty"`
	TotalVotes           []byte               `protobuf:"bytes,5,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*ElectionResult) Descriptor

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

func (*ElectionResult) GetDelegateVotes

func (m *ElectionResult) GetDelegateVotes() []*VoteList

func (*ElectionResult) GetDelegates

func (m *ElectionResult) GetDelegates() []*Candidate

func (*ElectionResult) GetTimestamp

func (m *ElectionResult) GetTimestamp() *timestamp.Timestamp

func (*ElectionResult) GetTotalVotedStakes

func (m *ElectionResult) GetTotalVotedStakes() []byte

func (*ElectionResult) GetTotalVotes

func (m *ElectionResult) GetTotalVotes() []byte

func (*ElectionResult) ProtoMessage

func (*ElectionResult) ProtoMessage()

func (*ElectionResult) Reset

func (m *ElectionResult) Reset()

func (*ElectionResult) String

func (m *ElectionResult) String() string

func (*ElectionResult) XXX_DiscardUnknown

func (m *ElectionResult) XXX_DiscardUnknown()

func (*ElectionResult) XXX_Marshal

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

func (*ElectionResult) XXX_Merge

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

func (*ElectionResult) XXX_Size

func (m *ElectionResult) XXX_Size() int

func (*ElectionResult) XXX_Unmarshal

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

type Poll added in v0.2.0

type Poll struct {
	Registrations        [][]byte `protobuf:"bytes,1,rep,name=registrations,proto3" json:"registrations,omitempty"`
	Buckets              [][]byte `protobuf:"bytes,2,rep,name=buckets,proto3" json:"buckets,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Poll) Descriptor added in v0.2.0

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

func (*Poll) GetBuckets added in v0.2.0

func (m *Poll) GetBuckets() [][]byte

func (*Poll) GetRegistrations added in v0.2.0

func (m *Poll) GetRegistrations() [][]byte

func (*Poll) ProtoMessage added in v0.2.0

func (*Poll) ProtoMessage()

func (*Poll) Reset added in v0.2.0

func (m *Poll) Reset()

func (*Poll) String added in v0.2.0

func (m *Poll) String() string

func (*Poll) XXX_DiscardUnknown added in v0.2.0

func (m *Poll) XXX_DiscardUnknown()

func (*Poll) XXX_Marshal added in v0.2.0

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

func (*Poll) XXX_Merge added in v0.2.0

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

func (*Poll) XXX_Size added in v0.2.0

func (m *Poll) XXX_Size() int

func (*Poll) XXX_Unmarshal added in v0.2.0

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

type Registration added in v0.2.0

type Registration struct {
	Name                 []byte   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Address              []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	OperatorAddress      []byte   `protobuf:"bytes,3,opt,name=operatorAddress,proto3" json:"operatorAddress,omitempty"`
	RewardAddress        []byte   `protobuf:"bytes,4,opt,name=rewardAddress,proto3" json:"rewardAddress,omitempty"`
	SelfStakingWeight    uint64   `protobuf:"varint,5,opt,name=selfStakingWeight,proto3" json:"selfStakingWeight,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Registration) Descriptor added in v0.2.0

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

func (*Registration) GetAddress added in v0.2.0

func (m *Registration) GetAddress() []byte

func (*Registration) GetName added in v0.2.0

func (m *Registration) GetName() []byte

func (*Registration) GetOperatorAddress added in v0.2.0

func (m *Registration) GetOperatorAddress() []byte

func (*Registration) GetRewardAddress added in v0.2.0

func (m *Registration) GetRewardAddress() []byte

func (*Registration) GetSelfStakingWeight added in v0.2.0

func (m *Registration) GetSelfStakingWeight() uint64

func (*Registration) ProtoMessage added in v0.2.0

func (*Registration) ProtoMessage()

func (*Registration) Reset added in v0.2.0

func (m *Registration) Reset()

func (*Registration) String added in v0.2.0

func (m *Registration) String() string

func (*Registration) XXX_DiscardUnknown added in v0.2.0

func (m *Registration) XXX_DiscardUnknown()

func (*Registration) XXX_Marshal added in v0.2.0

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

func (*Registration) XXX_Merge added in v0.2.0

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

func (*Registration) XXX_Size added in v0.2.0

func (m *Registration) XXX_Size() int

func (*Registration) XXX_Unmarshal added in v0.2.0

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

type Vote

type Vote struct {
	Voter                []byte               `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"`
	Candidate            []byte               `protobuf:"bytes,2,opt,name=candidate,proto3" json:"candidate,omitempty"`
	Amount               []byte               `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	WeightedAmount       []byte               `protobuf:"bytes,4,opt,name=weightedAmount,proto3" json:"weightedAmount,omitempty"`
	StartTime            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration             *duration.Duration   `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"`
	Decay                bool                 `protobuf:"varint,7,opt,name=decay,proto3" json:"decay,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Vote) Descriptor

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

func (*Vote) GetAmount

func (m *Vote) GetAmount() []byte

func (*Vote) GetCandidate

func (m *Vote) GetCandidate() []byte

func (*Vote) GetDecay

func (m *Vote) GetDecay() bool

func (*Vote) GetDuration

func (m *Vote) GetDuration() *duration.Duration

func (*Vote) GetStartTime

func (m *Vote) GetStartTime() *timestamp.Timestamp

func (*Vote) GetVoter

func (m *Vote) GetVoter() []byte

func (*Vote) GetWeightedAmount

func (m *Vote) GetWeightedAmount() []byte

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) String

func (m *Vote) String() string

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

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

func (*Vote) XXX_Merge

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

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

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

type VoteList

type VoteList struct {
	Votes                []*Vote  `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VoteList) Descriptor

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

func (*VoteList) GetVotes

func (m *VoteList) GetVotes() []*Vote

func (*VoteList) ProtoMessage

func (*VoteList) ProtoMessage()

func (*VoteList) Reset

func (m *VoteList) Reset()

func (*VoteList) String

func (m *VoteList) String() string

func (*VoteList) XXX_DiscardUnknown

func (m *VoteList) XXX_DiscardUnknown()

func (*VoteList) XXX_Marshal

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

func (*VoteList) XXX_Merge

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

func (*VoteList) XXX_Size

func (m *VoteList) XXX_Size() int

func (*VoteList) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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