Documentation
¶
Overview ¶
Package serverless holds the provider-agnostic core of the secrets-sync serverless entrypoints. The AWS Lambda and Azure Functions binaries are thin adapters that decode their platform's trigger into a Request and call Handle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalResponse ¶
MarshalResponse JSON-encodes a Response, returning "{}" on the (unreachable) marshal error so adapters always have a body.
Types ¶
type ProviderSession ¶
type ProviderSession struct {
DelegateAuth bool `json:"delegate_auth,omitempty"`
VaultAddress string `json:"vault_address,omitempty"`
VaultNamespace string `json:"vault_namespace,omitempty"`
VaultToken string `json:"vault_token,omitempty"`
AWSRegion string `json:"aws_region,omitempty"`
AWSAccessKeyID string `json:"aws_access_key_id,omitempty"`
AWSSecretAccessKey string `json:"aws_secret_access_key,omitempty"`
AWSSessionToken string `json:"aws_session_token,omitempty"`
AWSRoleARN string `json:"aws_role_arn,omitempty"`
AWSEndpointURL string `json:"aws_endpoint_url,omitempty"`
}
ProviderSession carries runtime auth material supplied by the caller.
type Request ¶
type Request struct {
ConfigYAML string `json:"config_yaml,omitempty"`
ConfigPath string `json:"config_path,omitempty"`
ConfigS3Bucket string `json:"config_s3_bucket,omitempty"`
ConfigS3Key string `json:"config_s3_key,omitempty"`
Options RequestOptions `json:"options,omitempty"`
Session ProviderSession `json:"session,omitempty"`
}
Request is the trigger payload for a serverless pipeline run.
type RequestOptions ¶
type RequestOptions struct {
Operation string `json:"operation,omitempty"`
Targets string `json:"targets,omitempty"`
DryRun bool `json:"dry_run,omitempty"`
ContinueOnError bool `json:"continue_on_error,omitempty"`
Parallelism int `json:"parallelism,omitempty"`
ComputeDiff bool `json:"compute_diff,omitempty"`
OutputFormat string `json:"output_format,omitempty"`
ShowValues bool `json:"show_values,omitempty"`
}
RequestOptions controls pipeline execution.
type Response ¶
type Response struct {
Success bool `json:"success"`
TargetCount int `json:"target_count"`
SecretsProcessed int `json:"secrets_processed"`
SecretsAdded int `json:"secrets_added"`
SecretsModified int `json:"secrets_modified"`
SecretsRemoved int `json:"secrets_removed"`
SecretsUnchanged int `json:"secrets_unchanged"`
DurationMs int64 `json:"duration_ms"`
ErrorMessage string `json:"error_message,omitempty"`
Results []ResultItem `json:"results"`
DiffOutput string `json:"diff_output,omitempty"`
}
Response is the serverless run summary.
type ResultItem ¶
type ResultItem struct {
Target string `json:"target"`
Phase string `json:"phase"`
Operation string `json:"operation"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
DurationMs int64 `json:"duration_ms"`
Details pipeline.ResultDetails `json:"details,omitempty"`
}
ResultItem is a per-target result in the response.
Click to show internal directories.
Click to hide internal directories.