Documentation
¶
Index ¶
- Variables
- func CheckVote(voteString string) (vote float64, err error)
- func CountROTIs() int
- func GetMaxROTIID() int
- func InitDatabase() *sql.DB
- type 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
- type ShortROTIInfo
- type VoteEntity
- type VoteID
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoROTIMatchingThisID = errors.New("no ROTI matching this ID") ErrNoFreeIDs = errors.New("couldn't find a free ID for this ROTI") )
View Source
var ( ErrInvalidVoteID = errors.New("invalid vote ID") ErrInvalidVote = errors.New("invalid vote value") )
View Source
var (
ErrInvalidROTIID = errors.New("invalid ROTI ID")
)
Functions ¶
func CountROTIs ¶
func CountROTIs() int
func GetMaxROTIID ¶
func GetMaxROTIID() int
func InitDatabase ¶
Types ¶
type ROTIEntity ¶
type ROTIEntity struct {
// contains filtered or unexported fields
}
func GetROTI ¶
func GetROTI(rotiid ROTIID) (roti ROTIEntity, err error)
func NewROTIEntity ¶
func NewROTIEntity(id ROTIID, description string, hide, feedback bool) (roti ROTIEntity)
func (*ROTIEntity) AddVoteToROTI ¶
func (currentROTI *ROTIEntity) AddVoteToROTI(value float64, feedback string) (err error)
func (*ROTIEntity) CountVotes ¶
func (currentROTI *ROTIEntity) CountVotes() int
func (*ROTIEntity) GetDescription ¶
func (currentROTI *ROTIEntity) GetDescription() string
func (*ROTIEntity) GetID ¶
func (currentROTI *ROTIEntity) GetID() ROTIID
func (*ROTIEntity) GetMaxVote ¶
func (currentROTI *ROTIEntity) GetMaxVote() float64
func (*ROTIEntity) GetMinVote ¶
func (currentROTI *ROTIEntity) GetMinVote() float64
func (*ROTIEntity) HasFeedback ¶
func (currentROTI *ROTIEntity) HasFeedback() bool
func (*ROTIEntity) IsHidden ¶
func (currentROTI *ROTIEntity) IsHidden() bool
func (*ROTIEntity) ListFeedbacks ¶
func (currentROTI *ROTIEntity) ListFeedbacks() (feedbacks []string)
func (*ROTIEntity) VotesAverage ¶
func (currentROTI *ROTIEntity) VotesAverage() float64
type ShortROTIInfo ¶
func ListROTIs ¶
func ListROTIs() (rotis []ShortROTIInfo)
type VoteEntity ¶
type VoteEntity struct {
// contains filtered or unexported fields
}
func NewVoteEntity ¶
func NewVoteEntity(value float64) (vote VoteEntity, err error)
func (*VoteEntity) GetVote ¶
func (currentVote *VoteEntity) GetVote() float64
func (*VoteEntity) ID ¶
func (currentVote *VoteEntity) ID() VoteID
Click to show internal directories.
Click to hide internal directories.