secretsmanager

package
v0.0.0-...-5c2f431 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentVersionStage = "AWSCURRENT"

CurrentVersionStage is AWS' hardcoded label that always indicates the "current" stage version

Variables

This section is empty.

Functions

This section is empty.

Types

type SM

type SM struct {
	Client   *secretsmanager.Client
	SecretID string
	Hostname string
	TeamID   string
}

func NewWithConfig

func NewWithConfig(ctx context.Context, sdkConfig aws.Config) (*SM, error)

NewWithConfig create a new secrets manager client and initialize it with values from the ENV and the secret

func (SM) GetSecretValue

func (sm SM) GetSecretValue(ctx context.Context) (*TFECredentialsSecret, error)

func (SM) UpdateSecretValue

func (sm SM) UpdateSecretValue(ctx context.Context, token string) error

type SecretsManager

type SecretsManager interface {
	GetSecretValue(ctx context.Context) (*TFECredentialsSecret, error)
	UpdateSecretValue(ctx context.Context, secretValue string) error
}

type TFECredentialsSecret

type TFECredentialsSecret struct {
	Hostname string `json:"hostname"`
	TeamId   string `json:"id"`
	Token    string `json:"token"`
}

Jump to

Keyboard shortcuts

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