Add missing comments.

This commit is contained in:
Mariano Cano 2022-04-12 11:15:28 -07:00
parent 48bc20c9f3
commit 76c483c36f

View file

@ -25,6 +25,8 @@ func init() {
}) })
} }
// VaultOptions defines the configuration options added using the
// apiv1.Options.Config field.
type VaultOptions struct { type VaultOptions struct {
PKI string `json:"pki,omitempty"` PKI string `json:"pki,omitempty"`
PKIRoleDefault string `json:"pkiRoleDefault,omitempty"` PKIRoleDefault string `json:"pkiRoleDefault,omitempty"`
@ -128,6 +130,8 @@ func (v *VaultCAS) CreateCertificate(req *apiv1.CreateCertificateRequest) (*apiv
}, nil }, nil
} }
// GetCertificateAuthority returns the root certificate of the certificate
// authority using the configured fingerprint.
func (v *VaultCAS) GetCertificateAuthority(req *apiv1.GetCertificateAuthorityRequest) (*apiv1.GetCertificateAuthorityResponse, error) { func (v *VaultCAS) GetCertificateAuthority(req *apiv1.GetCertificateAuthorityRequest) (*apiv1.GetCertificateAuthorityResponse, error) {
secret, err := v.client.Logical().Read(v.config.PKI + "/cert/ca_chain") secret, err := v.client.Logical().Read(v.config.PKI + "/cert/ca_chain")
if err != nil { if err != nil {