Documentation ¶
Index ¶
- Constants
- func IsExecutionFailed(err error) bool
- func IsInvalidConfig(err error) bool
- func IsNoVaultHandlerDefined(err error) bool
- func IsNotFound(err error) bool
- type CertificateAuthority
- type Config
- type Interface
- type VaultPKI
- func (p *VaultPKI) BackendExists(ID string) (bool, error)
- func (p *VaultPKI) CAExists(ID string) (bool, error)
- func (p *VaultPKI) CreateBackend(ID string) error
- func (p *VaultPKI) CreateCA(ID string) (CertificateAuthority, error)
- func (p *VaultPKI) CreateCAWithPrivateKey(ID string) (CertificateAuthority, error)
- func (p *VaultPKI) DeleteBackend(ID string) error
- func (p *VaultPKI) GetBackend(ID string) (*vaultapi.MountOutput, error)
- func (p *VaultPKI) GetCACertificate(ID string) (CertificateAuthority, error)
- func (p *VaultPKI) ListBackends() (map[string]*vaultapi.MountOutput, error)
Constants ¶
View Source
const (
// MountType is the mount type used to mount a PKI backend in Vault.
MountType = "pki"
)
Variables ¶
This section is empty.
Functions ¶
func IsExecutionFailed ¶
IsExecutionFailed asserts executionFailedError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsNoVaultHandlerDefined ¶
IsNoVaultHandlerDefined asserts a dirty string matching against the error message provided by err. This is necessary due to the poor error handling design of the Vault library we are using.
Types ¶
type CertificateAuthority ¶ added in v0.1.3
func DefaultCertificateAuthority ¶ added in v0.1.3
func DefaultCertificateAuthority() CertificateAuthority
type Config ¶
type Config struct { Logger micrologger.Logger VaultClient *vaultapi.Client CATTL string CommonNameFormat string }
func DefaultConfig ¶
func DefaultConfig() Config
type Interface ¶
type Interface interface { BackendExists(ID string) (bool, error) CAExists(ID string) (bool, error) CreateBackend(ID string) error CreateCA(ID string) (CertificateAuthority, error) CreateCAWithPrivateKey(ID string) (CertificateAuthority, error) DeleteBackend(ID string) error GetBackend(ID string) (*vaultapi.MountOutput, error) GetCACertificate(ID string) (CertificateAuthority, error) ListBackends() (map[string]*vaultapi.MountOutput, error) }
type VaultPKI ¶
type VaultPKI struct {
// contains filtered or unexported fields
}
func (*VaultPKI) CreateBackend ¶
func (*VaultPKI) CreateCAWithPrivateKey ¶ added in v0.1.3
func (p *VaultPKI) CreateCAWithPrivateKey(ID string) (CertificateAuthority, error)
func (*VaultPKI) DeleteBackend ¶
func (*VaultPKI) GetBackend ¶
func (p *VaultPKI) GetBackend(ID string) (*vaultapi.MountOutput, error)
func (*VaultPKI) GetCACertificate ¶
func (p *VaultPKI) GetCACertificate(ID string) (CertificateAuthority, error)
GetCACertificate returns the public key of the root CA of the PKI backend associated to the given ID, if any.
func (*VaultPKI) ListBackends ¶
func (p *VaultPKI) ListBackends() (map[string]*vaultapi.MountOutput, error)
Click to show internal directories.
Click to hide internal directories.