adapter

package
v0.0.1-nightly.2026101... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package adapter defines the compiled-in deployment-module seam. Provider implementations receive plaintext only for the lifetime of Sync; adapter configuration, planning, and connection tests cannot carry it.

Index

Constants

View Source
const (
	AWSSecretNameLimit  = 512
	AWSSecretValueLimit = 65536
)

AWS Secrets Manager contract (#158). Names and values are refused, never rewritten: an operator sees the exact key that cannot be represented.

View Source
const (
	RetryFloor = 30 * time.Second
	RetryCap   = time.Hour
	// AttemptTimeout bounds one claimed attempt, not the lifetime of its job.
	AttemptTimeout = 2 * time.Minute
	// LeaseTime reserves a bounded settlement grace after execution cancels.
	// Reclaim and completion retain their exact owner/effect fences.
	LeaseTime = AttemptTimeout + 5*time.Second
)
View Source
const CloudflareValueLimit = 5 * 1024

CloudflareValueLimit is the documented per-variable size limit shared by Workers secrets and Pages environment variables.

View Source
const SealedWebhookValueLimit = 256 << 10

SealedWebhookValueLimit bounds one plaintext value. Each value is sealed into its own envelope, far under the protocol's ciphertext bound.

View Source
const SentinelName = "MANAGED_BY_HIKYO"
View Source
const VaultKVValueLimit = 512 << 10

VaultKVValueLimit keeps one KV v2 write inside the default 1 MiB integrated storage entry after JSON escaping and version metadata.

Variables

View Source
var (
	ErrConflict      = errors.New("adapter: exists, unowned")
	ErrSuperseded    = errors.New("adapter: target generation superseded")
	ErrUnauthorized  = errors.New("adapter: recorded authority no longer authorized")
	ErrProviderAuth  = errors.New("adapter: provider credential was refused")
	ErrIndeterminate = errors.New("adapter: provider outcome indeterminate")
	// ErrOperatorReview stops automatic attempts when provider write provenance
	// cannot be established safely. Fresh explicit consent is needed to resume.
	ErrOperatorReview = errors.New("adapter: provider outcome requires operator review")
	ErrVersionFloor   = errors.New("adapter: Forgejo requires version >= 1.21")
	ErrDestinationID  = errors.New("adapter: destination numeric id changed")
	ErrProviderBusy   = errors.New("adapter: provider write is still in flight")
	ErrQueueFull      = errors.New("adapter: target outbox queue limit reached")
	ErrLedgerFull     = errors.New("adapter: target ownership ledger limit reached")
	ErrRateLimited    = errors.New("adapter: provider rate limited")
	// ErrAckForged means a provider answered with an acknowledgement that
	// failed signature or binding verification. It is terminal: the attempt
	// is not retried and the target needs operator attention.
	ErrAckForged = errors.New("adapter: provider acknowledgement failed verification")
)

Functions

func AWSJSONDocument

func AWSJSONDocument(prefix string, entries []ManifestEntry) (string, error)

AWSJSONDocument is the deterministic json-object encoding: one member per key named prefix+canonical name, members sorted by name, no insignificant whitespace, and no HTML escaping. Values are JSON strings, so a consumer that parses the document gets the exact published bytes back.

func AWSOriginRegion

func AWSOriginRegion(canonical string) (string, bool)

AWSOriginRegion identifies the admitted AWS-owned endpoint namespace without rewriting transport or disabling FIPS. Account identity stays in the verified destination. Custom endpoints do not establish AWS-wide account authority; their custody namespace remains the exact canonical endpoint.

func CanonicalOrigin

func CanonicalOrigin(provider Provider, raw string) (string, error)

CanonicalOrigin is the sole URL-spelling owner for configured provider endpoints and custody comparisons. It never changes the selected service, meaningful relative root, Vault namespace, or non-default port.

func CompletedNames

func CompletedNames(changes []Change) map[LedgerKey]bool

func ConsumptionForTarget

func ConsumptionForTarget(provider string, destination Destination, prefix string, entries []ManifestEntry) (string, error)

ConsumptionForTarget renders the names-only consumption snippet an operator copies into the workload. It never carries values.

func CredentialAAD

func CredentialAAD(orgID, projectID, adapterID string) crypto.ProjectFieldAAD

CredentialAAD binds an adapter credential ciphertext to its adapter row. All seal and open sites share this owner so their byte contract cannot drift.

func GitLabMaskable

func GitLabMaskable(value string) bool

GitLabMaskable applies Hikyo's conservative GitLab masking policy. It never returns or formats the value.

func IndexLedger

func IndexLedger(rows []LedgerEntry) (map[LedgerKey]LedgerEntry, error)

func NameSet

func NameSet(values []string) map[string]bool

func ProviderRetryAt

func ProviderRetryAt(err error) (time.Time, bool)

func RecipientSetNeedsCeremony

func RecipientSetNeedsCeremony(oldVisibility string, oldIDs []int64, newVisibility string, newIDs []int64) bool

RecipientSetNeedsCeremony classifies the exact locked narrowing cases. Only all->private, all->selected, and removal from an unchanged selected set may skip the full recipient-set authorization ceremony.

func RetryDelay

func RetryDelay(attempt int, jitter func(time.Duration) time.Duration) time.Duration

func SafeTransportError

func SafeTransportError(cause error) error

SafeTransportError hides receiver-controlled URLs and HTTP parser messages from error formatting and production logs. The original chain remains available only to typed error predicates, including cancellation and timeout classification; no cause text is interpolated into the safe message.

func SortChanges

func SortChanges(rows []Change)

func ValidateAWSSecretsManagerDestination

func ValidateAWSSecretsManagerDestination(destination Destination) error

ValidateAWSSecretsManagerDestination checks the routing fields alone: the 12-digit account, the mode-specific secret name or path, and the optional customer KMS key (carried in Destination.Environment).

func ValidateAWSSecretsManagerManifest

func ValidateAWSSecretsManagerManifest(destination Destination, prefix string, entries []ManifestEntry, values bool) error

ValidateAWSSecretsManagerManifest enforces the destination, name, and (when values is true) byte contract for one target.

func ValidateCloudflareManifest

func ValidateCloudflareManifest(prefix string, entries []ManifestEntry, values bool) error

ValidateCloudflareManifest applies the Workers binding-name rule shared by Workers secrets and Pages variables. Every entry, including config, is delivered as secret_text, so classification never selects a plaintext type. Effective names are limited to 64 bytes and must be unique ignoring case. When values is true, values must be UTF-8 and at most CloudflareValueLimit bytes. Invalid classifications, names, or checked values return an error.

func ValidateCompletion

func ValidateCompletion(completion Completion) error

func ValidateGitHubActionsManifest

func ValidateGitHubActionsManifest(prefix string, entries []ManifestEntry, values bool) error

ValidateGitHubActionsManifest applies GitHub's name and byte contract. Unlike Forgejo, GitHub permits FORGEJO_, GITEA_, and CI; only GITHUB_ is provider-reserved.

func ValidateGitLabManifest

func ValidateGitLabManifest(prefix string, entries []ManifestEntry, values bool) error

ValidateGitLabManifest applies GitLab's key and masking contract before any job is enqueued. Secret-classified values must be maskable: masking is never silently disabled. Refusals name the key and never the value.

func ValidateManifest

func ValidateManifest(prefix string, entries []ManifestEntry) error

ValidateManifest enforces byte-exact Forgejo delivery. Refusal names the key; no normalization or encoding changes application semantics silently.

func ValidateProviderManifest

func ValidateProviderManifest(provider, prefix string, entries []ManifestEntry, values bool) error

ValidateProviderManifest applies the named provider's manifest rules, returning an error for an unknown provider or invalid entries. The values flag enables value checks where the provider's validator supports them.

func ValidateSealedWebhookManifest

func ValidateSealedWebhookManifest(prefix string, entries []ManifestEntry, values bool) error

ValidateSealedWebhookManifest applies the sealed receiver protocol's name and value contract. Values travel as JSON strings inside the ciphertext, so they must be valid UTF-8 to be delivered byte-exactly.

func ValidateTargetManifest

func ValidateTargetManifest(provider string, destination Destination, prefix string, entries []ManifestEntry, values bool) error

ValidateTargetManifest is the destination-aware form of ValidateProviderManifest. Cloud secret managers derive effective names from the destination as well as the prefix, so they need the whole route.

func ValidateVaultKVManifest

func ValidateVaultKVManifest(prefix string, entries []ManifestEntry, values bool) error

ValidateVaultKVManifest applies the Vault/OpenBao KV v2 path contract. Every effective name becomes exactly one path segment under the target's path prefix, holding a single "value" field. Secret and config classifications share that one tree, so names must be unique across both surfaces ignoring case. Effective names are limited to 255 bytes. When values is true, values must be UTF-8 and at most VaultKVValueLimit bytes. Invalid classifications, names, or checked values return an error.

func VaultKVMapping

func VaultKVMapping(mount, pathPrefix, prefix string, entries []ManifestEntry) (string, error)

VaultKVMapping renders names only: the KV v2 path each canonical name is delivered to, for Vault Agent, External Secrets, or application wiring. Entries are sorted by canonical name without changing the input. Manifest name validation errors propagate; mount and pathPrefix must already be valid.

func WorkflowForProvider

func WorkflowForProvider(provider, prefix string, entries []ManifestEntry) (string, error)

WorkflowForProvider validates names and renders provider wiring: Cloudflare bindings, an empty string for sealed-webhook, or workflow mappings otherwise. Prefixing is provider wiring; applications continue to receive canonical names in every environment. Manifest validation errors propagate.

Types

type Access

type Access struct {
	Credential string
}

type ActivationLoader

type ActivationLoader interface {
	LoadActivation(context.Context, Job, Journal) (LoadedActivation, error)
}

type ActivationStore

type ActivationStore interface {
	Activate(context.Context, Job, Connection, time.Time) error
}

type Change

type Change struct {
	Surface       Surface
	EffectiveName string
	Disposition   Disposition
	// ObservedProviderVersion remains internal to plan/adoption custody. The
	// public API still carries only the opaque plan artifact and name selection.
	ObservedProviderVersion *int64
}

func PlanChanges

func PlanChanges(desired []DesiredRow, ledger map[LedgerKey]LedgerEntry, providerSecrets map[string]bool) []Change

type Claim

type Claim struct {
	Surface       Surface
	EffectiveName string
	KeyID         string
}

Claim is one provider name a target configuration will own.

func ClaimedNames

func ClaimedNames(provider string, destination Destination, prefix string, manifest []ManifestEntry) []Claim

ClaimedNames lists every provider name a target configuration owns, including management sentinels where the provider stores them as names. Stores use it to refuse two targets claiming one destination name.

type Classification

type Classification string
const (
	SecretClassification Classification = "secret"
	ConfigClassification Classification = "config"
)

type Completion

type Completion struct {
	Outcome        Outcome
	State          LedgerState
	ReleaseLedger  bool
	Conflict       bool
	Missing        bool
	ProviderStatus int
	Finding        string
}

type Config

type Config struct {
	Origin string
	// Provider transport options. Only GitLab accepts them today; every other
	// provider refuses a non-empty value so a pin is never silently ignored.
	// SPKIPin is base64(sha256(SubjectPublicKeyInfo)) and is checked after
	// normal chain verification. CABundlePEM adds trust anchors for a
	// self-hosted instance. AllowPersonalToken is the documented protected
	// opt-in for a broader personal access token.
	SPKIPin            string
	CABundlePEM        string
	AllowPersonalToken bool
}

func (Config) HasProviderOptions

func (c Config) HasProviderOptions() bool

HasProviderOptions reports whether any provider-specific transport option is set.

type Connection

type Connection struct {
	Version             string
	DestinationID       int64
	RepositoryID        int64
	CredentialExpiresAt time.Time
}

type ConnectionRequest

type ConnectionRequest struct {
	Config                  Config
	Destination             Destination
	Access                  Access
	Gate                    func(context.Context) error
	AllowEnvironmentCreate  bool
	BeforeEnvironmentCreate func(context.Context) error
	AfterEnvironmentCreate  func(context.Context, error) error
}

type DesiredRow

type DesiredRow struct {
	ManifestEntry
	Surface       Surface
	EffectiveName string
}

func AWSDesiredRows

func AWSDesiredRows(destination Destination, prefix string, manifest []ManifestEntry) ([]DesiredRow, error)

AWSDesiredRows maps a manifest onto the AWS secrets one target owns. In json-object mode the single row carries the encoded document and no key id.

func DesiredRows

func DesiredRows(prefix string, manifest []ManifestEntry, sentinels bool) []DesiredRow

type Destination

type Destination struct {
	Kind                  DestinationKind
	Owner                 string
	Name                  string
	Environment           string
	NumericID             int64
	RepositoryID          int64
	Visibility            string
	SelectedRepositoryIDs []int64
	// Scope is the GitLab environment_scope ("*" for every environment).
	// It is empty for every other provider.
	Scope string
}

type DestinationKind

type DestinationKind string
const (
	Repository   DestinationKind = "repository"
	Organization DestinationKind = "organization"
	Environment  DestinationKind = "environment"
	// JSONObject delivers the whole selected manifest as one AWS Secrets
	// Manager secret holding a canonical JSON object.
	JSONObject DestinationKind = "json-object"
	// PerKey delivers each selected key as its own AWS Secrets Manager secret.
	PerKey DestinationKind = "per-key"
	// WorkersScript is one Cloudflare Workers script: Owner is the account id,
	// Name the script name.
	WorkersScript DestinationKind = "workers-script"
	// PagesProject is one Cloudflare Pages project environment: Owner is the
	// account id, Name the project, Environment preview or production.
	PagesProject DestinationKind = "pages-project"
)

type Disposition

type Disposition string
const (
	Create   Disposition = "create"
	Update   Disposition = "update"
	Delete   Disposition = "delete"
	Conflict Disposition = "conflict"
	Unknown  Disposition = "unknown-until-sync"
)

type Effect

type Effect struct {
	Surface       Surface
	EffectiveName string
	Disposition   Disposition
	KeyID         string
	// RequireExplicitRecovery durably marks Vault custody uncertain BEFORE a
	// provider mutation. Process death cannot leave an Owned replay authority.
	RequireExplicitRecovery bool
	// InputRevision is worker-bound provenance for acknowledged progress. The
	// worker overrides module input with the admitted loaded source revision.
	InputRevision int64
}

type ErrorClass

type ErrorClass string

ErrorClass is the closed, bounded cause recorded on a target after a failed attempt. It never carries provider response bodies or names.

const (
	ErrorClassAuth              ErrorClass = "auth"
	ErrorClassNetwork           ErrorClass = "network"
	ErrorClassConflict          ErrorClass = "conflict"
	ErrorClassProviderLimit     ErrorClass = "provider_limit"
	ErrorClassProviderAmbiguous ErrorClass = "provider_ambiguous"
	ErrorClassRefused           ErrorClass = "refused"
)

func ClassifyError

func ClassifyError(err error) ErrorClass

ClassifyError folds any attempt error into the closed ErrorClass set. Errors the seam does not name are transport failures and classify as network.

func (ErrorClass) NeedsAttention

func (c ErrorClass) NeedsAttention() bool

NeedsAttention reports whether an error class means the destination now disagrees with Hikyo's ownership record in a way only an operator can settle: an unowned name in the way, or a destination whose identity moved.

type Job

type Job struct {
	ID                 string
	OrgID              string
	ProjectID          string
	EnvironmentID      string
	TargetID           string
	Kind               JobKind
	RouteMoveID        string
	AuthorityPrincipal string
	Generation         int64
	Attempt            int
	LeaseOwner         string
	CreatedAt          time.Time
}

type JobKind

type JobKind string
const (
	Converge JobKind = "converge"
	Scrub    JobKind = "scrub"
	Activate JobKind = "activate"
)

func JobKinds

func JobKinds() []JobKind

type JobStore

type JobStore interface {
	ClaimDue(context.Context, string, time.Time, time.Time) (Job, bool, error)
	Journal(Job) Journal
	Retry(ctx context.Context, job Job, due time.Time, revision int64, failed []Change, warnings []string, cause error) error
	Succeed(context.Context, Job, int64, []string, time.Time) error
	Fail(ctx context.Context, job Job, revision int64, at time.Time, cause error) error
}

JobStore is the durable half of the worker. Retry and Fail carry the revision the attempt loaded (0 when it never got that far) and the attempt's error, so the target records what was last attempted and why it failed.

type Journal

type Journal interface {
	Gate(ctx context.Context, effect Effect) error
	Reserve(ctx context.Context, effect Effect) (LedgerState, error)
	Prepare(ctx context.Context, effect Effect, prior LedgerState) error
	// Finish atomically writes the terminal OUTCOME, applies the final ledger
	// state or explicitly releases the ledger row, records any conflict artifact, and releases
	// the provider-write lease held since Prepare.
	Finish(ctx context.Context, effect Effect, completion Completion) error
	// Refuse atomically records a pre-dispatch conflict artifact and releases a
	// bare reservation. It writes no OUTCOME because no provider call began.
	Refuse(ctx context.Context, effect Effect) error
	// ReleaseReservation drops a bare, undispatched reservation that is no
	// longer desired. It records no conflict or OUTCOME and is fenced to the
	// exact current target generation.
	ReleaseReservation(ctx context.Context, effect Effect) error
}

Journal is the durable half of Sync. Prepare runs immediately before each external request and must atomically persist the ownership transition and INTENT. Complete atomically persists the OUTCOME and resulting ledger state. Gate re-authorizes the recorded authority and checks the target generation.

type LedgerEntry

type LedgerEntry struct {
	Surface       Surface
	EffectiveName string
	State         LedgerState
	// Missing records that Hikyo owns this name but the provider no longer has
	// it. This makes PATCH-404 -> POST crash safe without treating the retry as
	// an unowned capture attempt.
	Missing bool
	// AdoptionPending is durable explicit adoption evidence newer than every
	// successful provider write for this scoped name. Owned alone is not consent
	// to take over a path whose provider ownership markers disappeared.
	AdoptionPending bool
	// AdoptionVersion is the non-secret provider version observed by the fresh
	// plan artifact, never a value hash or a guessed write outcome.
	AdoptionVersion *int64
}

func Undesired

func Undesired(desired []DesiredRow, ledger map[LedgerKey]LedgerEntry) (reservations, prunes []LedgerEntry)

type LedgerKey

type LedgerKey struct {
	// contains filtered or unexported fields
}

func NewLedgerKey

func NewLedgerKey(surface Surface, name string) LedgerKey

type LedgerState

type LedgerState string
const (
	Reserved   LedgerState = "reserved"
	Dispatched LedgerState = "dispatched"
	Owned      LedgerState = "owned"
	Released   LedgerState = "released"
)

type LoadedActivation

type LoadedActivation struct {
	Module  Module
	Request ConnectionRequest
	Release func()
}

type LoadedSync

type LoadedSync struct {
	Module   Module
	Request  SyncRequest
	Revision int64
	Release  func()
}

type Loader

type Loader interface {
	Load(context.Context, Job, Journal) (LoadedSync, error)
}

Loader assembles plaintext only after the job has a durable lease and its recorded authority will be rechecked by Journal.Gate before each read/push. Release must zero/forget plaintext and credential buffers.

type ManifestEntry

type ManifestEntry struct {
	KeyID          string
	CanonicalName  string
	Classification Classification
	Value          string
}

func (ManifestEntry) Surface

func (m ManifestEntry) Surface() Surface

type Module

type Module interface {
	ValidateConfig(Config) error
	TestConnection(context.Context, ConnectionRequest) (Connection, error)
	Plan(context.Context, PlanRequest) (Plan, error)
	Sync(context.Context, SyncRequest, Journal) (SyncResult, error)
}

Module is the locked four-operation, in-process seam.

type ModuleFactory

type ModuleFactory func(Provider, Config, string) (*ModuleLease, error)

ModuleFactory is the shared worker/service construction seam.

type ModuleLease

type ModuleLease struct {
	Module Module
	// contains filtered or unexported fields
}

ModuleLease binds one constructed module to its idempotent cleanup.

func NewModuleLease

func NewModuleLease(module Module, release func()) (*ModuleLease, error)

NewModuleLease transfers module cleanup ownership to one release-once value.

func NewModuleLeaseWithContext

func NewModuleLeaseWithContext(module Module, release func(context.Context)) (*ModuleLease, error)

NewModuleLeaseWithContext transfers cleanup ownership without detaching provider work from the request or worker attempt that constructed it.

func (*ModuleLease) Release

func (l *ModuleLease) Release()

Release drops provider resources exactly once.

func (*ModuleLease) ReleaseContext

func (l *ModuleLease) ReleaseContext(ctx context.Context)

ReleaseContext drops resources exactly once, even when ctx is canceled. Context-aware provider cleanup may not revive canceled network work.

type Outcome

type Outcome string
const (
	OutcomeSuccess Outcome = "success"
	OutcomeFailure Outcome = "failure"
	OutcomeUnknown Outcome = "unknown"
)

type Plan

type Plan struct {
	Changes  []Change
	Warnings []string
}

type PlanRequest

type PlanRequest struct {
	Config   Config
	Target   Target
	Access   Access
	Manifest []ManifestEntry
	Ledger   []LedgerEntry
	Gate     func(context.Context) error
}

type Provider

type Provider string

Provider is the closed set of compiled-in deployment providers.

const (
	ForgejoProvider           Provider = "forgejo"
	GitHubActionsProvider     Provider = "github-actions"
	SealedWebhookProvider     Provider = "sealed-webhook"
	CloudflareProvider        Provider = "cloudflare"
	VaultKVProvider           Provider = "vault-kv"
	AWSSecretsManagerProvider Provider = "aws-secrets-manager"
	GitLabProvider            Provider = "gitlab"
)

func ParseProvider

func ParseProvider(raw string) (Provider, error)

ParseProvider rejects missing and unknown persisted provider identities. API defaults must resolve to an explicit provider before this boundary.

func SupportedProviders

func SupportedProviders() []Provider

SupportedProviders returns the complete compiled-in provider set.

type RetryAtError

type RetryAtError interface {
	error
	RetryAt() time.Time
}

RetryAtError lets a provider preserve an authoritative rate-limit deadline through the generic outbox boundary without retaining plaintext in memory.

type Source

type Source struct {
	OrgID         string
	ProjectID     string
	EnvironmentID string
	Revision      int64
}

Source identifies the published revision a sync job delivers.

type Surface

type Surface string
const (
	Secret   Surface = "secret"
	Variable Surface = "variable"
)

func MappedName

func MappedName(provider string, destination Destination, prefix string, entry ManifestEntry) (Surface, string)

MappedName is where one key lands on a target: the surface and the effective provider name. For a json-object target it is the JSON member inside the target's single secret.

type SyncRequest

type SyncRequest struct {
	Config   Config
	Target   Target
	Access   Access
	Manifest []ManifestEntry
	Ledger   []LedgerEntry
	// Teardown is explicit and fail-closed. Every ordinary sync desires both
	// sentinels; only a tombstoned target's scrub sets this true.
	Teardown bool
	// Completed names were durably finished earlier in this leased job before
	// an in-job provider-rate wait. Modules skip them when plaintext is reloaded.
	Completed []Change
	// JobID is the outbox job this attempt belongs to. It is identical across
	// every retry of one job, so a provider that supports request idempotency
	// tokens can replay an unknown outcome without writing twice.
	JobID string
	// Source pins the exact source scope and revision this job converges.
	// Providers that carry provenance on the wire (sealed-webhook) require it.
	Source Source
}

type SyncResult

type SyncResult struct {
	Changes   []Change
	Conflicts []Change
	Failed    []Change
	Warnings  []string
}

type Target

type Target struct {
	ID          string
	Environment string
	Destination Destination
	NamePrefix  string
	Generation  int64
	Options     VariableOptions
}

type TargetHealth

type TargetHealth string

TargetHealth is the closed operator-facing status of one sync target (#157). It is derived from the stored sync outcome, the pause flag, and the state of the target's active outbox job; it is never stored, so the stored outcome stays truthful across pause and resume.

const (
	HealthNever      TargetHealth = "never"
	HealthPending    TargetHealth = "pending"
	HealthConverging TargetHealth = "converging"
	HealthConverged  TargetHealth = "converged"
	HealthDegraded   TargetHealth = "degraded"
	HealthFailed     TargetHealth = "failed"
	HealthPaused     TargetHealth = "paused"
)

func DeriveHealth

func DeriveHealth(syncStatus string, paused, hasConverged bool, jobState string) TargetHealth

DeriveHealth maps the stored sync_status, the pause flag, whether a prior converge ever succeeded, and the active job's outbox state onto TargetHealth.

  • paused wins over everything: no push can happen while the flag is set.
  • converging with a queued (unclaimed) job is pending; a running job is converging.
  • failed with a prior converged revision is degraded: the destination still holds an older revision rather than nothing.

type VariableOptions

type VariableOptions struct {
	// Protected exposes managed variables only to protected branches and tags.
	Protected bool
	// Hidden creates secret-classified variables as masked and hidden.
	Hidden bool
	// Expand lets the provider expand $VARIABLE references inside values.
	// The default (false) delivers values byte-exactly as raw variables.
	Expand bool
}

VariableOptions are per-target delivery flags. Only GitLab accepts them. Secret-classified keys are always masked; masking cannot be switched off.

func (VariableOptions) IsZero

func (o VariableOptions) IsZero() bool

type Worker

type Worker struct {
	Store  JobStore
	Loader Loader
	ID     string
	Poll   time.Duration
	Now    func() time.Time
	Log    *slog.Logger
	Jitter func(time.Duration) time.Duration
	Wait   func(context.Context, time.Duration) error
}

func (*Worker) Run

func (w *Worker) Run(ctx context.Context)

func (*Worker) RunOnce

func (w *Worker) RunOnce(ctx context.Context) (bool, error)

Directories

Path Synopsis
Package awssm is the AWS Secrets Manager deployment adapter (#158).
Package awssm is the AWS Secrets Manager deployment adapter (#158).
awssmtest
Package awssmtest is an isolated, in-process AWS Secrets Manager and STS emulator for adapter tests.
Package awssmtest is an isolated, in-process AWS Secrets Manager and STS emulator for adapter tests.
Package cloudflare implements one-way synchronization into Cloudflare Workers secrets and Cloudflare Pages encrypted environment variables.
Package cloudflare implements one-way synchronization into Cloudflare Workers secrets and Cloudflare Pages encrypted environment variables.
Package forgejo is the Forgejo REST v1 reference deployment adapter.
Package forgejo is the Forgejo REST v1 reference deployment adapter.
Package githubactions implements the GitHub Actions deployment adapter.
Package githubactions implements the GitHub Actions deployment adapter.
Package gitlab implements the GitLab CI/CD variable deployment adapter.
Package gitlab implements the GitLab CI/CD variable deployment adapter.
Package sealedwebhook is the generic HTTPS push adapter.
Package sealedwebhook is the generic HTTPS push adapter.
Package vaultkv is the one-way Vault/OpenBao KV v2 synchronization adapter.
Package vaultkv is the one-way Vault/OpenBao KV v2 synchronization adapter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL