README ¶
ask
import "github.com/coralproject/shelf/internal/ask"
Overview
Index
- Variables
- func CreateSubmission(context interface{}, db *db.DB, formID string, answers []submission.AnswerInput) (*submission.Submission, error)
- func DeleteSubmission(context interface{}, db *db.DB, id, formID string) error
- func UpsertForm(context interface{}, db *db.DB, f *form.Form) error
Package files
Variables
var ErrInvalidID = errors.New("ID is not in it's proper form")
ErrInvalidID occurs when an ID is not in a valid form.
func CreateSubmission
func CreateSubmission(context interface{}, db *db.DB, formID string, answers []submission.AnswerInput) (*submission.Submission, error)
CreateSubmission creates a form submission based on a given form with a set of answers related to it.
func DeleteSubmission
func DeleteSubmission(context interface{}, db *db.DB, id, formID string) error
DeleteSubmission deletes a submission as well as updating a form's stats.
func UpsertForm
func UpsertForm(context interface{}, db *db.DB, f *form.Form) error
UpsertForm upserts the provided form into the MongoDB database collection and creates a gallery based on it.
Generated by godoc2md
Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidID = errors.New("ID is not in it's proper form")
ErrInvalidID occurs when an ID is not in a valid form.
Functions ¶
func CreateSubmission ¶
func CreateSubmission(context interface{}, db *db.DB, formID string, answers []submission.AnswerInput) (*submission.Submission, error)
CreateSubmission creates a form submission based on a given form with a set of answers related to it.
func DeleteSubmission ¶
DeleteSubmission deletes a submission as well as updating a form's stats.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.