server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveEnvLines

func ResolveEnvLines(ctx context.Context, app *AppState, lines []string) ([]string, []error)

ResolveEnvLines processes KEY=VALUE lines and replaces values of the form keepass(vault|title) and user(title) with resolved passwords. Bracketed vaults may contain at most one nested expression. When a nested expression is present, its resolved value is passed to the upper-level KP resolver via the context (not by mutating the vault string).

func RunDaemon

func RunDaemon()

func RunTray

func RunTray(app *AppState)

Types

type AWSResolver

type AWSResolver interface {
	ResolveSecret(ctx context.Context, secretID, field string) (string, error)
	ResolveParameter(ctx context.Context, name, field string) (string, error)
}

type AppState

type AppState struct {
	KP          KPResolver
	USER        UserResolver
	WINCRED     WincredResolver
	AWS         AWSResolver
	AZKV        AzureResolver
	GCPSM       GCPResolver
	KEYCHAIN    KeychainResolver
	VAULT       VaultResolver
	ONEPASSWORD OnePasswordResolver
	UnlockTTL   utils.AtomicDuration
	ShouldExit  utils.AtomicBool

	Server *DaemonServer
}

func NewAppState

func NewAppState() *AppState

type AzureResolver added in v1.1.0

type AzureResolver interface {
	ResolveSecret(ctx context.Context, ref, field string) (string, error)
}

type DaemonServer

type DaemonServer struct {
	App  *AppState
	Port int
	// contains filtered or unexported fields
}

func NewDaemonServer

func NewDaemonServer(app *AppState, token string) (*DaemonServer, error)

func (*DaemonServer) Serve

func (ds *DaemonServer) Serve() error

func (*DaemonServer) Shutdown

func (ds *DaemonServer) Shutdown(ctx context.Context) error

type GCPResolver added in v1.1.0

type GCPResolver interface {
	ResolveSecret(ctx context.Context, ref, field string) (string, error)
}

type KPResolver

type KPResolver interface {
	SetUnlockTTL(unlockTTL *utils.AtomicDuration)
	LoadAliases() error
	LoadKeyfiles() error
	ResolvePassword(ctx context.Context, vault, title string, master string, ttl time.Duration, resolve func(expr string) (string, error)) (string, error)
}

type KeychainResolver added in v1.1.0

type KeychainResolver interface {
	Resolve(ctx context.Context, service, account string) (string, error)
}

type OnePasswordResolver added in v1.1.0

type OnePasswordResolver interface {
	ResolveSecret(ctx context.Context, ref, field string) (string, error)
}

type UserResolver

type UserResolver interface {
	SetUnlockTTL(unlockTTL *utils.AtomicDuration)
	ResolvePassword(ctx context.Context, title string, ttl time.Duration) (string, error)
}

type VaultResolver added in v1.1.0

type VaultResolver interface {
	ResolveSecret(ctx context.Context, path, field string) (string, error)
}

type WincredResolver

type WincredResolver interface {
	Resolve(ctx context.Context, target, field string) (string, error)
}

Jump to

Keyboard shortcuts

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