Documentation
¶
Index ¶
- type Sql
- func (s *Sql) AddRawLineEvent(eventType, rawevent string) error
- func (s *Sql) AddUserProfile(userID, displayName string) error
- func (s *Sql) Close() error
- func (s *Sql) GetGpsAnswerData() (answerGpsData []UserGpsAnswerData, err error)
- func (s *Sql) GetQuestions() (qs *domain.Questions, err error)
- func (s *Sql) GetUserAnswerData() (answerData []UserAnswerData, err error)
- func (s *Sql) GetUserProfile(userId string) (profile domain.UserProfile, err error)
- func (s *Sql) GetUsersWithoutAnswers(delaySecs int64) (userIds []string, err error)
- func (s *Sql) GetWelcomeMsgs(tplVars *WelcomeMsgTplVars) (msgs []string, err error)
- func (s *Sql) MarkProfileBotSurveyInited(userId string) error
- func (s *Sql) UserAddAnswer(answer domain.Answer) error
- func (s *Sql) UserAddGpsAnswer(answer domain.AnswerGps) error
- func (s *Sql) UserGetLastAnswer(uid string) (domain.Answer, error)
- func (s *Sql) UserHasAnswers(userId string) (bool, error)
- func (s *Sql) WipeUser(userId string) error
- type Storage
- type UserAnswerData
- type UserGpsAnswerData
- type WelcomeMsgTplVars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sql ¶
func (*Sql) AddRawLineEvent ¶
func (*Sql) AddUserProfile ¶
AddUserProfile adds a user profile if the user already exists in the table this method does nothing
func (*Sql) GetGpsAnswerData ¶
func (s *Sql) GetGpsAnswerData() (answerGpsData []UserGpsAnswerData, err error)
func (*Sql) GetUserAnswerData ¶
func (s *Sql) GetUserAnswerData() (answerData []UserAnswerData, err error)
func (*Sql) GetUserProfile ¶
func (s *Sql) GetUserProfile(userId string) (profile domain.UserProfile, err error)
func (*Sql) GetUsersWithoutAnswers ¶
func (*Sql) GetWelcomeMsgs ¶
func (s *Sql) GetWelcomeMsgs(tplVars *WelcomeMsgTplVars) (msgs []string, err error)
func (*Sql) MarkProfileBotSurveyInited ¶
type Storage ¶
type Storage interface { // used for after-the-fact debugging AddRawLineEvent(eventType, rawMsg string) error GetUserProfile(userId string) (domain.UserProfile, error) MarkProfileBotSurveyInited(userId string) error GetUsersWithoutAnswers(sinceUnixTs int64) (userIds []string, err error) GetUserAnswerData() ([]UserAnswerData, error) GetGpsAnswerData() ([]UserGpsAnswerData, error) AddUserProfile(userId, displayName string) error UserHasAnswers(userId string) (bool, error) UserGetLastAnswer(userId string) (domain.Answer, error) UserAddAnswer(domain.Answer) error UserAddGpsAnswer(domain.AnswerGps) error GetQuestions() (*domain.Questions, error) GetWelcomeMsgs(tplVars *WelcomeMsgTplVars) ([]string, error) WipeUser(userId string) error // cleanup any connection / file descriptors to the storage Close() error }
type UserAnswerData ¶
type UserGpsAnswerData ¶
type WelcomeMsgTplVars ¶
Click to show internal directories.
Click to hide internal directories.