# README
handlers
import "github.com/coralproject/shelf/cmd/askd/handlers"
Overview
Package handlers contains the handler logic for processing requests.
Index
- Variables
- func ValidateReacaptchaResponse(c *web.Context, recaptchaSecret, response string) error
- type AggregationKeys
- type FormDigest
- type FormQuestionDigest
- type FormQuestionOptionDigest
Package files
aggregations.go csv_handler.go form.go form_gallery.go form_submission.go version.go
Variables
var Aggregation aggregationHandle
Aggregation fronts the access to the form service functionality.
var ErrInvalidCaptcha = errors.New("captcha invalid")
ErrInvalidCaptcha is returned when a captcha is required for a form but it is not valid on the request.
var Form formHandle
Form fronts the access to the form service functionality.
var FormGallery formGalleryHandle
FormGallery fronts the access to the form service functionality.
var FormSubmission formSubmissionHandle
FormSubmission fronts the access to the form service functionality.
var Version verHandle
Version fronts the access to the ver service functionality.
func ValidateReacaptchaResponse
func ValidateReacaptchaResponse(c *web.Context, recaptchaSecret, response string) error
ValidateReacaptchaResponse will compare the response provided by the request and check with the Google Recaptcha Web Service if it's valid.
type AggregationKeys
type AggregationKeys struct {
Aggregations map[string]form.Aggregation `json:"aggregations"`
}
AggregationKeys is a transport type that describes the json format for return value of the aggregate endpoint including a key lookup structure allowing consumers to easily find group keys.
type FormDigest
type FormDigest struct {
Questions map[string]FormQuestionDigest `json:"questions" bson:"questions"`
}
FormDigest is the blueprint for how we send form digests to clients.
type FormQuestionDigest
type FormQuestionDigest struct {
ID string `json:"id" bson:"id"`
Type string `json:"type" bson:"type"`
Title string `json:"title" bson:"title"`
GroupBy bool `json:"group_by" bson:"group_by"`
Options []FormQuestionOptionDigest `json:"options,omitempty" bson:"options,omitempty"`
Order int `json:"order" bson:"order"`
}
FormQuestionDigest is the bluprint for a question in a form group.
type FormQuestionOptionDigest
type FormQuestionOptionDigest struct {
ID string `json:"id" bson:"id"`
Value string `json:"value" bson:"value"`
}
FormQuestionOptionDigest is the blueprint for a single multiple choice option.
Generated by godoc2md