Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllEngineTypes []EngineType
AllEngineTypes is a slice of all the engine types known to pentagon.
Functions ¶
This section is empty.
Types ¶
type AuthType ¶
type AuthType string
AuthType is a custom type to represent different Vault authentication methods.
const ( // AuthTypeToken expects the Token property to be set on the VaultConfig // struct with a token to use. AuthTypeToken AuthType = "token" // AuthTypeGCPDefault expects the Role property of the VaultConfig struct // to be populated with the role that vault expects and will use the machine's // default service account, running within GCP. AuthTypeGCPDefault AuthType = "gcp-default" )
type EngineType ¶
type EngineType string
EngineType is an identifier for an engine
const ( // EngineTypeKeyValueV1 is the identifier for version 1 of the key/value engine. EngineTypeKeyValueV1 EngineType = "kv" // EngineTypeKeyValueV2 is the identifier for version 2 of the key/value engine. EngineTypeKeyValueV2 EngineType = "kv-v2" )
type Logical ¶
type Logical interface { Read(string) (*api.Secret, error) Write(string, map[string]interface{}) (*api.Secret, error) }
Logical is a subset of the inner interface that Logical() returns. I'm only implementing two methods because that's all I need.
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock is a mock vault of secrets.
func NewMock ¶
func NewMock(engineMounts map[string]EngineType) *Mock
NewMock returns a new mock vault client. engineMounts is a map of the path prefix to the type of secrets engine that is mounted.
Click to show internal directories.
Click to hide internal directories.