Documentation
¶
Overview ¶
Package integrations provides core logic for managing third-party integrations, including provider definitions, credential management, and operation execution. It serves as the foundation for all integration-related functionality across the platform.
Index ¶
Constants ¶
const ( // TopicIntegrationOperationRequested is emitted when an integration operation is queued TopicIntegrationOperationRequested = "integration.command.execute" // IntegrationQueueName is the dedicated Gala queue for integration operation workloads. IntegrationQueueName = "integrations" )
Variables ¶
var ( // ErrKeystoreRequired indicates the keystore dependency is missing. ErrKeystoreRequired = errors.New("integrations: keystore required") // ErrSessionStoreRequired indicates the session store dependency is missing. ErrSessionStoreRequired = errors.New("integrations: session store required") // ErrProviderNotFound signals the requested provider does not exist in the registry. ErrProviderNotFound = errors.New("integrations: provider not found") // ErrProviderConfigNotFound signals the requested provider config metadata is unavailable. ErrProviderConfigNotFound = errors.New("integrations: provider config not found") // ErrProviderRegistryUninitialized indicates provider operations were attempted before the registry was built. ErrProviderRegistryUninitialized = errors.New("integrations: provider registry uninitialized") // ErrOrgIDRequired indicates the org identifier was omitted. ErrOrgIDRequired = errors.New("integrations: org id required") // ErrIntegrationIDRequired indicates the integration identifier was omitted. ErrIntegrationIDRequired = errors.New("integrations: integration id required") // ErrCredentialNotFound is returned when no credential is stored for the requested integration. ErrCredentialNotFound = errors.New("integrations: credential not found") // ErrCredentialExpired indicates a stored credential is no longer valid. ErrCredentialExpired = errors.New("integrations: credential expired") // ErrStateRequired indicates the OAuth state parameter is missing. ErrStateRequired = errors.New("integrations: state required") // ErrAuthorizationCodeRequired indicates the OAuth authorization code was omitted. ErrAuthorizationCodeRequired = errors.New("integrations: authorization code required") // ErrAuthorizationStateNotFound indicates the provided state does not map to an active session. ErrAuthorizationStateNotFound = errors.New("integrations: authorization state not found") // ErrAuthorizationStateExpired indicates the stored session has expired. ErrAuthorizationStateExpired = errors.New("integrations: authorization state expired") // ErrAuthSessionInvalid indicates the stored auth session reference is invalid. ErrAuthSessionInvalid = errors.New("integrations: auth session invalid") )
var IntegrationOperationRequestedTopic = gala.Topic[IntegrationOperationEnvelope]{ Name: gala.TopicName(TopicIntegrationOperationRequested), }
IntegrationOperationRequestedTopic is emitted when an integration operation is queued.
Functions ¶
This section is empty.
Types ¶
type IntegrationOperationEnvelope ¶ added in v1.11.0
type IntegrationOperationEnvelope struct {
// Request is the integration operation request payload.
Request IntegrationOperationRequestedPayload `json:"request"`
// Type classifies operation behavior for policy routing.
Type IntegrationOperationType `json:"type"`
// TimeoutSeconds is the recommended execution timeout budget.
TimeoutSeconds int `json:"timeout_seconds"`
// MaxAttempts is the River retry budget for this operation.
MaxAttempts int `json:"max_attempts"`
// IdempotencyKey enforces duplicate-safe enqueue semantics.
IdempotencyKey string `json:"idempotency_key"`
}
IntegrationOperationEnvelope captures operation routing and retry policy alongside request payload.
func NewIntegrationOperationEnvelope ¶ added in v1.11.0
func NewIntegrationOperationEnvelope(payload IntegrationOperationRequestedPayload) IntegrationOperationEnvelope
NewIntegrationOperationEnvelope derives queue and retry policy for a requested integration operation.
func (IntegrationOperationEnvelope) Headers ¶ added in v1.11.0
func (e IntegrationOperationEnvelope) Headers() gala.Headers
Headers converts envelope policy into Gala dispatch headers.
type IntegrationOperationRequestedPayload ¶ added in v1.9.3
type IntegrationOperationRequestedPayload struct {
// RunID is the integration run identifier
RunID string `json:"run_id"`
// OrgID is the organization requesting the run
OrgID string `json:"org_id"`
// Provider is the provider identifier
Provider string `json:"provider"`
// Operation is the operation identifier
Operation string `json:"operation"`
// Force indicates the run should refresh credentials
Force bool `json:"force,omitempty"`
// ClientForce forces a client refresh
ClientForce bool `json:"client_force,omitempty"`
// WorkflowInstanceID links the run back to a workflow instance
WorkflowInstanceID string `json:"workflow_instance_id,omitempty"`
// WorkflowActionKey identifies the originating workflow action
WorkflowActionKey string `json:"workflow_action_key,omitempty"`
// WorkflowActionIndex identifies the action index for the workflow action
WorkflowActionIndex int `json:"workflow_action_index,omitempty"`
// WorkflowObjectID is the object id the workflow action targets
WorkflowObjectID string `json:"workflow_object_id,omitempty"`
// WorkflowObjectType is the object type the workflow action targets
WorkflowObjectType enums.WorkflowObjectType `json:"workflow_object_type,omitempty"`
}
IntegrationOperationRequestedPayload captures a queued integration operation request
type IntegrationOperationType ¶ added in v1.11.0
type IntegrationOperationType string
IntegrationOperationType classifies integration workload behavior for queue policy.
const ( // IntegrationOperationTypeSync is the default operation class. IntegrationOperationTypeSync IntegrationOperationType = "sync" // IntegrationOperationTypeImport captures import-style workloads. IntegrationOperationTypeImport IntegrationOperationType = "import" // IntegrationOperationTypeExport captures export-style workloads. IntegrationOperationTypeExport IntegrationOperationType = "export" // IntegrationOperationTypeWebhook captures webhook-driven workloads. IntegrationOperationTypeWebhook IntegrationOperationType = "webhook" )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package activation is an intetnionally separate package from keymaker / keystore that keeps roles between the packages tidy by focusing on activation-specific logic for non-oauth / OIDC providers
|
Package activation is an intetnionally separate package from keymaker / keystore that keeps roles between the packages tidy by focusing on activation-specific logic for non-oauth / OIDC providers |
|
Package ingest provides mapping and persistence for integration operation payloads.
|
Package ingest provides mapping and persistence for integration operation payloads. |
|
Package providers hosts concrete provider implementations used by the registry
|
Package providers hosts concrete provider implementations used by the registry |
|
apikey
Package apikey implements the apikey integration provider.
|
Package apikey implements the apikey integration provider. |
|
aws
Package aws implements the consolidated AWS integration provider.
|
Package aws implements the consolidated AWS integration provider. |
|
awssts
Package awssts implements the awssts integration provider.
|
Package awssts implements the awssts integration provider. |
|
azureentraid
Package azureentraid implements the azureentraid integration provider.
|
Package azureentraid implements the azureentraid integration provider. |
|
azuresecuritycenter
Package azuresecuritycenter implements the azuresecuritycenter integration provider.
|
Package azuresecuritycenter implements the azuresecuritycenter integration provider. |
|
buildkite
Package buildkite implements the buildkite integration provider.
|
Package buildkite implements the buildkite integration provider. |
|
catalog
Package catalog exposes the list of default provider builders
|
Package catalog exposes the list of default provider builders |
|
cloudflare
Package cloudflare implements the cloudflare integration provider.
|
Package cloudflare implements the cloudflare integration provider. |
|
gcpscc
Package gcpscc implements the gcpscc integration provider.
|
Package gcpscc implements the gcpscc integration provider. |
|
github
Package github implements the github integration provider.
|
Package github implements the github integration provider. |
|
googleworkspace
Package googleworkspace implements the googleworkspace integration provider.
|
Package googleworkspace implements the googleworkspace integration provider. |
|
microsoftteams
Package microsoftteams implements the microsoftteams integration provider.
|
Package microsoftteams implements the microsoftteams integration provider. |
|
oauth
Package oauth implements the oauth integration provider.
|
Package oauth implements the oauth integration provider. |
|
oidcgeneric
Package oidcgeneric implements the oidcgeneric integration provider.
|
Package oidcgeneric implements the oidcgeneric integration provider. |
|
okta
Package okta implements the okta integration provider.
|
Package okta implements the okta integration provider. |
|
schematest
Package schematest provides shared test helpers for validating JSON schema structures across integration provider test files.
|
Package schematest provides shared test helpers for validating JSON schema structures across integration provider test files. |
|
slack
Package slack implements the slack integration provider.
|
Package slack implements the slack integration provider. |
|
vercel
Package vercel implements the vercel integration provider.
|
Package vercel implements the vercel integration provider. |
|
Package registry wires provider specifications into runtime provider instances
|
Package registry wires provider specifications into runtime provider instances |