surveys

package
v0.0.0-...-58b1d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const URL_SLUG_LENGTH = 12

Variables

This section is empty.

Functions

func CallWebhook

func CallWebhook(svc services.Services, survey *types.Survey, session *types.SurveySession) error

func CreateSurvey

func CreateSurvey(svc services.Services, survey *types.Survey) error

func CreateSurveySession

func CreateSurveySession(svc services.Services, survey *types.Survey, ipAddr string) (*types.SurveySession, error)

func GetSurvey

func GetSurvey(svc services.Services, urlSlug string) (*types.Survey, error)

func GetSurveyByUUID

func GetSurveyByUUID(svc services.Services, uuid string) (*types.Survey, error)

func GetSurveySession

func GetSurveySession(svc services.Services, survey types.Survey, sessionUUID string) (*types.SurveySession, error)

func GetSurveySessions

func GetSurveySessions(svc services.Services, survey types.Survey, filter *types.SurveySessionsFilter) ([]types.SurveySession, int, error)

func PersistSurveysSyncResult

func PersistSurveysSyncResult(svc services.Services, syncResult *types.SurveysSyncResult) error

Use cases 1. When it's a new survey - create it 2. When it's an existing survey - update it

func SubmitAnswer

func SubmitAnswer(svc services.Services, session *types.SurveySession, survey *types.Survey, question *types.Question, req []byte, file *types.File) (error, error)

returns 2 errors: general and error details

func SyncSurveys

func SyncSurveys(svc services.Services) error

func SyncSurveysOnChange

func SyncSurveysOnChange(svc services.Services)

func UpdateSurvey

func UpdateSurvey(svc services.Services, survey *types.Survey) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL