Documentation
¶
Index ¶
- type AnswerOption
- type Poll
- func (p *Poll) Copy() *Poll
- func (p *Poll) EncodeToByte() []byte
- func (p *Poll) HasVoted(userID string) bool
- func (p *Poll) ToEndPollPost(authorName string, convert func(string) (string, *model.AppError)) (*model.Post, *model.AppError)
- func (p *Poll) ToPostActions(siteURL, pluginID, authorName string) []*model.SlackAttachment
- func (p *Poll) UpdateVote(userID string, index int) error
- type PollSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerOption ¶
AnswerOption stores a possible answer and a list of user who voted for this
type Poll ¶
type Poll struct { ID string CreatedAt int64 Creator string Question string AnswerOptions []*AnswerOption Settings PollSettings }
Poll stores all needed information for a poll
func DecodePollFromByte ¶
DecodePollFromByte tries to create a poll from a byte array
func (*Poll) EncodeToByte ¶
EncodeToByte returns a poll as a byte array
func (*Poll) ToEndPollPost ¶
func (p *Poll) ToEndPollPost(authorName string, convert func(string) (string, *model.AppError)) (*model.Post, *model.AppError)
ToEndPollPost returns the poll end message
func (*Poll) ToPostActions ¶
func (p *Poll) ToPostActions(siteURL, pluginID, authorName string) []*model.SlackAttachment
ToPostActions returns the poll as a message
type PollSettings ¶
PollSettings stores possible settings for a poll
Click to show internal directories.
Click to hide internal directories.