Documentation
¶
Overview ¶
Package integration implements the `integration` commands. The four kinds of integration have the same endpoints, so one implementation serves them all.
Index ¶
- Constants
- Variables
- func Apply(ctx context.Context, c *platform.Client, k Kind, o ApplyOptions) error
- func Delete(ctx context.Context, c *platform.Client, k Kind, o DeleteOptions) error
- func Get(ctx context.Context, c *platform.Client, k Kind, o GetOptions) error
- func List(ctx context.Context, c *platform.Client, k Kind, explicitType string) error
- func Masked(v any) bool
- type ApplyOptions
- type DeleteOptions
- type GetOptions
- type Kind
Constants ¶
View Source
const Mask = "********"
Mask is what `export` writes in place of a credential. Like the platform's own mask of a secret, it is only asterisks, which is how apply and diff tell one.
Variables ¶
View Source
var ( Webhook = Kind{ Name: "webhook", Title: "Webhook integration", Plural: "webhook integrations", Column: "url", ColumnTitle: "URL", Secrets: []string{"secret", "headers"}, // contains filtered or unexported fields } Slack = Kind{ Name: "slack", Title: "Slack integration", Plural: "Slack integrations", Column: "channel", ColumnTitle: "Channel", Secrets: []string{"url"}, // contains filtered or unexported fields } Preflight = Kind{ Name: "preflight", Title: "Preflight webhook", Plural: "preflight webhooks", Column: "url", ColumnTitle: "URL", Secrets: []string{"secret", "headers"}, // contains filtered or unexported fields } PreflightAction = Kind{ Name: "preflight-action", Title: "Preflight action integration", Plural: "preflight action integrations", Column: "preflightActionId", ColumnTitle: "Preflight action", // contains filtered or unexported fields } Kinds = []Kind{Webhook, Slack, Preflight, PreflightAction} )
View Source
var ReadOnly = []string{"version"}
The version is dropped as `service get` drops it: kept in a file, it turns every apply after an edit in the UI into a conflict.
Functions ¶
Types ¶
type ApplyOptions ¶
type DeleteOptions ¶
type GetOptions ¶
type GetOptions struct {
ID, File, Type string
}
type Kind ¶
type Kind struct {
Name string // as the command names it
Title string // as messages name it
Plural string
// The column that says where the integration reports to.
Column, ColumnTitle string
// Secrets are the fields holding credentials; each value of a map among them is one.
// `export` masks them, so that a tenant kept in Git does not hold them.
Secrets []string
// contains filtered or unexported fields
}
func (Kind) Fetch ¶ added in v6.1.0
func (k Kind) Fetch(ctx context.Context, c *platform.Client, id openapi_types.UUID) (*http.Response, error)
Fetch gets one integration as `get` reads it.
func (Kind) FetchAll ¶ added in v6.1.0
FetchAll lists the integrations of the kind, as `list` reads them.
func (Kind) MaskSecrets ¶ added in v6.1.0
MaskSecrets replaces the credentials in an integration with the mask.
Click to show internal directories.
Click to hide internal directories.