Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VotingTypes ¶
func VotingTypes() []string
Types ¶
type Config ¶
type Config struct { Title string Time *util.TimeInfo Salt1 string Salt2 []byte Candidates []*Candidate ManPriCid string PubKey evutil.IPubKey Params *VoteParams Type VotingType HkmAddr string IvmAddr string Labels []string }
func (*Config) CandNameGroups ¶
func (*Config) ShuffleCandidates ¶
func (cfg *Config) ShuffleCandidates()
type ManIdentity ¶
func (*ManIdentity) FromString ¶
func (mi *ManIdentity) FromString(addr string) error
func (ManIdentity) Marshal ¶
func (mi ManIdentity) Marshal() []byte
func (*ManIdentity) Unmarshal ¶
func (mi *ManIdentity) Unmarshal(m []byte) error
type UserKeyPair ¶
type UserKeyPair struct {
// contains filtered or unexported fields
}
func NewUserKeyPair ¶
func NewUserKeyPair() *UserKeyPair
func (UserKeyPair) Marshal ¶
func (ukp UserKeyPair) Marshal() []byte
func (UserKeyPair) Sign ¶
func (ukp UserKeyPair) Sign() evutil.ISignKey
func (*UserKeyPair) Unmarshal ¶
func (ukp *UserKeyPair) Unmarshal(m []byte) error
func (UserKeyPair) Verify ¶
func (ukp UserKeyPair) Verify() evutil.IVerfKey
type VoteParams ¶
type VoteResult ¶
type VotingStores ¶ added in v0.3.0
type VotingStores struct { Is ipfs.Ipfs Hkm crdt.ISignatureStore //with access Ivm crdt.IUpdatableSignatureStore //with access }
func NewConfig ¶
func NewConfig(title, rCfgAddr string, tInfo *util.TimeInfo, cands []*Candidate, vParam *VoteParams, vType VotingType) (string, string, *VotingStores, error)
func (*VotingStores) Close ¶ added in v0.3.0
func (vs *VotingStores) Close()
type VotingType ¶
type VotingType int
const ( Single VotingType = iota Block Approval Range Preference Cumulative )
func VotingTypeFromStr ¶
func VotingTypeFromStr(str string) (VotingType, error)
func (VotingType) VotingType2String ¶
func (vt VotingType) VotingType2String() string
Click to show internal directories.
Click to hide internal directories.