secrets

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitwardenConfig

type BitwardenConfig struct {
	ApiURL      string `name:"api-url" help:"API URL" env:"API_URL" default:"https://vault.bitwarden.com/api"`
	IdentityURL string `name:"identity-url" help:"Identity URL" env:"IDENTITY_URL" default:"https://vault.bitwarden.com/identity"`
	AccessToken string `name:"access-token" help:"Access token" env:"ACCESS_TOKEN"`
	OrgID       string `name:"organization-id" help:"Organization ID" env:"ORGANIZATION_ID"`
	ProjectID   string `name:"project-id" help:"Project ID" env:"PROJECT_ID"`
}

type Client

type Client interface {
	Get(id string) (string, error)
	FetchAll() ([]Secret, error)
	Close()
}

func New

func New(ctx context.Context, cfg Config) (Client, error)

New creates a secrets client based on the provider type. Returns nil, nil when no provider is configured.

func NewBitwardenClient

func NewBitwardenClient(cfg BitwardenConfig) (Client, error)

func NewInfisicalClient

func NewInfisicalClient(ctx context.Context, cfg InfisicalConfig) (Client, error)

type Config

type Config struct {
	Provider string `` /* 149-byte string literal not displayed */

	Bitwarden BitwardenConfig `embed:"" prefix:"bitwarden-" envprefix:"BITWARDEN_" group:"Bitwarden Options:"`
	Infisical InfisicalConfig `embed:"" prefix:"infisical-" envprefix:"INFISICAL_" group:"Infisical Options:"`
}

type InfisicalConfig

type InfisicalConfig struct {
	SiteUrl      string `name:"site-url" help:"Site URL" env:"SITE_URL" default:"https://app.infisical.com"`
	ClientID     string `name:"client-id" help:"Client ID (Universal Auth)" env:"CLIENT_ID"`
	ClientSecret string `name:"client-secret" help:"Client Secret (Universal Auth)" env:"CLIENT_SECRET"`
	Environment  string `name:"environment" help:"Environment slug" env:"ENVIRONMENT"`
	ProjectID    string `name:"project-id" help:"Project ID" env:"PROJECT_ID"`
	SecretPath   string `name:"secret-path" help:"Secret path (comma-separated for multiple paths)" env:"SECRET_PATH" default:"/"`
}

type Secret

type Secret struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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