Help us shape the future of Go! Take the 2026 Go Developer Survey

secret

package
v0.22.0 Latest Latest
Warning

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

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

Documentation

Overview

Package secret is the function-facing secret service (ADR-0249): it answers the local API's /secret routes with the keys and values of the Secrets a Function binds, resolved through the same PDP-checked resolver the reconciler uses, on every read and with no cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Store    store.Store
	Resolver Resolver
}

Deps carries what the Facade needs.

type Facade

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

Facade implements local.Secrets.

func NewFacade

func NewFacade(d Deps) (*Facade, error)

NewFacade builds the Facade; both deps are required.

func (*Facade) Get

func (f *Facade) Get(ctx context.Context, ns v1.NamespaceName, fn v1.ObjectName, key string) (string, bool, error)

Get returns key's value among the Secrets fn binds, or found false when none holds it.

func (*Facade) List

func (f *Facade) List(ctx context.Context, ns v1.NamespaceName, fn v1.ObjectName) ([]string, error)

List returns the sorted keys of the Secrets fn binds, an empty list when none (never nil, so the route answers {"keys": []}).

type Resolver

type Resolver interface {
	ResolveEnv(ctx context.Context, id auth.Identity, ns v1.NamespaceName, names []string) (map[string]string, error)
}

Resolver resolves Secret names into one key-value map for id (ADR-0057); *secrets.Resolver satisfies it.

Jump to

Keyboard shortcuts

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