Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultTCLabels() map[string]string
- func DefaultTCName(name string) string
- func GetHost(container tc.Container) (string, error)
- func Load[X any](t *testing.T) (*X, error)
- func MapTheSamePort(port string) nat.PortMap
- func NewLokiStreamer() error
- func RenderTemplate(tmpl string, data interface{}) (string, error)
- func Store[T any](cfg *T) error
- func UseCache() bool
- type AWSSecret
- type AWSSecretsManager
- type Config
- type ValidationError
Constants ¶
View Source
const ( EnvVarTestConfigs = "CTF_CONFIGS" EnvVarLokiStream = "CTF_LOKI_STREAM" EnvVarAWSSecretsManager = "CTF_AWS_SECRETS_MANAGER" // EnvVarCI this is a default env variable many CI runners use so code can detect we run in CI EnvVarCI = "CI" )
View Source
const ( OutputFieldNameTOML = "out" OutputFieldName = "Out" OverridesFieldName = "Overrides" )
View Source
const (
DefaultConfigDir = "."
)
View Source
const (
EnvVarLogLevel = "CTF_LOG_LEVEL"
)
Variables ¶
View Source
var ( // Secrets is a singleton AWS Secrets Manager // Loaded once on start inside Load and is safe to call concurrently Secrets *AWSSecretsManager DefaultNetworkName string AllowedEmptyConfigurationFields = []string{OutputFieldName, OverridesFieldName} )
View Source
var (
L zerolog.Logger
)
View Source
var (
PathRoot = filepath.Join(filepath.Dir(b), ".")
)
Functions ¶
func DefaultTCLabels ¶
func DefaultTCName ¶
func MapTheSamePort ¶
func NewLokiStreamer ¶
func NewLokiStreamer() error
func RenderTemplate ¶
Types ¶
type AWSSecret ¶
type AWSSecret string
AWSSecret is a wrapper preventing accidental printing or marshalling
func (AWSSecret) GoString ¶
The GoString method is used to print values passed as an operand to a %#v format.
func (AWSSecret) MarshalJSON ¶
MarshalJSON Marshaler is the interface implemented by types that can marshal themselves into valid JSON.
func (AWSSecret) MarshalText ¶
MarshalText encodes the receiver into UTF-8-encoded text and returns the result.
type AWSSecretsManager ¶
type AWSSecretsManager struct { Client *secretsmanager.Client RequestTimeout time.Duration // contains filtered or unexported fields }
AWSSecretsManager is an AWS Secrets Manager service wrapper
func NewAWSSecretsManager ¶
func NewAWSSecretsManager(requestTimeout time.Duration) (*AWSSecretsManager, error)
NewAWSSecretsManager create a new connection to AWS Secrets Manager
func (*AWSSecretsManager) CreateSecret ¶
func (sm *AWSSecretsManager) CreateSecret(key string, val string, override bool) error
CreateSecret creates a specific secret by key
func (*AWSSecretsManager) GetSecret ¶
func (sm *AWSSecretsManager) GetSecret(key string) (AWSSecret, error)
GetSecret gets a specific secret by key
func (*AWSSecretsManager) RemoveSecret ¶
func (sm *AWSSecretsManager) RemoveSecret(key string, noRecovery bool) error
RemoveSecret removes a specific secret by key
type ValidationError ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.