Documentation
¶
Overview ¶
Package epsubmit reads a form's stored submissions for its owner (#2180): the newest rows of webhook_form_<endpoint>, through the Trino connection the form's source is on, with each sensitive field decrypted and the read audited with the fields it opened (#2179), and the same rows as CSV or an Excel workbook.
Index ¶
Constants ¶
View Source
const ( // DefaultLimit is how many submissions the page shows. DefaultLimit = 50 // MaxLimit is the most one read or export returns. MaxLimit = 10000 )
Bounds of a read.
View Source
const ( FormatCSV = "csv" FormatXLSX = "xlsx" )
The export formats.
Variables ¶
View Source
var ErrNoForm = errors.New("this script stores no form submissions: bind it as a form with manage_script endpoint_set")
ErrNoForm is a script with no form source: it was never bound as a form.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
Form string `json:"form"`
Source string `json:"source"`
Table string `json:"table"`
Connection string `json:"connection"`
// Fields are the columns, in the order the newest submission's form
// declared them, then any an older one held.
Fields []string `json:"fields"`
// Sensitive are the fields that were decrypted for this read.
Sensitive []string `json:"sensitive"`
Submissions []Submission `json:"submissions"`
Limit int `json:"limit"`
}
Page is a form's newest submissions and what reads them.
type Reader ¶
type Reader struct {
Sources epcollect.SourceLister
Tables Targets
Query Querier
Sealer epcollect.Sealer
Audit middleware.AuditLogger
}
Reader reads a form's submissions.
type Submission ¶
type Submission struct {
ID string `json:"id"`
ReceivedAt time.Time `json:"received_at"`
Submitter *epcollect.Submitter `json:"submitter,omitempty"`
Values map[string]any `json:"values"`
}
Submission is one stored submission.
Click to show internal directories.
Click to hide internal directories.