extensionenv

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package extensionenv defines the persistence boundary for extension environment bindings.

Index

Constants

View Source
const BindingKind = "extension_env"

BindingKind identifies Vault entries owned by extension environment bindings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	ExtensionName string
	// ProfileID is empty only for the user layer.
	ProfileID   string
	WorkspaceID string
	EnvName     string
	SecretRef   string
	// InputID is empty for requires_env bindings.
	InputID string
	// Inactive rows are retained for updates.
	Inactive   bool
	MCPServer  string
	HeaderName string
	Kind       string
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

Binding is one extension-instance environment binding.

type LifecycleStore

type LifecycleStore interface {
	Store
	DeleteEnvBindings(ctx context.Context, extension, profileID, workspaceID string) error
	CountEnvBindingsBySecretRef(ctx context.Context, secretRef string) (int64, error)
}

LifecycleStore adds cleanup and owned-reference usage checks.

type Store

type Store interface {
	ListEnvBindings(ctx context.Context, extension, profileID, workspaceID string) ([]Binding, error)
	ResolveEnvBindings(ctx context.Context, extension, profileID, workspaceID string) ([]Binding, error)
	PutEnvBinding(ctx context.Context, binding Binding) error
	DeleteEnvBinding(ctx context.Context, extension, profileID, workspaceID, envName string) error
}

Store persists extension-instance environment bindings. An empty profileID selects the user layer. List and delete methods address one exact (profileID, workspaceID) cell. ResolveEnvBindings merges effective values in profile-workspace, profile-user, user-workspace, then user-user precedence.

Jump to

Keyboard shortcuts

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