Documentation ¶
Index ¶
- type CacheMiss
- type Client
- func (c *Client) AddPKI2Clean(pkiPath string)
- func (c *Client) CreateSecret(fullPath string, data map[string]interface{}) error
- func (c *Client) DelCertFromCache(pkiPath string, cn string) error
- func (c *Client) DeleteSecret(fullPath string) error
- func (c *Client) GetCRL(pkiPath string) (*x509.RevocationList, error)
- func (c *Client) GetCertFromCache(pkiPath string, cn string) (string, string, string, error)
- func (c *Client) GetSecret(secretPath string) (string, bool, error)
- func (c *Client) GetSignedCertificate(pkiPath string, pkiRole string, certReq *certificates.Certificate) (*certificates.Certificate, error)
- func (c *Client) PutToCache(pkiPath, cn string, cert *certificates.Certificate) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct would hold connection to Vault
func (*Client) AddPKI2Clean ¶
AddPKI2Clean would add your PKI to cleanup
func (*Client) CreateSecret ¶
CreateSecret would create secret in Vault
func (*Client) DelCertFromCache ¶
DelCertFromCache will delete certificate with pkiPath from cache
func (*Client) DeleteSecret ¶
DeleteSecret would delete secret from Vault
func (*Client) GetCRL ¶
func (c *Client) GetCRL(pkiPath string) (*x509.RevocationList, error)
GetCRL would return CRL
func (*Client) GetCertFromCache ¶
GetCertFromCache will fetch certificates from cache it will return: Cert, Key, CA, error if occured
func (*Client) GetSecret ¶
GetSecret would return string (if found), bool that secret is base64 binary, error if something gets wrong
func (*Client) GetSignedCertificate ¶
func (c *Client) GetSignedCertificate( pkiPath string, pkiRole string, certReq *certificates.Certificate) (*certificates.Certificate, error)
GetSignedCertificate is central point to come for new certificate, which might be provided from cache, signed by PKI's CA We will return certificate
func (*Client) PutToCache ¶
func (c *Client) PutToCache(pkiPath, cn string, cert *certificates.Certificate) error
PutToCache will put to cache certificate
type Option ¶
Option is a type of options for Vault Client
func ContextWithCancelFN ¶
func ContextWithCancelFN(ctx context.Context, cancelFn context.CancelFunc) Option
ContextWithCancelFN is option function to set channel for termination notifications from renew and also set upstream context
func SecretsPathPrefix ¶
SecretsPathPrefix is option function to set Vault secrets path prefix
func TLSCertsCachePath ¶
TLSCertsCachePath is option function to set Vault TLS certs cache path
func VaultClient ¶
VaultClient will add interface to vault client, can be mocked