randomkeys

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 6

README

CircleCI

random keys

utilities to work with random keys created by kubernetesd.

License

randomkeys is under the Apache 2.0 license. See the LICENSE file for details.

Documentation

Index

Constants

View Source
const (
	SecretNamespace = "default"
)

Variables

View Source
var AllKeys = []Key{
	EncryptionKey,
}

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

func IsInvalidSecret

func IsInvalidSecret(err error) bool

func IsTimeout

func IsTimeout(err error) bool

func IsWrongType

func IsWrongType(err error) bool

func K8sLabels

func K8sLabels(clusterID string, key Key) map[string]string

K8sLabels returns labels for the Kubernetes object for the certificate name and the key.

func K8sName

func K8sName(clusterID string, key Key) string

K8sName returns Kubernetes object name for the certificate name and the key.

Types

type Cluster

type Cluster struct {
	APIServerEncryptionKey RandomKey
}

type Config

type Config struct {
	K8sClient kubernetes.Interface
	Logger    micrologger.Logger
}

type Interface

type Interface interface {
	SearchCluster(clusterID string) (Cluster, error)
}

type Key

type Key string
const (
	EncryptionKey Key = "encryption"
)

func (Key) String

func (k Key) String() string

type RandomKey

type RandomKey []byte

type Searcher

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

func NewSearcher

func NewSearcher(config Config) (*Searcher, error)

func (*Searcher) SearchCluster

func (s *Searcher) SearchCluster(clusterID string) (Cluster, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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