Documentation
¶
Overview ¶
Package loader implements a generic way to load / generate kubeconfig files from different sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendConfig ¶
type BackendConfig interface {
Yaml(unsafe bool) ([]byte, error) // returns the sanitized loader config as yaml
Sanitize() BackendConfig // returns the sanitized loader config
}
type FileBackend ¶
type FileBackend struct {
// contains filtered or unexported fields
}
func NewFileBackend ¶
func NewFileBackend(path string, decryptKey string) *FileBackend
func NewFileBackendFromConfig ¶
func NewFileBackendFromConfig(config *FileConfig) *FileBackend
func NewFileBackendFromParams ¶
func NewFileBackendFromParams(params map[string]interface{}) (*FileBackend, error)
func (*FileBackend) Config ¶
func (b *FileBackend) Config() BackendConfig
func (*FileBackend) Load ¶
func (b *FileBackend) Load() ([]byte, error)
func (*FileBackend) Type ¶
func (b *FileBackend) Type() string
type FileConfig ¶
func (*FileConfig) Sanitize ¶
func (c *FileConfig) Sanitize() BackendConfig
type Loader ¶
type Loader interface {
Load() ([]byte, error) // loads the config from the source
Type() string // returns the loader backend type
Config() BackendConfig // returns the backend config of the loader
}
Loader defines the loader interface
type S3Backend ¶
type S3Backend struct {
Downloader s3manageriface.DownloaderAPI
// contains filtered or unexported fields
}
func NewS3Backend ¶
func NewS3BackendFromConfig ¶
func NewS3BackendFromParams ¶
func (*S3Backend) Config ¶
func (b *S3Backend) Config() BackendConfig
type S3Config ¶
type S3Config struct {
AccessKey string `json:"accesskey"`
SecretKey string `json:"secretkey"`
Region string `json:"region"`
Server string `json:"server"`
DecryptKey string `json:"decrypt_key"`
Bucket string `json:"bucket"`
Path string `json:"path"`
}
func (*S3Config) Sanitize ¶
func (c *S3Config) Sanitize() BackendConfig
Click to show internal directories.
Click to hide internal directories.