Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPHandler ¶
func HTTPHandler(repo *Repository) http.Handler
HTTPHandler provides a REST API handler for the votes data management.
Types ¶
type Aggregate ¶
type Aggregate struct { TalkName string `json:"talk_name"` Data []aggData `json:"data"` }
type Label ¶
Label provides some context of what the presentation is about at some given time. It can be used as a marker pointing to a specific place in the presentation to correlate the presentation content with the votes.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository keeps the collected data about votes and labels.
func NewRepository ¶
func NewRepository() *Repository
func (*Repository) Aggregate ¶
func (r *Repository) Aggregate(talkName string) (res Aggregate)
Aggregate returns the aggregated data for a specific talk that can be used to provide a summary of the poll during the presentation.
func (*Repository) Label ¶
func (r *Repository) Label(l Label) error
func (*Repository) Vote ¶
func (r *Repository) Vote(v Vote) error
Click to show internal directories.
Click to hide internal directories.