vault

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SSHEngineDefaultName Default engine name.
	SSHEngineDefaultName = "ssh-test"
	// SSHEngineDefaultRoleName Default role name.
	SSHEngineDefaultRoleName = "general"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config *api.Config
	Client *api.Client
}

API is main struct of Vault.

func NewAPI

func NewAPI() (API, error)

NewAPI creates AI struct for Vault.

func (API) Mount

func (a API) Mount(path string, mountInfo *api.MountInput) error

Mount enables SSH engine with a path.

func (API) Read

func (a API) Read(path string) (*api.Secret, error)

Read gets CA certificate from ssh engine.

func (API) Write

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

Write creates CA certificate in ssh engine.

type APIInterface

type APIInterface interface {
	Mount(path string, input *api.MountInput) error
	Write(path string, options map[string]interface{}) (*api.Secret, error)
	Read(path string) (*api.Secret, error)
}

APIInterface is an interface for Vault API.

type SecretDataNotFound

type SecretDataNotFound struct {
	Key  string
	Path string
}

SecretDataNotFound occurs when the requested fixture file does not exist.

func (SecretDataNotFound) Error

func (e SecretDataNotFound) Error() string

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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