Help us shape the future of Go! Take the 2026 Go Developer Survey

secrets

package
v0.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomSecret

func GenerateRandomSecret(length int, characterSet string) (string, error)

GenerateRandomSecret generates a random secret with the specified length and character set. If the length is less than 1, a default value of 54 will be used. If the character set is empty, a default value of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%^&*_-=+" will be used.

func GetOrCreateSecret

func GetOrCreateSecret(secrets map[string]*corev1.Secret, req router.Request, appInstance *v1.AppInstance, secretName string) (*corev1.Secret, error)

func HasUnescapedDot added in v0.10.1

func HasUnescapedDot(s string) bool

HasUnescapedDot checks if a string contains an unescaped dot (i.e., a dot not escaped by a backslash).

Types

type ErrInterpolation

type ErrInterpolation struct {
	v1.ExpressionError
}

func (*ErrInterpolation) Error

func (e *ErrInterpolation) Error() string

type Interpolator

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

func NewInterpolator

func NewInterpolator(ctx context.Context, c kclient.Client, app *v1.AppInstance) *Interpolator

func (*Interpolator) AddError

func (i *Interpolator) AddError(err error)

func (*Interpolator) AddMissingAnnotations

func (i *Interpolator) AddMissingAnnotations(stopped bool, annotations map[string]string)

func (*Interpolator) Err

func (i *Interpolator) Err() error

func (*Interpolator) ForContainer

func (i *Interpolator) ForContainer(containerName string) *Interpolator

func (*Interpolator) ForFunction added in v0.10.0

func (i *Interpolator) ForFunction(functionName string) *Interpolator

func (*Interpolator) ForJob

func (i *Interpolator) ForJob(jobName string) *Interpolator

func (*Interpolator) ForService

func (i *Interpolator) ForService(serviceName string) *Interpolator

func (*Interpolator) GetAccountID

func (i *Interpolator) GetAccountID() (string, error)

func (*Interpolator) GetProjectName

func (i *Interpolator) GetProjectName() (string, error)

func (*Interpolator) GetRegion added in v0.10.0

func (i *Interpolator) GetRegion() (string, error)

func (*Interpolator) Incomplete

func (i *Interpolator) Incomplete() bool

func (*Interpolator) Objects

func (i *Interpolator) Objects() []kclient.Object

func (*Interpolator) Replace

func (i *Interpolator) Replace(content string) (string, error)

func (*Interpolator) SecretName

func (i *Interpolator) SecretName() string

func (*Interpolator) ToEnv

func (i *Interpolator) ToEnv(key, value string) (corev1.EnvVar, bool)

func (*Interpolator) ToVolumeMount

func (i *Interpolator) ToVolumeMount(filename string, file v1.File) corev1.VolumeMount

Jump to

Keyboard shortcuts

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