Documentation
¶
Index ¶
- Constants
- Variables
- type Params
- type SQLStore
- func (s *SQLStore) GetAllResponses(surveyID, lastResponseID string, perPage uint64) ([]*model.SurveyResponse, error)
- func (s *SQLStore) GetLatestEndedSurvey() (*model.Survey, error)
- func (s *SQLStore) GetSchemaName() (string, error)
- func (s *SQLStore) GetSurveyResponse(userID, surveyID string) (*model.SurveyResponse, error)
- func (s *SQLStore) GetSurveyStat(surveyID string) (*model.SurveyStat, error)
- func (s *SQLStore) GetSurveyStatList() ([]*model.SurveyStat, error)
- func (s *SQLStore) GetSurveysByID(surveyID string) (*model.Survey, error)
- func (s *SQLStore) GetSurveysByStatus(status string) ([]*model.Survey, error)
- func (s *SQLStore) GetTemplateHelperFuncs() template.FuncMap
- func (s *SQLStore) IncrementSurveyReceiptCount(surveyID string) error
- func (s *SQLStore) IncrementSurveyResponseCount(surveyID string) error
- func (s *SQLStore) MarshalJSONB(data interface{}) ([]byte, error)
- func (s *SQLStore) Migrate(migrationTimeoutSeconds int) error
- func (s *SQLStore) ResetData() error
- func (s *SQLStore) SaveSurvey(survey *model.Survey) error
- func (s *SQLStore) SaveSurveyResponse(response *model.SurveyResponse) error
- func (s *SQLStore) Shutdown() error
- func (s *SQLStore) SurveysFromRows(rows *sql.Rows) ([]*model.Survey, error)
- func (s *SQLStore) UpdateRatingGroupCount(surveyID string, promoterFactor, neutralFactor, detractorFactor int) error
- func (s *SQLStore) UpdateSurveyResponse(response *model.SurveyResponse) error
- func (s *SQLStore) UpdateSurveyStatus(surveyID, status string) error
- type Store
Constants ¶
View Source
const (
TablePrefix = "user_survey_"
)
Variables ¶
View Source
var Assets embed.FS
View Source
var (
ErrUnsupportedDatabaseType = errors.New("database type is unsupported")
)
Functions ¶
This section is empty.
Types ¶
type Params ¶
type SQLStore ¶
type SQLStore struct {
// contains filtered or unexported fields
}
func (*SQLStore) GetAllResponses ¶
func (*SQLStore) GetLatestEndedSurvey ¶
func (*SQLStore) GetSchemaName ¶
func (*SQLStore) GetSurveyResponse ¶
func (s *SQLStore) GetSurveyResponse(userID, surveyID string) (*model.SurveyResponse, error)
func (*SQLStore) GetSurveyStat ¶
func (s *SQLStore) GetSurveyStat(surveyID string) (*model.SurveyStat, error)
func (*SQLStore) GetSurveyStatList ¶
func (s *SQLStore) GetSurveyStatList() ([]*model.SurveyStat, error)
func (*SQLStore) GetSurveysByID ¶
func (*SQLStore) GetSurveysByStatus ¶
func (*SQLStore) GetTemplateHelperFuncs ¶
func (*SQLStore) IncrementSurveyReceiptCount ¶
func (*SQLStore) IncrementSurveyResponseCount ¶
func (*SQLStore) MarshalJSONB ¶
func (*SQLStore) SaveSurveyResponse ¶
func (s *SQLStore) SaveSurveyResponse(response *model.SurveyResponse) error
func (*SQLStore) SurveysFromRows ¶
func (*SQLStore) UpdateRatingGroupCount ¶
func (*SQLStore) UpdateSurveyResponse ¶
func (s *SQLStore) UpdateSurveyResponse(response *model.SurveyResponse) error
func (*SQLStore) UpdateSurveyStatus ¶
type Store ¶
type Store interface { Shutdown() error Migrate(migrationTimeoutSeconds int) error GetTemplateHelperFuncs() template.FuncMap GetSchemaName() (string, error) GetSurveysByStatus(status string) ([]*model.Survey, error) GetSurveysByID(surveyID string) (*model.Survey, error) SurveysFromRows(rows *sql.Rows) ([]*model.Survey, error) SaveSurvey(survey *model.Survey) error UpdateSurveyStatus(surveyID, status string) error SaveSurveyResponse(response *model.SurveyResponse) error GetSurveyResponse(userID, surveyID string) (*model.SurveyResponse, error) UpdateSurveyResponse(response *model.SurveyResponse) error IncrementSurveyReceiptCount(surveyID string) error IncrementSurveyResponseCount(surveyID string) error GetSurveyStatList() ([]*model.SurveyStat, error) GetSurveyStat(surveyID string) (*model.SurveyStat, error) UpdateRatingGroupCount(surveyID string, promoterFactor, neutralFactor, detractorFactor int) error ResetData() error GetAllResponses(surveyID, lastResponseID string, perPage uint64) ([]*model.SurveyResponse, error) GetLatestEndedSurvey() (*model.Survey, error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.