types.gno

0.75 Kb ยท 32 lines
 1package govdao
 2
 3import (
 4	"std"
 5)
 6
 7// Status enum.
 8type Status string
 9
10var (
11	Accepted    Status = "accepted"
12	Active      Status = "active"
13	NotAccepted Status = "not accepted"
14	Expired     Status = "expired"
15	Succeeded   Status = "succeeded"
16)
17
18// Voter defines the needed methods for a voting system
19type Voter interface {
20
21	// IsAccepted indicates if the voting process had been accepted
22	IsAccepted(voters []std.Address) bool
23
24	// IsFinished indicates if the voting process is finished
25	IsFinished(voters []std.Address) bool
26
27	// Vote adds a new vote to the voting system
28	Vote(voters []std.Address, caller std.Address, flag string)
29
30	// Status returns a human friendly string describing how the voting process is going
31	Status(voters []std.Address) string
32}