Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateCA(ctx context.Context, req cert.CreateCertRequest) (*cert.Certificate, error)
- func (c *Client) CreateCert(ctx context.Context, req cert.CreateCertRequest, ca cert.CertKey) (*cert.Certificate, error)
- func (c *Client) CreateSubject(ctx context.Context, meta cert.SubjectMeta) (*cert.Subject, error)
- func (c *Client) DeleteSubject(ctx context.Context, id uint64) error
- func (c *Client) GetCert(ctx context.Context, key cert.CertKey, req cert.GetCertRequest) (*cert.CertBundle, error)
- func (c *Client) GetPrivateKey(ctx context.Context, key cert.CertKey, req cert.GetCertRequest) (*cert.CertBundle, error)
- func (c *Client) GetSubject(ctx context.Context, id uint64) (*cert.Subject, error)
- func (c *Client) ListCerts(ctx context.Context, req cert.CertListRequest) (*cert.CertList, error)
- func (c *Client) ListSubjects(ctx context.Context, req cert.SubjectListRequest) (*cert.SubjectList, error)
- func (c *Client) RenewCA(ctx context.Context, key cert.CertKey, req cert.RenewCertRequest) (*cert.Certificate, error)
- func (c *Client) RenewCert(ctx context.Context, key cert.CertKey, req cert.RenewCertRequest) (*cert.Certificate, error)
- func (c *Client) UpdateCert(ctx context.Context, key cert.CertKey, meta cert.CertMeta) (*cert.Certificate, error)
- func (c *Client) UpdateSubject(ctx context.Context, id uint64, meta cert.SubjectMeta) (*cert.Subject, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client calls the certificate API, which cert/httphandler serves
func New ¶
New returns a client of the certificate API at the URL, such as "http://localhost:8080/api"
func (*Client) CreateCA ¶
func (c *Client) CreateCA(ctx context.Context, req cert.CreateCertRequest) (*cert.Certificate, error)
CreateCA creates a certificate authority, signed by the root
func (*Client) CreateCert ¶
func (c *Client) CreateCert(ctx context.Context, req cert.CreateCertRequest, ca cert.CertKey) (*cert.Certificate, error)
CreateCert creates a leaf certificate, signed by a version of a certificate authority, or its latest version when the key has no serial
func (*Client) CreateSubject ¶ added in v0.0.15
CreateSubject creates a subject, or returns an identical one, when it's stored
func (*Client) DeleteSubject ¶ added in v0.0.15
DeleteSubject deletes a subject which no certificate uses
func (*Client) GetCert ¶
func (c *Client) GetCert(ctx context.Context, key cert.CertKey, req cert.GetCertRequest) (*cert.CertBundle, error)
GetCert returns a version of a certificate, or its latest version when the key has no serial, with its issuer chain when it's asked for. A disabled certificate is a conflict.
func (*Client) GetPrivateKey ¶ added in v0.0.15
func (c *Client) GetPrivateKey(ctx context.Context, key cert.CertKey, req cert.GetCertRequest) (*cert.CertBundle, error)
GetPrivateKey returns a version of a leaf certificate, or its latest version when the key has no serial, with its private key, decrypted, and its issuer chain when it's asked for. A certificate authority's private key is never returned.
func (*Client) GetSubject ¶ added in v0.0.15
GetSubject returns a subject, with the number of certificates which use it
func (*Client) ListCerts ¶
ListCerts returns the certificates, other than the root, without their private keys
func (*Client) ListSubjects ¶ added in v0.0.15
func (c *Client) ListSubjects(ctx context.Context, req cert.SubjectListRequest) (*cert.SubjectList, error)
ListSubjects returns a page of the subjects, with the number of certificates which use each
func (*Client) RenewCA ¶
func (c *Client) RenewCA(ctx context.Context, key cert.CertKey, req cert.RenewCertRequest) (*cert.Certificate, error)
RenewCA renews a version of a certificate authority, or its latest version when the key has no serial
func (*Client) RenewCert ¶
func (c *Client) RenewCert(ctx context.Context, key cert.CertKey, req cert.RenewCertRequest) (*cert.Certificate, error)
RenewCert renews a version of a leaf certificate, or its latest version when the key has no serial
func (*Client) UpdateCert ¶
func (c *Client) UpdateCert(ctx context.Context, key cert.CertKey, meta cert.CertMeta) (*cert.Certificate, error)
UpdateCert updates the enabled state and tags of a version of a certificate, or its latest version when the key has no serial. Empty tags remove them, and nil tags are kept.