vault

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

vault defines structs that will be used frequently by clients which utilize HTTP transport.

******************************************************************************

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

View Source
const (
	// NamespaceHeader specifies the header name to use when including Namespace information in a request.
	NamespaceHeader = "X-Vault-Namespace"
)

Variables

This section is empty.

Functions

func NewSecretClient

func NewSecretClient(config SecretConfig) (pkg.SecretClient, error)

NewSecretClient constructs a SecretClient which communicates with Vault via HTTP

Types

type AuthenticationInfo

type AuthenticationInfo struct {
	AuthType  string
	AuthToken string
}

AuthenticationInfo contains authentication information to be used when communicating with an HTTP based provider

type Caller

type Caller interface {
	Do(req *http.Request) (*http.Response, error)
}

Caller interface used to abstract the implementation details for issuing an HTTP request. This allows for easier testing by the way of mocks.

type ErrCaRootCert

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

ErrCaRootCert error when the provided CA Root certificate is invalid.

func (ErrCaRootCert) Error

func (e ErrCaRootCert) Error() string

type HttpSecretStoreManager

type HttpSecretStoreManager struct {
	HttpConfig SecretConfig
	HttpCaller Caller
}

HttpSecretStoreManager defines the behavior for interacting with the Vault REST secret key/value store via HTTP.

func (HttpSecretStoreManager) GetValues

func (c HttpSecretStoreManager) GetValues(keys ...string) (map[string]string, error)

type SecretConfig

type SecretConfig struct {
	Host           string
	Port           int
	Path           string
	Protocol       string
	Namespace      string
	RootCaCert     string
	ServerName     string
	Authentication AuthenticationInfo
}

SecretConfig contains configuration settings used to communicate with an HTTP based secret provider

func (SecretConfig) BuildURL

func (c SecretConfig) BuildURL() (path string)

BuildURL constructs a URL which can be used to identify a HTTP based secret provider

Jump to

Keyboard shortcuts

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