Documentation ¶
Index ¶
- type Sql
- func (s *Sql) AddCustomQuestion(questionId string, text string, replyText string) error
- func (s *Sql) AddRawLineEvent(eventType, rawevent string) error
- func (s *Sql) AddUpdateUserProfile(userID, displayName string) error
- func (s *Sql) Close() error
- func (s *Sql) CustomQuestion(userId string) (questionId string, replyText string, qTs int, err error)
- func (s *Sql) FindUserLocation(userId string) (l domain.LocationThai, err error)
- func (s *Sql) GetAllActiveUserProfiles() (profiles []domain.UserProfile, err error)
- func (s *Sql) GetConfigVal(key string) (string, error)
- func (s *Sql) GetGpsAnswerData() (answerGpsData []UserGpsAnswerData, err error)
- func (s *Sql) GetLastNormalisedIslandId() (answerId int, err error)
- func (s *Sql) GetLastNormalisedPriceId() (answerId int, err error)
- func (s *Sql) GetLocationPrices() (locs []domain.LocationPrice, err error)
- func (s *Sql) GetLocations() (locs []domain.LocationThai, err error)
- func (s *Sql) GetPriceTplMsg() (string, error)
- func (s *Sql) GetQuestions() (qs *domain.Questions, err error)
- func (s *Sql) GetRawLineEvents() (evts []domain.LineEventExport, err error)
- func (s *Sql) GetUserAnswerData() (answerData []UserAnswerData, err error)
- func (s *Sql) GetUserNearbyPrices(userId string) (lp []domain.LocationPrice, err error)
- func (s *Sql) GetUserProfile(userId string) (domain.UserProfile, error)
- func (s *Sql) GetWebSurveyBtnConfig() (WebSurveyBtnConfig, error)
- func (s *Sql) GetWelcomeMsgs(tplVars *WelcomeMsgTplVars) (msgs []string, err error)
- func (s *Sql) NormaliseIslands(fromAnswerId int) (answerId int, err error)
- func (s *Sql) NormalisePrices(fromAnswerId int) (answerId int, err error)
- func (s *Sql) ToggleUserSurvey(userId string, started bool) error
- func (s *Sql) UpdateUserProfile(p domain.UserProfile) error
- func (s *Sql) UserAddAnswer(answer domain.Answer) error
- func (s *Sql) UserAddGpsAnswer(answer domain.AnswerGps) error
- func (s *Sql) UserAnsweredCustomQuestion(userId, questionId string, qTs int) (bool, error)
- func (s *Sql) UserGetLastAnswer(uid string) (domain.Answer, error)
- func (s *Sql) UserHasAnswers(userId string) (bool, error)
- func (s *Sql) UserLastLocationAnswer(userId string) (string, error)
- func (s *Sql) UsersSurveyNotStarted(delaySecs int64) (userIds []string, err error)
- func (s *Sql) WipeUser(userId string) error
- type UserAnswerData
- type UserGpsAnswerData
- type WebSurveyBtnConfig
- type WelcomeMsgTplVars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sql ¶
func (*Sql) AddCustomQuestion ¶ added in v0.0.20
func (*Sql) AddRawLineEvent ¶
func (*Sql) AddUpdateUserProfile ¶ added in v0.0.14
AddUpdateUserProfile adds a user profile if the user already exists in the table this method does nothing
func (*Sql) CustomQuestion ¶ added in v0.0.20
func (s *Sql) CustomQuestion(userId string) (questionId string, replyText string, qTs int, err error)
CustomQuestion returns the last question sent based on when the user registered on the website
func (*Sql) FindUserLocation ¶ added in v0.0.28
func (s *Sql) FindUserLocation(userId string) (l domain.LocationThai, err error)
func (*Sql) GetAllActiveUserProfiles ¶ added in v0.0.20
func (s *Sql) GetAllActiveUserProfiles() (profiles []domain.UserProfile, err error)
func (*Sql) GetGpsAnswerData ¶ added in v0.0.5
func (s *Sql) GetGpsAnswerData() (answerGpsData []UserGpsAnswerData, err error)
func (*Sql) GetLastNormalisedIslandId ¶ added in v0.0.19
func (*Sql) GetLastNormalisedPriceId ¶ added in v0.0.19
func (*Sql) GetLocationPrices ¶ added in v0.0.28
func (s *Sql) GetLocationPrices() (locs []domain.LocationPrice, err error)
func (*Sql) GetLocations ¶ added in v0.0.11
func (s *Sql) GetLocations() (locs []domain.LocationThai, err error)
func (*Sql) GetPriceTplMsg ¶ added in v0.0.11
func (*Sql) GetRawLineEvents ¶ added in v0.0.20
func (s *Sql) GetRawLineEvents() (evts []domain.LineEventExport, err error)
func (*Sql) GetUserAnswerData ¶ added in v0.0.5
func (s *Sql) GetUserAnswerData() (answerData []UserAnswerData, err error)
func (*Sql) GetUserNearbyPrices ¶ added in v0.0.11
func (s *Sql) GetUserNearbyPrices(userId string) (lp []domain.LocationPrice, err error)
func (*Sql) GetUserProfile ¶
func (s *Sql) GetUserProfile(userId string) (domain.UserProfile, error)
func (*Sql) GetWebSurveyBtnConfig ¶ added in v0.0.14
func (s *Sql) GetWebSurveyBtnConfig() (WebSurveyBtnConfig, error)
func (*Sql) GetWelcomeMsgs ¶
func (s *Sql) GetWelcomeMsgs(tplVars *WelcomeMsgTplVars) (msgs []string, err error)
func (*Sql) NormaliseIslands ¶ added in v0.0.19
func (*Sql) NormalisePrices ¶ added in v0.0.19
NormalisePrices will go through all Price answers and returns answerId - last successfully normalised answerId
func (*Sql) ToggleUserSurvey ¶ added in v0.0.14
func (*Sql) UpdateUserProfile ¶ added in v0.0.14
func (s *Sql) UpdateUserProfile(p domain.UserProfile) error
func (*Sql) UserAnsweredCustomQuestion ¶ added in v0.0.20
func (*Sql) UserLastLocationAnswer ¶ added in v0.0.20
func (*Sql) UsersSurveyNotStarted ¶ added in v0.0.14
type UserAnswerData ¶ added in v0.0.5
type UserGpsAnswerData ¶ added in v0.0.5
type WebSurveyBtnConfig ¶ added in v0.0.14
type WelcomeMsgTplVars ¶
Click to show internal directories.
Click to hide internal directories.