ask

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

README

ask

import "github.com/coralproject/shelf/internal/ask"

Overview

Index

Package files

ask.go

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

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.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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