Documentation
¶
Overview ¶
Package epsource makes the webhook source a form stores its submissions in (#2178), when the form is bound to an endpoint: named for the endpoint, on the Trino connection the binding names or the only one there is, with the personas a script may decrypt the form's sensitive fields as; and finds the one made for a form script before.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Maker ¶
type Maker struct {
Admin SourceAdmin
// Connections names the connections a source's tables can be created
// on (trino.Toolkit.ScratchConnections).
Connections func() []string
}
Maker makes the webhook source a form stores its submissions in, when the form is bound to an endpoint (#2178).
func (*Maker) ConnectionChoices ¶
ConnectionChoices names the connections a form's source can be made on.
func (*Maker) Ensure ¶
func (m *Maker) Ensure(ctx context.Context, req SourceRequest) (SourceResult, error)
Ensure is the form's source: the one made for its script before, with its decrypt personas replaced when the request names them, or a new one on the connection the request names, or on the only one there is.
type SourceAdmin ¶
type SourceAdmin interface {
List(ctx context.Context) ([]whsource.Source, error)
CreateForm(ctx context.Context, src whsource.Source) (whsource.Source, error)
SetDecryptPersonas(ctx context.Context, name string, personas []string) (whsource.Source, error)
}
SourceAdmin is the webhook source service as a form's source is made and changed through it (whadmin.Service).
type SourceRequest ¶
type SourceRequest struct {
ScriptID string
Endpoint string
// Connection is the Trino connection the source's tables go on; empty
// is the deployment's only connection with a scratch catalog.
Connection string
// DecryptPersonas replaces the personas the form's sensitive fields may
// be decrypted as; nil keeps them.
DecryptPersonas []string
Actor string
}
SourceRequest is a form bound to an endpoint, asking for its source.