Documentation
¶
Overview ¶
Package integrationapi is the admin REST surface for integrations (#2659): every operation with the script chosen for it and its items, the scripts the picker offers, choosing and clearing an operation's script, and a retry. Choosing, changing, clearing and retrying are audited.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BindInput ¶
type BindInput struct {
ScriptID string `json:"script_id"`
// IntervalSeconds is the timer, 60 to 86400; 0 or omitted keeps the
// current one, 900 for a new binding.
IntervalSeconds int `json:"interval_seconds,omitempty"`
// Approve approves the script's latest version for handlers, as you.
Approve bool `json:"approve,omitempty"`
}
BindInput chooses an operation's script.
type CandidateList ¶
type CandidateList struct {
Scripts []integration.Candidate `json:"scripts"`
}
CandidateList is the picker's scripts.
type Config ¶
type Config struct {
// Service carries out the actions; nil mounts nothing.
Service Service
// Actor is the administrator making a request. Every request the routes
// see passed the admin API's authentication.
Actor func(*http.Request) integration.Actor
// Audit records every change; nil records none.
Audit middleware.AuditLogger
}
Config carries the service and the parent-owned helpers.
type IntegrationList ¶
type IntegrationList struct {
Integrations []integration.Overview `json:"integrations"`
}
IntegrationList is the list response.
type Service ¶
type Service interface {
Overview(ctx context.Context) ([]integration.Overview, error)
Candidates(ctx context.Context, a integration.Actor, op, search string) ([]integration.Candidate, error)
Bind(ctx context.Context, a integration.Actor, req integration.BindRequest) (*integration.Binding, error)
Clear(ctx context.Context, a integration.Actor, op string) error
Retry(ctx context.Context, op string) error
}
Service is what the routes act through. *integration.Service satisfies it.
Click to show internal directories.
Click to hide internal directories.