Versions in this module Expand all Collapse all v0 v0.14.0 Apr 10, 2019 Changes in this version + var ErrIntOverflowCodec = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling") + var TextProposal_Status_name = map[int32]string + var TextProposal_Status_value = map[string]int32 + var VoteOption_name = map[int32]string + var VoteOption_value = map[string]int32 + func RegisterQuery(qr weave.QueryRouter) + func RegisterRoutes(r weave.Registry, auth x.Authenticator) + type CreateTextProposalMsg struct + Author github_com_iov_one_weave.Address + Description string + ElectionRuleID []byte + ElectorateID []byte + StartTime github_com_iov_one_weave.UnixTime + Title string + func (*CreateTextProposalMsg) Descriptor() ([]byte, []int) + func (*CreateTextProposalMsg) ProtoMessage() + func (CreateTextProposalMsg) Path() string + func (m *CreateTextProposalMsg) GetAuthor() github_com_iov_one_weave.Address + func (m *CreateTextProposalMsg) GetDescription() string + func (m *CreateTextProposalMsg) GetElectionRuleID() []byte + func (m *CreateTextProposalMsg) GetElectorateID() []byte + func (m *CreateTextProposalMsg) GetStartTime() github_com_iov_one_weave.UnixTime + func (m *CreateTextProposalMsg) GetTitle() string + func (m *CreateTextProposalMsg) Marshal() (dAtA []byte, err error) + func (m *CreateTextProposalMsg) MarshalTo(dAtA []byte) (int, error) + func (m *CreateTextProposalMsg) Reset() + func (m *CreateTextProposalMsg) Size() (n int) + func (m *CreateTextProposalMsg) String() string + func (m *CreateTextProposalMsg) Unmarshal(dAtA []byte) error + func (m *CreateTextProposalMsg) XXX_DiscardUnknown() + func (m *CreateTextProposalMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateTextProposalMsg) XXX_Merge(src proto.Message) + func (m *CreateTextProposalMsg) XXX_Size() int + func (m *CreateTextProposalMsg) XXX_Unmarshal(b []byte) error + func (m CreateTextProposalMsg) Validate() error + type ElectionRule struct + Threshold Fraction + Title string + VotingPeriodHours uint32 + func (*ElectionRule) Descriptor() ([]byte, []int) + func (*ElectionRule) ProtoMessage() + func (m *ElectionRule) GetThreshold() Fraction + func (m *ElectionRule) GetTitle() string + func (m *ElectionRule) GetVotingPeriodHours() uint32 + func (m *ElectionRule) Marshal() (dAtA []byte, err error) + func (m *ElectionRule) MarshalTo(dAtA []byte) (int, error) + func (m *ElectionRule) Reset() + func (m *ElectionRule) Size() (n int) + func (m *ElectionRule) String() string + func (m *ElectionRule) Unmarshal(dAtA []byte) error + func (m *ElectionRule) XXX_DiscardUnknown() + func (m *ElectionRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ElectionRule) XXX_Merge(src proto.Message) + func (m *ElectionRule) XXX_Size() int + func (m *ElectionRule) XXX_Unmarshal(b []byte) error + func (m ElectionRule) Copy() orm.CloneableData + func (m ElectionRule) Validate() error + type ElectionRulesBucket struct + func NewElectionRulesBucket() *ElectionRulesBucket + func (b *ElectionRulesBucket) Build(db weave.KVStore, r *ElectionRule) orm.Object + func (b *ElectionRulesBucket) GetElectionRule(db weave.KVStore, id []byte) (*ElectionRule, error) + type Elector struct + Signature github_com_iov_one_weave.Address + Weight uint32 + func (*Elector) Descriptor() ([]byte, []int) + func (*Elector) ProtoMessage() + func (m *Elector) GetSignature() github_com_iov_one_weave.Address + func (m *Elector) GetWeight() uint32 + func (m *Elector) Marshal() (dAtA []byte, err error) + func (m *Elector) MarshalTo(dAtA []byte) (int, error) + func (m *Elector) Reset() + func (m *Elector) Size() (n int) + func (m *Elector) String() string + func (m *Elector) Unmarshal(dAtA []byte) error + func (m *Elector) XXX_DiscardUnknown() + func (m *Elector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Elector) XXX_Merge(src proto.Message) + func (m *Elector) XXX_Size() int + func (m *Elector) XXX_Unmarshal(b []byte) error + func (m Elector) Validate() error + type Electorate struct + Electors []Elector + Title string + TotalWeightElectorate uint64 + func (*Electorate) Descriptor() ([]byte, []int) + func (*Electorate) ProtoMessage() + func (m *Electorate) GetElectors() []Elector + func (m *Electorate) GetTitle() string + func (m *Electorate) GetTotalWeightElectorate() uint64 + func (m *Electorate) Marshal() (dAtA []byte, err error) + func (m *Electorate) MarshalTo(dAtA []byte) (int, error) + func (m *Electorate) Reset() + func (m *Electorate) Size() (n int) + func (m *Electorate) String() string + func (m *Electorate) Unmarshal(dAtA []byte) error + func (m *Electorate) XXX_DiscardUnknown() + func (m *Electorate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Electorate) XXX_Merge(src proto.Message) + func (m *Electorate) XXX_Size() int + func (m *Electorate) XXX_Unmarshal(b []byte) error + func (m Electorate) Copy() orm.CloneableData + func (m Electorate) Elector(a weave.Address) (*Elector, bool) + func (m Electorate) Validate() error + type ElectorateBucket struct + func NewElectorateBucket() *ElectorateBucket + func (b *ElectorateBucket) Build(db weave.KVStore, e *Electorate) orm.Object + func (b *ElectorateBucket) GetElectorate(db weave.KVStore, id []byte) (*Electorate, error) + type Fraction struct + Denominator uint32 + Numerator uint32 + func (*Fraction) Descriptor() ([]byte, []int) + func (*Fraction) ProtoMessage() + func (m *Fraction) GetDenominator() uint32 + func (m *Fraction) GetNumerator() uint32 + func (m *Fraction) Marshal() (dAtA []byte, err error) + func (m *Fraction) MarshalTo(dAtA []byte) (int, error) + func (m *Fraction) Reset() + func (m *Fraction) Size() (n int) + func (m *Fraction) String() string + func (m *Fraction) Unmarshal(dAtA []byte) error + func (m *Fraction) XXX_DiscardUnknown() + func (m *Fraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Fraction) XXX_Merge(src proto.Message) + func (m *Fraction) XXX_Size() int + func (m *Fraction) XXX_Unmarshal(b []byte) error + func (m Fraction) Validate() error + type Initializer struct + func (*Initializer) FromGenesis(opts weave.Options, db weave.KVStore) error + type ProposalBucket struct + func NewProposalBucket() *ProposalBucket + func (b *ProposalBucket) Build(db weave.KVStore, e *TextProposal) orm.Object + func (b *ProposalBucket) GetTextProposal(db weave.KVStore, id []byte) (*TextProposal, error) + func (b *ProposalBucket) Update(db weave.KVStore, id []byte, obj *TextProposal) error + type TallyHandler struct + func (h TallyHandler) Check(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.CheckResult, error) + func (h TallyHandler) Deliver(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.DeliverResult, error) + type TallyMsg struct + ProposalID []byte + func (*TallyMsg) Descriptor() ([]byte, []int) + func (*TallyMsg) ProtoMessage() + func (TallyMsg) Path() string + func (m *TallyMsg) GetProposalID() []byte + func (m *TallyMsg) Marshal() (dAtA []byte, err error) + func (m *TallyMsg) MarshalTo(dAtA []byte) (int, error) + func (m *TallyMsg) Reset() + func (m *TallyMsg) Size() (n int) + func (m *TallyMsg) String() string + func (m *TallyMsg) Unmarshal(dAtA []byte) error + func (m *TallyMsg) XXX_DiscardUnknown() + func (m *TallyMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TallyMsg) XXX_Merge(src proto.Message) + func (m *TallyMsg) XXX_Size() int + func (m *TallyMsg) XXX_Unmarshal(b []byte) error + func (m TallyMsg) Validate() error + type TallyResult struct + Threshold Fraction + TotalAbstain uint32 + TotalNo uint32 + TotalWeightElectorate uint64 + TotalYes uint32 + func (*TallyResult) Descriptor() ([]byte, []int) + func (*TallyResult) ProtoMessage() + func (m *TallyResult) GetThreshold() Fraction + func (m *TallyResult) GetTotalAbstain() uint32 + func (m *TallyResult) GetTotalNo() uint32 + func (m *TallyResult) GetTotalWeightElectorate() uint64 + func (m *TallyResult) GetTotalYes() uint32 + func (m *TallyResult) Marshal() (dAtA []byte, err error) + func (m *TallyResult) MarshalTo(dAtA []byte) (int, error) + func (m *TallyResult) Reset() + func (m *TallyResult) Size() (n int) + func (m *TallyResult) String() string + func (m *TallyResult) Unmarshal(dAtA []byte) error + func (m *TallyResult) XXX_DiscardUnknown() + func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TallyResult) XXX_Merge(src proto.Message) + func (m *TallyResult) XXX_Size() int + func (m *TallyResult) XXX_Unmarshal(b []byte) error + func (m TallyResult) Accepted() bool + type TextProposal struct + Author github_com_iov_one_weave.Address + Description string + ElectionRuleID []byte + ElectorateID []byte + Status TextProposal_Status + SubmissionTime github_com_iov_one_weave.UnixTime + Title string + VoteResult TallyResult + Votes []*Vote + VotingEndTime github_com_iov_one_weave.UnixTime + VotingStartTime github_com_iov_one_weave.UnixTime + func (*TextProposal) Descriptor() ([]byte, []int) + func (*TextProposal) ProtoMessage() + func (m *TextProposal) GetAuthor() github_com_iov_one_weave.Address + func (m *TextProposal) GetDescription() string + func (m *TextProposal) GetElectionRuleID() []byte + func (m *TextProposal) GetElectorateID() []byte + func (m *TextProposal) GetStatus() TextProposal_Status + func (m *TextProposal) GetSubmissionTime() github_com_iov_one_weave.UnixTime + func (m *TextProposal) GetTitle() string + func (m *TextProposal) GetVoteResult() TallyResult + func (m *TextProposal) GetVotes() []*Vote + func (m *TextProposal) GetVotingEndTime() github_com_iov_one_weave.UnixTime + func (m *TextProposal) GetVotingStartTime() github_com_iov_one_weave.UnixTime + func (m *TextProposal) Marshal() (dAtA []byte, err error) + func (m *TextProposal) MarshalTo(dAtA []byte) (int, error) + func (m *TextProposal) Reset() + func (m *TextProposal) Size() (n int) + func (m *TextProposal) String() string + func (m *TextProposal) Tally() error + func (m *TextProposal) Unmarshal(dAtA []byte) error + func (m *TextProposal) Validate() error + func (m *TextProposal) Vote(voted VoteOption, elector Elector) error + func (m *TextProposal) XXX_DiscardUnknown() + func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TextProposal) XXX_Merge(src proto.Message) + func (m *TextProposal) XXX_Size() int + func (m *TextProposal) XXX_Unmarshal(b []byte) error + func (m TextProposal) Copy() orm.CloneableData + func (m TextProposal) HasVoted(a weave.Address) bool + type TextProposalHandler struct + func (h TextProposalHandler) Check(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.CheckResult, error) + func (h TextProposalHandler) Deliver(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.DeliverResult, error) + type TextProposal_Status int32 + const TextProposal_Accepted + const TextProposal_Invalid + const TextProposal_Rejected + const TextProposal_Undefined + func (TextProposal_Status) EnumDescriptor() ([]byte, []int) + func (x TextProposal_Status) String() string + type Vote struct + Elector Elector + Voted VoteOption + func (*Vote) Descriptor() ([]byte, []int) + func (*Vote) ProtoMessage() + func (m *Vote) GetElector() Elector + func (m *Vote) GetVoted() VoteOption + func (m *Vote) Marshal() (dAtA []byte, err error) + func (m *Vote) MarshalTo(dAtA []byte) (int, error) + func (m *Vote) Reset() + func (m *Vote) Size() (n int) + func (m *Vote) String() string + func (m *Vote) Unmarshal(dAtA []byte) error + func (m *Vote) XXX_DiscardUnknown() + func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Vote) XXX_Merge(src proto.Message) + func (m *Vote) XXX_Size() int + func (m *Vote) XXX_Unmarshal(b []byte) error + type VoteHandler struct + func (h VoteHandler) Check(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.CheckResult, error) + func (h VoteHandler) Deliver(ctx weave.Context, db weave.KVStore, tx weave.Tx) (weave.DeliverResult, error) + type VoteMsg struct + ProposalID []byte + Selected VoteOption + Voter github_com_iov_one_weave.Address + func (*VoteMsg) Descriptor() ([]byte, []int) + func (*VoteMsg) ProtoMessage() + func (VoteMsg) Path() string + func (m *VoteMsg) GetProposalID() []byte + func (m *VoteMsg) GetSelected() VoteOption + func (m *VoteMsg) GetVoter() github_com_iov_one_weave.Address + func (m *VoteMsg) Marshal() (dAtA []byte, err error) + func (m *VoteMsg) MarshalTo(dAtA []byte) (int, error) + func (m *VoteMsg) Reset() + func (m *VoteMsg) Size() (n int) + func (m *VoteMsg) String() string + func (m *VoteMsg) Unmarshal(dAtA []byte) error + func (m *VoteMsg) XXX_DiscardUnknown() + func (m *VoteMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VoteMsg) XXX_Merge(src proto.Message) + func (m *VoteMsg) XXX_Size() int + func (m *VoteMsg) XXX_Unmarshal(b []byte) error + func (m VoteMsg) Validate() error + type VoteOption int32 + const VoteOption_Abstain + const VoteOption_Invalid + const VoteOption_No + const VoteOption_Yes + func (VoteOption) EnumDescriptor() ([]byte, []int) + func (x VoteOption) String() string