Documentation ¶
Index ¶
- type Datastore
- func (store *Datastore) AddOrUpdateGroup(groupChatId int64, latestPollId int) tgbotapi.Chattable
- func (store *Datastore) AddParticipant(groupChatId int64, userId int, firstName string, lastName string) bool
- func (store *Datastore) DeactivateGroup(groupChatId int64)
- func (store *Datastore) GetAllGroups() []models.Group
- func (store *Datastore) GetAllParticipantsWithoutName() []models.Participant
- func (store *Datastore) GetNRandomParticipants(groupChatId int64, numberOfPeople int) ([]models.Participant, error)
- func (store *Datastore) GetParticipants(groupChatId int64) []models.Participant
- func (store *Datastore) RemoveParticipant(groupChatId int64, userId int) bool
- func (store *Datastore) ResetGroup(groupChatId int64)
- func (store *Datastore) SetNameOfParticipant(userID int, firstName string, lastName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
func (*Datastore) AddOrUpdateGroup ¶
func (*Datastore) AddParticipant ¶
func (store *Datastore) AddParticipant(groupChatId int64, userId int, firstName string, lastName string) bool
AddParticipant adds a new participant to the database or reactivates an already existing participant. If it's a new participants, their counter is set to the current minimum of the other counters.
func (*Datastore) DeactivateGroup ¶
func (*Datastore) GetAllGroups ¶
func (*Datastore) GetAllParticipantsWithoutName ¶
func (store *Datastore) GetAllParticipantsWithoutName() []models.Participant
func (*Datastore) GetNRandomParticipants ¶
func (*Datastore) GetParticipants ¶
func (store *Datastore) GetParticipants(groupChatId int64) []models.Participant
func (*Datastore) RemoveParticipant ¶
func (*Datastore) ResetGroup ¶
Click to show internal directories.
Click to hide internal directories.