Documentation ¶
Index ¶
- func New(is []sdkservices.Integration) sdkservices.Integrations
- func NewIntegration(desc sdktypes.Integration, mod sdkmodule.Module, opts ...OptFn) sdkservices.Integration
- type ConnectionInit
- type OAuthData
- type OptFn
- func WithConnectionConfig(fn func(context.Context, sdktypes.ConnectionID) (map[string]string, error)) OptFn
- func WithConnectionConfigFromVars(cvars sdkservices.Vars) OptFn
- func WithConnectionStatus(fn func(context.Context, sdktypes.ConnectionID) (sdktypes.Status, error)) OptFn
- func WithConnectionTest(fn func(context.Context, sdktypes.ConnectionID) (sdktypes.Status, error)) OptFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(is []sdkservices.Integration) sdkservices.Integrations
func NewIntegration ¶
func NewIntegration( desc sdktypes.Integration, mod sdkmodule.Module, opts ...OptFn, ) sdkservices.Integration
NewIntegration creates a new integration, augmenting the given `desc` with the members definition from `mod`.
Types ¶
type ConnectionInit ¶ added in v0.8.4
type ConnectionInit struct { Writer http.ResponseWriter Request *http.Request Integration sdktypes.Integration ConnectionID string Origin string // contains filtered or unexported fields }
func NewConnectionInit ¶ added in v0.8.4
func NewConnectionInit(l *zap.Logger, w http.ResponseWriter, r *http.Request, i sdktypes.Integration) (ConnectionInit, *zap.Logger)
func (ConnectionInit) AbortBadRequest ¶ added in v0.8.6
func (c ConnectionInit) AbortBadRequest(err string)
AbortBadRequest is the same as [AbortWithStatus] with HTTP 400 (Bad Request).
func (ConnectionInit) AbortServerError ¶ added in v0.8.6
func (c ConnectionInit) AbortServerError(err string)
AbortServerError is the same as [AbortWithStatus] with HTTP 500 (Internal Server Error).
func (ConnectionInit) AbortWithStatus ¶ added in v0.8.4
func (c ConnectionInit) AbortWithStatus(status int, err string)
Abort aborts the connection initialization flow due to a runtime error. It encodes the error status and message, and redirects the user to the last HTTP response, based on its origin (local AK server / local VS Code extension / SaaS web UI).
func (ConnectionInit) FinalURL ¶ added in v0.13.2
func (c ConnectionInit) FinalURL() (string, error)
FinalURL returns the final redirect URL at the end of the connection flow in each integration, based on the origin of the connection initialization request. TODO(INT-195): Deprecate "Finalize" above and the "postinit" webhook.
func (ConnectionInit) Finalize ¶ added in v0.8.4
func (c ConnectionInit) Finalize(data []sdktypes.Var)
Finalize finalizes all integration-specific connection flows. It encodes their resulting details and redirects the user to the final HTTP handler ("post-init") that saves the data in the connection's scope, and redirects the user to the last HTTP response, based on its origin (local AK server / local VS Code extension / SaaS web UI).
type OAuthData ¶ added in v0.5.0
func DecodeOAuthData ¶ added in v0.5.0
func GetOAuthDataFromURL ¶ added in v0.5.0
type OptFn ¶ added in v0.5.13
type OptFn func(*integration)
func WithConnectionConfig ¶ added in v0.6.6
func WithConnectionConfigFromVars ¶ added in v0.6.6
func WithConnectionConfigFromVars(cvars sdkservices.Vars) OptFn