election

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 14, 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 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 (dst *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 (dst *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 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 (dst *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 (dst *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