fixtures

package
v0.0.0-...-f01516d Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package fixtures provides convenience test fixtures shared by other packages of secret-volume.

Index

Constants

This section is empty.

Variables

View Source
var TestVolume = &api.Volume{
	ID:      "hash",
	Source:  api.TalosSecretSource,
	Tags:    url.Values{"tag": []string{"awesome"}},
	KeyPair: api.KeyPair{},
}

TestVolume is a volume fixture

View Source
var TestVolumes = api.Volumes{TestVolume}

TestVolumes is a slice of volume fixtures

Functions

func NewBoringSecrets

func NewBoringSecrets(v *api.Volume) api.Secrets

NewBoringSecrets returns a very boring secrets fixture

func PredictableLoadBalancerFor

func PredictableLoadBalancerFor(addr string) (lb.LoadBalancer, error)

PredictableLoadBalancerFor returns a loadbalancer that always directs load to the supplied addr.

func TestVolumeWithCert

func TestVolumeWithCert(c, k string) (*api.Volume, error)

TestVolumeWithCert generates a volume fixture from the supplied PEM certs

Types

type InsecureVolume

type InsecureVolume struct {
	*api.Volume
	KeyPair api.KeyPair
}

An InsecureVolume is a Volume that will include its KeyPair when writing JSON

func NewInsecureVolume

func NewInsecureVolume(v *api.Volume) *InsecureVolume

NewInsecureVolume creates an InsecureVolume from a regular old volume.

func (*InsecureVolume) WriteJSON

func (v *InsecureVolume) WriteJSON(w io.Writer) error

WriteJSON writes an InsecureVolume as JSON, KeyPair and all.

Jump to

Keyboard shortcuts

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