Documentation ¶
Index ¶
- func GetThumbprint(cert string) ([sha1.Size]byte, error)
- type CVConfig
- type ConfigLoader
- type CredhubProxy
- func (cp *CredhubProxy) Auth() error
- func (cp *CredhubProxy) AuthExisting() error
- func (cp *CredhubProxy) DeleteCert(name string) error
- func (cp *CredhubProxy) GenerateCertificate(name string, parameters generate.Certificate, overwrite credhub.Mode) (credentials.Certificate, error)
- func (cp *CredhubProxy) GetCertificate(name string) (credentials.Certificate, error)
- func (cp *CredhubProxy) List() ([]credentials.CertificateMetadata, error)
- func (cp *CredhubProxy) PutCertificate(certName string, ca string, certificate string, privateKey string) error
- type ICredhubProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CVConfig ¶
type CVConfig struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` CredhubBaseURL string `json:"credhub_url"` AuthURL string `json:"auth_url"` SkipTLSValidation bool `json:"skip_tls_validation"` }
CVConfig contains app config info and yaml tags
type ConfigLoader ¶
ConfigLoader has configuration location info and methods to load the config
func (*ConfigLoader) ReadConfig ¶
func (c *ConfigLoader) ReadConfig() (*CVConfig, error)
ReadConfig parses the CredHub client config file
type CredhubProxy ¶
type CredhubProxy struct { BaseURL string Username string Password string ClientID string ClientSecret string AccessToken string RefreshToken string AuthURL string Client *credhub.CredHub ConfigPath string SkipTLSValidation bool }
CredhubProxy contains the config information for the Credhub request proxy
func (*CredhubProxy) Auth ¶
func (cp *CredhubProxy) Auth() error
Auth authenticates a new CredHub client
func (*CredhubProxy) AuthExisting ¶
func (cp *CredhubProxy) AuthExisting() error
AuthExisting authenticates an existing CredHub client
func (*CredhubProxy) DeleteCert ¶
func (cp *CredhubProxy) DeleteCert(name string) error
DeleteCert deletes a certificate from CredHub
func (*CredhubProxy) GenerateCertificate ¶
func (cp *CredhubProxy) GenerateCertificate(name string, parameters generate.Certificate, overwrite credhub.Mode) (credentials.Certificate, error)
GenerateCertificate generates a certificate in CredHub
func (*CredhubProxy) GetCertificate ¶
func (cp *CredhubProxy) GetCertificate(name string) (credentials.Certificate, error)
GetCertificate downloads a certificate from CredHub
func (*CredhubProxy) List ¶
func (cp *CredhubProxy) List() ([]credentials.CertificateMetadata, error)
List lists certificates on CredHub
func (*CredhubProxy) PutCertificate ¶
func (cp *CredhubProxy) PutCertificate(certName string, ca string, certificate string, privateKey string) error
PutCertificate uploads a certificate to CredHub
type ICredhubProxy ¶
type ICredhubProxy interface { GenerateCertificate(name string, parameters generate.Certificate, overwrite credhub.Mode) (credentials.Certificate, error) PutCertificate(certName string, ca string, certificate string, privateKey string) error DeleteCert(name string) error List() ([]credentials.CertificateMetadata, error) GetCertificate(name string) (credentials.Certificate, error) }
ICredhubProxy defines the interface for the proxy to communicate with Credhub