secrets

package
v0.0.0-...-4710560 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EmptySMType = ""
View Source
const GCPSMType = "GCP"
View Source
const UnixSMType = "unix"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSecrets

type ClientSecrets struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type Config

type Config struct {
	Type SMType
	GCP  *GCPSMConfig
	UNIX *UnixSMConfig
}

type EmptySecretManager

type EmptySecretManager struct{}

A secret manager that always returns empty string.

func NewEmptySecretManager

func NewEmptySecretManager() *EmptySecretManager

func (*EmptySecretManager) OAuth2ClientID

func (sm *EmptySecretManager) OAuth2ClientID() string

func (*EmptySecretManager) OAuth2ClientSecret

func (sm *EmptySecretManager) OAuth2ClientSecret() string

type FromFileSecretManager

type FromFileSecretManager struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

A secret manager that reads secrets from a file in JSON format.

func NewFromFileSecretManager

func NewFromFileSecretManager(path string) (*FromFileSecretManager, error)

func (*FromFileSecretManager) OAuth2ClientID

func (sm *FromFileSecretManager) OAuth2ClientID() string

func (*FromFileSecretManager) OAuth2ClientSecret

func (sm *FromFileSecretManager) OAuth2ClientSecret() string

type GCPSMConfig

type GCPSMConfig struct {
	OAuth2ClientResourceID string
}

type GCPSecretManager

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

func NewGCPSecretManager

func NewGCPSecretManager(config *GCPSMConfig) (*GCPSecretManager, error)

func (*GCPSecretManager) OAuth2ClientID

func (s *GCPSecretManager) OAuth2ClientID() string

func (*GCPSecretManager) OAuth2ClientSecret

func (s *GCPSecretManager) OAuth2ClientSecret() string

type SMType

type SMType string

type SecretManager

type SecretManager interface {
	OAuth2ClientID() string
	OAuth2ClientSecret() string
}

type UnixSMConfig

type UnixSMConfig struct {
	SecretFilePath string
}

Jump to

Keyboard shortcuts

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