secrets

package
v3.111.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Provides internal functionality for fetching and processing secrets from the Buildkite API during job execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	GetSecret(ctx context.Context, req *api.GetSecretRequest) (*api.Secret, *api.Response, error)
}

APIClient interface defines only the method needed by the secrets manager to fetch secrets from the Buildkite API.

type Secret

type Secret struct {
	Key   string
	Value string
}

Secret represents a fetched secret with its key and value.

func FetchSecrets

func FetchSecrets(ctx context.Context, client APIClient, jobID string, keys []string, concurrency int) ([]Secret, []error)

FetchSecrets retrieves all secret values from the API sequentially. If any secret fails, returns error with details of all failed secrets.

type SecretError

type SecretError struct {
	Key string
	Err error
}

func (*SecretError) Error

func (e *SecretError) Error() string

func (*SecretError) Unwrap

func (e *SecretError) Unwrap() error

Jump to

Keyboard shortcuts

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