testing

package
v0.0.0-...-1d4acb1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(logger *logrus.Entry) (string, func(), error)

CreateTempFile creates a temporary file and returns the path and a callback to delete the file (should be called with defer by the caller)

func NewLogger

func NewLogger() (*bytes.Buffer, *logrus.Entry)

NewLogger returns a new logrus.Entry instance and a buffer which is configured as a stream output

Types

type VaultClientLogical

type VaultClientLogical struct {
	Result      *api.Secret
	ResultError error
}

VaultClientLogical implements the vault logical type for testing

func NewVaultClientLogical

func NewVaultClientLogical(result *api.Secret, err error) *VaultClientLogical

NewVaultClientLogical returns a new VaultClientLogical instance

func (*VaultClientLogical) Delete

func (c *VaultClientLogical) Delete(path string) (*api.Secret, error)

Delete just returns the results set on the struct

func (*VaultClientLogical) List

func (c *VaultClientLogical) List(path string) (*api.Secret, error)

List just returns the results set on the struct

func (*VaultClientLogical) Read

func (c *VaultClientLogical) Read(path string) (*api.Secret, error)

Read just returns the results set on the struct

func (*VaultClientLogical) ReadWithData

func (c *VaultClientLogical) ReadWithData(path string, data map[string][]string) (*api.Secret, error)

ReadWithData just returns the results set on the struct

func (*VaultClientLogical) Unwrap

func (c *VaultClientLogical) Unwrap(wrappingToken string) (*api.Secret, error)

Unwrap just returns the results set on the struct

func (*VaultClientLogical) Write

func (c *VaultClientLogical) Write(path string, data map[string]interface{}) (*api.Secret, error)

Write just returns the results set on the struct

Jump to

Keyboard shortcuts

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