provider

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package provider defines the interface and registry for secret providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns all registered provider kinds

func Register

func Register(kind string, factory func() Provider)

Register registers a provider factory function

Types

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

KeyValue represents a secret key-value pair

type Provider

type Provider interface {
	// Name returns the name of the provider
	Name() string

	// Fetch fetches secrets from the provider based on the configuration
	// config contains provider-specific configuration fields (e.g., path, region, endpoint, etc.)
	Fetch(ctx context.Context, mapID string, config map[string]interface{}, keys map[string]string) ([]KeyValue, error)
}

Provider is the interface that all secret providers must implement

func New

func New(kind string) (Provider, error)

New creates a new provider instance by kind

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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