config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStringForSecrets

func ConvertStringForSecrets(filepath string, forward bool) string

func IsValidPostgressDatasource

func IsValidPostgressDatasource(datasourceStr string) bool

func ValidCryptoInput

func ValidCryptoInput(certFile, keyFile string) error

Types

type Config

type Config struct {
	ServerConfig *v1.ServerConfig
	HomeDir      string
	MountPath    string
	Update       bool
	SqlitePath   string
	// contains filtered or unexported fields
}

func ReadFrom

func ReadFrom(from *[]byte) (*Config, error)

func (*Config) CAMountPath

func (c *Config) CAMountPath()

func (*Config) DBMountPath

func (c *Config) DBMountPath()

func (*Config) EnsureDirAndWriteFile

func (c *Config) EnsureDirAndWriteFile(location string, data []byte) error

func (*Config) GetHomeDir

func (c *Config) GetHomeDir() string

func (*Config) GetServerConfig

func (c *Config) GetServerConfig() *v1.ServerConfig

func (*Config) GetSigningKey

func (c *Config) GetSigningKey(path string) ([]byte, error)

GetSigningKey applies to non-hsm use cases where the key exists on the filesystem. The filesystem is read and then key is then stored in a kubernetes secret.

func (*Config) GetTLSCrypto

func (c *Config) GetTLSCrypto() map[string][]byte

func (*Config) HandleCertInput

func (c *Config) HandleCertInput(input, location string, store map[string][]byte) error

func (*Config) HandleKeyInput

func (c *Config) HandleKeyInput(input, location string, store map[string][]byte) error

func (*Config) IntermediateMountPath

func (c *Config) IntermediateMountPath()

func (*Config) OperationsMountPath

func (c *Config) OperationsMountPath()

func (*Config) ParseCABlock

func (c *Config) ParseCABlock() (map[string][]byte, error)

func (*Config) ParseDBBlock

func (c *Config) ParseDBBlock() (map[string][]byte, error)

func (*Config) ParseIntermediateBlock

func (c *Config) ParseIntermediateBlock() (map[string][]byte, error)

func (*Config) ParseOperationsBlock

func (c *Config) ParseOperationsBlock() (map[string][]byte, error)

func (*Config) ParseTLSBlock

func (c *Config) ParseTLSBlock() (map[string][]byte, error)

func (*Config) SetMountPaths

func (c *Config) SetMountPaths(caType Type)

func (*Config) SetServerConfig

func (c *Config) SetServerConfig(cfg *v1.ServerConfig)

func (*Config) SetUpdate

func (c *Config) SetUpdate(update bool)

func (*Config) StoreInMap

func (c *Config) StoreInMap(data []byte, location string, store map[string][]byte) error

func (*Config) TLSMountPath

func (c *Config) TLSMountPath()

func (*Config) UsingPKCS11

func (c *Config) UsingPKCS11() bool

type DBType

type DBType string
var (
	SQLLite  DBType = "sqlite3"
	Postgres DBType = "postgres"
	MySQL    DBType = "mysql"
)

type InputType

type InputType string
var (
	File   InputType = "File"
	Pem    InputType = "Pem"
	Base64 InputType = "Base64"
	Bccsp  InputType = "Bccsp"
)

func GetInputType

func GetInputType(input string) InputType

type Type

type Type string
const (
	EnrollmentCA Type = "enrollment"
	TLSCA        Type = "tls"
)

func (Type) Is

func (t Type) Is(typ Type) bool

Jump to

Keyboard shortcuts

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