io

package
v1.3.1036 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigReader

type ConfigReader interface {
	Read() (*auth.Config, error)
}

ConfigReader interface for reading auth configuration

func NewEnvConfigReader

func NewEnvConfigReader(envPrefix string, serverRetriever ServerRetrieverFn) ConfigReader

NewEnvConfigReader creates a new environment config reader

func NewFileConfigReader

func NewFileConfigReader(filename string) ConfigReader

NewFileConfigReader creates a new file config reader

func NewKubeSecretsConfigReader

func NewKubeSecretsConfigReader(client kubernetes.Interface, namespace string,
	serverKind auth.ServerKind, serviceKind auth.ServiceKind) ConfigReader

NewKubeSecretsConfigReader creates a new Kubernetes config reader

type ConfigStore

type ConfigStore interface {
	// Write saves some secret data to the store
	Write(name string, bytes []byte) error

	// Read reads some secret data from the store
	Read(name string) ([]byte, error)

	// WriteObject writes a named object to the store
	WriteObject(name string, object interface{}) error

	// ReadObject reads an object from the store
	ReadObject(name string, object interface{}) error
}

ConfigStore provides an interface for storing configs

func NewFileStore

func NewFileStore() ConfigStore

NewFileStore creates a ConfigStore that stores its data to the filesystem

func NewVaultStore

func NewVaultStore(client vault.Client, path string) ConfigStore

NewVaultStore creates a new store which stores its data in Vault

type ConfigWriter

type ConfigWriter interface {
	Write(config *auth.Config) error
}

ConfigWriter interface for writing auth configuration

func NewFileConfigWriter

func NewFileConfigWriter(filename string) ConfigWriter

NewFileConfigWriter creates a new file config writer

func NewKubeSecretsConfigWriter

func NewKubeSecretsConfigWriter(client kubernetes.Interface, namespace string) ConfigWriter

NewKubeSecretsConfigWriter creates a new Kubernetes secrets config writer

type EnvConfigReader

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

EnvConfigReader keeps the prefix of the env variables where the user auth config is stored and also a server config retriever

func (*EnvConfigReader) Read

func (e *EnvConfigReader) Read() (*auth.Config, error)

Read reads the configuration from environment

type FileConfigReader

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

FileConfigReader keeps the path to the configration file

func (*FileConfigReader) Read

func (f *FileConfigReader) Read() (*auth.Config, error)

Read reads the configuration from a file

type FileConfigWriter

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

FileConfigWriter file config write which keeps the path to the configuration file

func (*FileConfigWriter) Write

func (f *FileConfigWriter) Write(config *auth.Config) error

Write writes the auth configuration into a file

type KubeSecretsConfigReader

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

KubeSecretsConfigReader config reader for Kubernetes secrets

func (*KubeSecretsConfigReader) Read

func (k *KubeSecretsConfigReader) Read() (*auth.Config, error)

Read reads the config from Kuberntes secrets

type KubeSecretsConfigWriter

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

KubeSecretsConfigWriter config writer into Kubernetes secrets

func (*KubeSecretsConfigWriter) Write

func (k *KubeSecretsConfigWriter) Write(config *auth.Config) error

Write write the config into Kuberntes secrets, it will one secret per server configuration

type ServerRetrieverFn

type ServerRetrieverFn func() (name string, url string,
	kind auth.ServerKind, serviceKind auth.ServiceKind)

ServerRetrieverFn retrives the server config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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