Documentation ¶
Index ¶
- func UpdateVersion(db *Database)
- type Database
- func (database *Database) AddQuestionAnswer(questionId int64, userId int64, index int64)
- func (database *Database) BanUser(userId int64)
- func (database *Database) CommitQuestion(questionId int64)
- func (database *Database) Connect(fileName string) error
- func (database *Database) DiscardQuestion(questionId int64)
- func (database *Database) Disconnect()
- func (database *Database) FinishQuestion(questionId int64)
- func (database *Database) GetActiveQuestions() (activeQuestions []int64)
- func (database *Database) GetAllUsersChatIds() (chatIds []int64)
- func (database *Database) GetAuthor(questionId int64) (author int64, findErr error)
- func (database *Database) GetDatabaseVersion() (version string)
- func (database *Database) GetLastFinishedQuestions(count int) (questions []int64)
- func (database *Database) GetLastPublishedQuestions(count int64) (questions []int64)
- func (database *Database) GetQuestionAnswers(questionId int64) (answers []int)
- func (database *Database) GetQuestionAnswersCount(questionId int64) (count int)
- func (database *Database) GetQuestionPendingCount(questionId int64) (count int)
- func (database *Database) GetQuestionRespondents(questionId int64) (respondents []int64)
- func (database *Database) GetQuestionRules(questionId int64) (minAnswers int, maxAnswers int, endTime int64)
- func (database *Database) GetQuestionText(questionId int64) (text string)
- func (database *Database) GetQuestionVariants(questionId int64) (variants []string)
- func (database *Database) GetQuestionVariantsCount(questionId int64) (count int)
- func (database *Database) GetReadyUsersChatIds() (users []int64)
- func (database *Database) GetUserChatId(userId int64) (chatId int64)
- func (database *Database) GetUserEditingQuestion(userId int64) (questionId int64)
- func (database *Database) GetUserId(chatId int64) (userId int64)
- func (database *Database) GetUserLastFinishedQuestions(userId int64, count int) (questions []int64)
- func (database *Database) GetUserLastQuestions(userId int64, count int) (questions []int64)
- func (database *Database) GetUserNextQuestion(userId int64) (questionId int64)
- func (database *Database) GetUsersAnsweringQuestionNow(questionId int64) (users []int64)
- func (database *Database) InitNewUserQuestions(userId int64)
- func (database *Database) IsConnectionOpened() bool
- func (database *Database) IsQuestionHasRules(questionId int64) (hasRules bool)
- func (database *Database) IsQuestionHasText(questionId int64) (hasText bool)
- func (database *Database) IsQuestionReady(questionId int64) (isReady bool)
- func (database *Database) IsUserBanned(userId int64) (isBanned bool)
- func (database *Database) IsUserEditingQuestion(userId int64) bool
- func (database *Database) IsUserHasPendingQuestions(userId int64) bool
- func (database *Database) MarkUserReady(userId int64)
- func (database *Database) RemoveQuestion(questionId int64)
- func (database *Database) RemoveQuestionFromAllUsers(questionId int64)
- func (database *Database) RemoveUserPendingQuestion(userId int64, questionId int64)
- func (database *Database) SetDatabaseVersion(version string)
- func (database *Database) SetQuestionRules(questionId int64, minVotes int, maxVotes int, time int64)
- func (database *Database) SetQuestionText(questionId int64, text string)
- func (database *Database) SetQuestionVariants(questionId int64, variants []string)
- func (database *Database) StartCreatingQuestion(author int64)
- func (database *Database) UnmarkUserReady(userId int64)
- func (database *Database) UnmarkUsersReady(chatIds []int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateVersion ¶
func UpdateVersion(db *Database)
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AddQuestionAnswer ¶
func (*Database) CommitQuestion ¶
func (*Database) DiscardQuestion ¶
func (*Database) Disconnect ¶
func (database *Database) Disconnect()
func (*Database) FinishQuestion ¶
func (*Database) GetActiveQuestions ¶
func (*Database) GetAllUsersChatIds ¶
func (*Database) GetDatabaseVersion ¶
func (*Database) GetLastFinishedQuestions ¶
func (*Database) GetLastPublishedQuestions ¶
func (*Database) GetQuestionAnswers ¶
func (*Database) GetQuestionAnswersCount ¶
func (*Database) GetQuestionPendingCount ¶
func (*Database) GetQuestionRespondents ¶
func (*Database) GetQuestionRules ¶
func (*Database) GetQuestionText ¶
func (*Database) GetQuestionVariants ¶
func (*Database) GetQuestionVariantsCount ¶
func (*Database) GetReadyUsersChatIds ¶
func (*Database) GetUserChatId ¶
func (*Database) GetUserEditingQuestion ¶
func (*Database) GetUserLastFinishedQuestions ¶
func (*Database) GetUserLastQuestions ¶
func (*Database) GetUserNextQuestion ¶
func (*Database) GetUsersAnsweringQuestionNow ¶
func (*Database) InitNewUserQuestions ¶
func (*Database) IsConnectionOpened ¶
func (*Database) IsQuestionHasRules ¶
func (*Database) IsQuestionHasText ¶
func (*Database) IsQuestionReady ¶
func (*Database) IsUserBanned ¶
func (*Database) IsUserEditingQuestion ¶
func (*Database) IsUserHasPendingQuestions ¶
func (*Database) MarkUserReady ¶
func (*Database) RemoveQuestion ¶
func (*Database) RemoveQuestionFromAllUsers ¶
func (*Database) RemoveUserPendingQuestion ¶
func (*Database) SetDatabaseVersion ¶
func (*Database) SetQuestionRules ¶
func (*Database) SetQuestionText ¶
func (*Database) SetQuestionVariants ¶
func (*Database) StartCreatingQuestion ¶
func (*Database) UnmarkUserReady ¶
func (*Database) UnmarkUsersReady ¶
Click to show internal directories.
Click to hide internal directories.