election

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_election_election_proto protoreflect.FileDescriptor

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 *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration  *durationpb.Duration   `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"`
	Decay     bool                   `protobuf:"varint,6,opt,name=decay,proto3" json:"decay,omitempty"`
	// contains filtered or unexported fields
}

func (*Bucket) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Bucket.ProtoReflect.Descriptor instead.

func (*Bucket) GetAmount added in v0.2.0

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

func (*Bucket) GetCandidate added in v0.2.0

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

func (*Bucket) GetDecay added in v0.2.0

func (x *Bucket) GetDecay() bool

func (*Bucket) GetDuration added in v0.2.0

func (x *Bucket) GetDuration() *durationpb.Duration

func (*Bucket) GetStartTime added in v0.2.0

func (x *Bucket) GetStartTime() *timestamppb.Timestamp

func (*Bucket) GetVoter added in v0.2.0

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

func (*Bucket) ProtoMessage added in v0.2.0

func (*Bucket) ProtoMessage()

func (*Bucket) ProtoReflect added in v0.3.6

func (x *Bucket) ProtoReflect() protoreflect.Message

func (*Bucket) Reset added in v0.2.0

func (x *Bucket) Reset()

func (*Bucket) String added in v0.2.0

func (x *Bucket) String() string

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"`
	// contains filtered or unexported fields
}

func (*Candidate) Descriptor deprecated

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

Deprecated: Use Candidate.ProtoReflect.Descriptor instead.

func (*Candidate) GetAddress

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

func (*Candidate) GetName

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

func (*Candidate) GetOperatorAddress

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

func (*Candidate) GetRewardAddress

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

func (*Candidate) GetScore

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

func (*Candidate) GetSelfStakingTokens

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

func (*Candidate) GetSelfStakingWeight

func (x *Candidate) GetSelfStakingWeight() uint64

func (*Candidate) ProtoMessage

func (*Candidate) ProtoMessage()

func (*Candidate) ProtoReflect added in v0.3.6

func (x *Candidate) ProtoReflect() protoreflect.Message

func (*Candidate) Reset

func (x *Candidate) Reset()

func (*Candidate) String

func (x *Candidate) String() string

type ElectionResult

type ElectionResult struct {
	Timestamp        *timestamppb.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"`
	// contains filtered or unexported fields
}

func (*ElectionResult) Descriptor deprecated

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

Deprecated: Use ElectionResult.ProtoReflect.Descriptor instead.

func (*ElectionResult) GetDelegateVotes

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

func (*ElectionResult) GetDelegates

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

func (*ElectionResult) GetTimestamp

func (x *ElectionResult) GetTimestamp() *timestamppb.Timestamp

func (*ElectionResult) GetTotalVotedStakes

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

func (*ElectionResult) GetTotalVotes

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

func (*ElectionResult) ProtoMessage

func (*ElectionResult) ProtoMessage()

func (*ElectionResult) ProtoReflect added in v0.3.6

func (x *ElectionResult) ProtoReflect() protoreflect.Message

func (*ElectionResult) Reset

func (x *ElectionResult) Reset()

func (*ElectionResult) String

func (x *ElectionResult) String() string

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"`
	// contains filtered or unexported fields
}

func (*Poll) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Poll.ProtoReflect.Descriptor instead.

func (*Poll) GetBuckets added in v0.2.0

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

func (*Poll) GetRegistrations added in v0.2.0

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

func (*Poll) ProtoMessage added in v0.2.0

func (*Poll) ProtoMessage()

func (*Poll) ProtoReflect added in v0.3.6

func (x *Poll) ProtoReflect() protoreflect.Message

func (*Poll) Reset added in v0.2.0

func (x *Poll) Reset()

func (*Poll) String added in v0.2.0

func (x *Poll) String() string

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"`
	// contains filtered or unexported fields
}

func (*Registration) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Registration.ProtoReflect.Descriptor instead.

func (*Registration) GetAddress added in v0.2.0

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

func (*Registration) GetName added in v0.2.0

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

func (*Registration) GetOperatorAddress added in v0.2.0

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

func (*Registration) GetRewardAddress added in v0.2.0

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

func (*Registration) GetSelfStakingWeight added in v0.2.0

func (x *Registration) GetSelfStakingWeight() uint64

func (*Registration) ProtoMessage added in v0.2.0

func (*Registration) ProtoMessage()

func (*Registration) ProtoReflect added in v0.3.6

func (x *Registration) ProtoReflect() protoreflect.Message

func (*Registration) Reset added in v0.2.0

func (x *Registration) Reset()

func (*Registration) String added in v0.2.0

func (x *Registration) String() string

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      *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration       *durationpb.Duration   `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"`
	Decay          bool                   `protobuf:"varint,7,opt,name=decay,proto3" json:"decay,omitempty"`
	// contains filtered or unexported fields
}

func (*Vote) Descriptor deprecated

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

Deprecated: Use Vote.ProtoReflect.Descriptor instead.

func (*Vote) GetAmount

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

func (*Vote) GetCandidate

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

func (*Vote) GetDecay

func (x *Vote) GetDecay() bool

func (*Vote) GetDuration

func (x *Vote) GetDuration() *durationpb.Duration

func (*Vote) GetStartTime

func (x *Vote) GetStartTime() *timestamppb.Timestamp

func (*Vote) GetVoter

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

func (*Vote) GetWeightedAmount

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

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) ProtoReflect added in v0.3.6

func (x *Vote) ProtoReflect() protoreflect.Message

func (*Vote) Reset

func (x *Vote) Reset()

func (*Vote) String

func (x *Vote) String() string

type VoteList

type VoteList struct {
	Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
	// contains filtered or unexported fields
}

func (*VoteList) Descriptor deprecated

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

Deprecated: Use VoteList.ProtoReflect.Descriptor instead.

func (*VoteList) GetVotes

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

func (*VoteList) ProtoMessage

func (*VoteList) ProtoMessage()

func (*VoteList) ProtoReflect added in v0.3.6

func (x *VoteList) ProtoReflect() protoreflect.Message

func (*VoteList) Reset

func (x *VoteList) Reset()

func (*VoteList) String

func (x *VoteList) String() string

Jump to

Keyboard shortcuts

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