Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePollHandler ¶
func CreateVoteHandler ¶
func GetAllPollsHandler ¶
func GetPollByCodeHandler ¶
Types ¶
type AlternativeVM ¶
type PollRepository ¶
type PollRepository struct{}
func (*PollRepository) GetByCode ¶
func (r *PollRepository) GetByCode(code string) (domain.Poll, error)
func (*PollRepository) GetResults ¶
func (r *PollRepository) GetResults(id uint) (domain.Poll, error)
type PollResultsVM ¶
type PollResultsVM struct { Question string `json:"question"` Alternatives []AlternativeVM `json:"alternatives"` Votes []uint `json:"votes"` }
type PollVM ¶
type PollVM struct { ID uint `json:"id"` Question string `json:"question"` Alternatives []AlternativeVM `json:"alternatives"` UserID uint `json:"user_id"` Code string `json:"code"` }
type VoteRepository ¶
type VoteRepository struct{}
Click to show internal directories.
Click to hide internal directories.