go-survey

command module
v0.0.0-...-75106e0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 25 Imported by: 0

README

go-survey

Service build using SurveyJS library. Create and edit

Build Status

Envorinment variables

  • DATABASE_URL - database url where survey and answers are stored (default: sqlite3://:memory:)
  • PORT - port on which app listens (default: 80)
  • PROPERTIES_URL - url to load properties from. See below for example
  • ANSWER_WEBHOOK_URL - url which is called when answer is created/updated (payload is in format {"survey":"XXX","answer":"YYY"})
  • JWT_SECRET - secret for validating JWT

Properties

Content has following structure:

[
  {
    key: "categories",
    type: "multiplevalues",
    choices: [
        { value: "category_a", text: "Category A" },
        { value: "category_b", text: "Category B" }
    ]
  }
]

Endpoints

This service doesn't handle user authorization for each endpoints, instead you should access for each endpoint using your proxy and this service should not be publicly accessible

  • /editor?survey=XXX - editing detail for survey XXX
  • /survey?survey=XXX&answer=YYY - answering survey XXX with answers grouped under id YYY
  • /graphql - graphql api where you can scrape data based on ANSWER_WEBHOOK_URL webhook

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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