Versions in this module Expand all Collapse all v1 v1.2.2 Feb 15, 2026 Changes in this version + var ErrInvalidROTIID = errors.New("invalid ROTI ID") + var ErrInvalidVote = errors.New("invalid vote value") + var ErrInvalidVoteID = errors.New("invalid vote ID") + var ErrNoFreeIDs = errors.New("couldn't find a free ID for this ROTI") + var ErrNoROTIMatchingThisID = errors.New("no ROTI matching this ID") + func CheckVote(voteString string) (vote float64, err error) + func CountROTIs() int + func GetMaxROTIID() int + func InitDatabase() *sql.DB + type ROTIEntity struct + func GetROTI(rotiid ROTIID) (roti ROTIEntity, err error) + func NewROTIEntity(id ROTIID, description string, hide, feedback bool) (roti ROTIEntity) + func (currentROTI *ROTIEntity) AddVoteToROTI(value float64, feedback string) (err error) + func (currentROTI *ROTIEntity) CountVotes() int + func (currentROTI *ROTIEntity) GetDescription() string + func (currentROTI *ROTIEntity) GetID() ROTIID + func (currentROTI *ROTIEntity) GetMaxVote() float64 + func (currentROTI *ROTIEntity) GetMinVote() float64 + func (currentROTI *ROTIEntity) HasFeedback() bool + func (currentROTI *ROTIEntity) IsHidden() bool + func (currentROTI *ROTIEntity) ListFeedbacks() (feedbacks []string) + func (currentROTI *ROTIEntity) VotesAverage() float64 + type ROTIID int + func CreateROTI(description string, hide, feedback bool, clean int) (rotiID ROTIID) + func NewROTIID() (rotiID ROTIID) + func (id ROTIID) Int() int + type ShortROTIInfo struct + Desc string + ID ROTIID + func ListROTIs() (rotis []ShortROTIInfo) + type VoteEntity struct + func NewVoteEntity(value float64) (vote VoteEntity, err error) + func (currentVote *VoteEntity) GetVote() float64 + func (currentVote *VoteEntity) ID() VoteID + type VoteID string + func (id VoteID) String() string