backend

package
v0.0.0-...-7f7f88d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Publish() error
	Test() bool
	Migrate([]byte, []byte, string) error
	GetType() TLSBackendType
	CreateTraefikMiddleWare(*v1alpha1.Middleware) error
	// contains filtered or unexported methods
}

func NewBackend

func NewBackend(backendType TLSBackendType, cfg BackendConfig) (Backend, error)

func NewHashiVaultBackend

func NewHashiVaultBackend(config BackendConfig) (Backend, error)

func NewK8sBackend

func NewK8sBackend(config BackendConfig) (Backend, error)

func NewLocalBackend

func NewLocalBackend(config BackendConfig) (Backend, error)

type BackendConfig

type BackendConfig struct {
	LocalDir       *string
	K8sClusterName *string
	K8sProvider    *K8sProvider
	ProjectID      *string
	DestNameSpace  *string
}

type HashiVaultBackend

type HashiVaultBackend struct {
	Type  TLSBackendType
	Token string
}

func (HashiVaultBackend) CreateTraefikMiddleWare

func (h HashiVaultBackend) CreateTraefikMiddleWare(middleware *v1alpha1.Middleware) error

func (HashiVaultBackend) GetType

func (h HashiVaultBackend) GetType() TLSBackendType

func (HashiVaultBackend) Migrate

func (h HashiVaultBackend) Migrate(cert, key []byte, certName string) error

func (HashiVaultBackend) Publish

func (h HashiVaultBackend) Publish() error

func (HashiVaultBackend) Test

func (h HashiVaultBackend) Test() bool

type K8sProvider

type K8sProvider string
const (
	ProviderGCP           K8sProvider = "gcp"
	ProviderDockerDesktop K8sProvider = "docker-desktop"
	ProviderAWS           K8sProvider = "aws"
	ProviderAzure         K8sProvider = "azure"
)

func (K8sProvider) IsValid

func (p K8sProvider) IsValid() bool

type K8sSecret

type K8sSecret v1.Secret

type KubernetesBackend

type KubernetesBackend struct {
	Type        TLSBackendType
	NameSpace   string
	K8sContext  string
	ProjectID   string
	K8sProvider K8sProvider
	ClusterName string
	// contains filtered or unexported fields
}

func (KubernetesBackend) CreateTraefikMiddleWare

func (k KubernetesBackend) CreateTraefikMiddleWare(middleware *v1alpha1.Middleware) error

func (KubernetesBackend) GetType

func (h KubernetesBackend) GetType() TLSBackendType

func (KubernetesBackend) Migrate

func (k KubernetesBackend) Migrate(cert, key []byte, secretName string) error

func (KubernetesBackend) Publish

func (k KubernetesBackend) Publish() error

func (KubernetesBackend) Test

func (k KubernetesBackend) Test() bool

type LocalBackend

type LocalBackend struct {
	Type           TLSBackendType
	DestinationDir string
}

func (LocalBackend) CreateTraefikMiddleWare

func (l LocalBackend) CreateTraefikMiddleWare(middleware *v1alpha1.Middleware) error

func (LocalBackend) GetType

func (l LocalBackend) GetType() TLSBackendType

func (LocalBackend) Migrate

func (l LocalBackend) Migrate(cert, key []byte, certName string) error

func (LocalBackend) Publish

func (l LocalBackend) Publish() error

func (LocalBackend) Test

func (l LocalBackend) Test() bool

type TLSBackendType

type TLSBackendType string
const (
	Backendkubernetes TLSBackendType = "kubernetes"
	BackendRedis      TLSBackendType = "redis"
	BackendHashiVault TLSBackendType = "hashivault"
	BackendLocal      TLSBackendType = "local"
)

Jump to

Keyboard shortcuts

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