Documentation
¶
Index ¶
- Constants
- func ExchangeToken(ctx context.Context, httpClient core.HTTPContext, oidcToken, audience string) (accessToken string, expiresIn time.Duration, err error)
- type AuditLogEvent
- type AuditLogEventPattern
- type Configuration
- type GCP
- func (g *GCP) Actions() []core.Action
- func (g *GCP) Cleanup(ctx core.IntegrationCleanupContext) error
- func (g *GCP) Configuration() []configuration.Field
- func (g *GCP) Description() string
- func (g *GCP) HandleHook(ctx core.IntegrationHookContext) error
- func (g *GCP) HandleRequest(ctx core.HTTPRequestContext)
- func (g *GCP) Hooks() []core.Hook
- func (g *GCP) Icon() string
- func (g *GCP) Instructions() string
- func (g *GCP) Label() string
- func (g *GCP) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (g *GCP) Name() string
- func (g *GCP) Sync(ctx core.SyncContext) error
- func (g *GCP) Triggers() []core.Trigger
- type WebhookHandler
Constants ¶
const ( ConnectionMethodServiceAccountKey = "serviceAccountKey" ConnectionMethodWIF = "workloadIdentityFederation" PubSubSecretName = "pubsub.events.secret" CloudBuildSecretName = "cloudbuild.events.secret" ArtifactPushSecretName = "artifactregistry.push.secret" ContainerAnalysisSecretName = "containeranalysis.occurrences.secret" CloudBuildTopicID = "cloud-builds" ArtifactPushTopicID = "gcr" ContainerAnalysisTopicID = "container-analysis-occurrences-v1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuditLogEvent ¶
type AuditLogEvent struct {
ServiceName string `json:"serviceName" mapstructure:"serviceName"`
MethodName string `json:"methodName" mapstructure:"methodName"`
ResourceName string `json:"resourceName" mapstructure:"resourceName"`
LogName string `json:"logName" mapstructure:"logName"`
Timestamp string `json:"timestamp" mapstructure:"timestamp"`
InsertID string `json:"insertId" mapstructure:"insertId"`
Data any `json:"data" mapstructure:"data"`
}
AuditLogEvent is the normalized event structure extracted from a Cloud Logging audit log entry, used both for subscription pattern matching and as the message payload delivered to triggers via OnIntegrationMessage.
type AuditLogEventPattern ¶
type AuditLogEventPattern struct {
ServiceName string `json:"serviceName" mapstructure:"serviceName"`
MethodName string `json:"methodName" mapstructure:"methodName"`
}
AuditLogEventPattern is the subscription pattern used to match incoming events against trigger subscriptions. Only non-empty fields are matched.
type Configuration ¶
type Configuration struct {
ConnectionMethod string `json:"connectionMethod" mapstructure:"connectionMethod"`
ServiceAccountKey string `json:"serviceAccountKey" mapstructure:"serviceAccountKey"`
WorkloadIdentityProvider string `json:"workloadIdentityProvider" mapstructure:"workloadIdentityProvider"`
WorkloadIdentityProjectID string `json:"workloadIdentityProjectId" mapstructure:"workloadIdentityProjectId"`
}
type GCP ¶
type GCP struct{}
func (*GCP) Configuration ¶
func (g *GCP) Configuration() []configuration.Field
func (*GCP) Description ¶
func (*GCP) HandleHook ¶ added in v0.18.0
func (g *GCP) HandleHook(ctx core.IntegrationHookContext) error
func (*GCP) HandleRequest ¶
func (g *GCP) HandleRequest(ctx core.HTTPRequestContext)
func (*GCP) Instructions ¶
func (*GCP) ListResources ¶
func (g *GCP) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type WebhookHandler ¶ added in v0.26.0
type WebhookHandler struct{}
WebhookHandler is the integration-level webhook handler for GCP. It is a no-op: triggers that deliver through a SuperPlane node webhook (e.g. monitoring.onAlert, which creates its own Cloud Monitoring notification channel pointing at the node URL during Setup) still need the integration to expose a webhook handler so the webhook record can be provisioned and marked ready. The external-system wiring is owned by each trigger, so the handler itself has nothing to do.
func (*WebhookHandler) Cleanup ¶ added in v0.26.0
func (h *WebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
func (*WebhookHandler) CompareConfig ¶ added in v0.26.0
func (h *WebhookHandler) CompareConfig(a, b any) (bool, error)
func (*WebhookHandler) Merge ¶ added in v0.26.0
func (h *WebhookHandler) Merge(current, requested any) (any, bool, error)
func (*WebhookHandler) Setup ¶ added in v0.26.0
func (h *WebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)