onepassword

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package onepassword resolves secret.KindOnePassword refs via the official 1Password Go SDK and a service-account token. Fetch-only: plaintext is held in memory, never written to Postgres.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceAccountToken string
	IntegrationName     string
	IntegrationVersion  string
}

Config holds service-account credentials for fetch-only resolution.

func ConfigFromEnv

func ConfigFromEnv() (Config, bool)

ConfigFromEnv reads OP_SERVICE_ACCOUNT_TOKEN. The second return value is false when the token is unset or empty.

type Resolver

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

Resolver fetches secrets from 1Password (KindOnePassword only).

func New

func New(cfg Config) *Resolver

New returns a Resolver for secret.KindOnePassword refs.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, ref secret.Ref) ([]byte, error)

Resolve returns the plaintext value for ref.Path = "op://<vault>/<item>/<field>".

Jump to

Keyboard shortcuts

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