package
0.4.8
Repository: https://github.com/coralproject/shelf.git
Documentation: pkg.go.dev

# 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

# Packages

No description provided by the author

# Functions

CreateSubmission creates a form submission based on a given form with a set of answers related to it.
DeleteSubmission deletes a submission as well as updating a form's stats.
UpsertForm upserts the provided form into the MongoDB database collection and creates a gallery based on it.

# Variables

ErrInvalidID occurs when an ID is not in a valid form.