httpclient

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

Client calls the certificate API, which cert/httphandler serves

func New

func New(url string, opts ...client.ClientOpt) (*Client, error)

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

func (c *Client) CreateSubject(ctx context.Context, meta cert.SubjectMeta) (*cert.Subject, error)

CreateSubject creates a subject, or returns an identical one, when it's stored

func (*Client) DeleteSubject added in v0.0.15

func (c *Client) DeleteSubject(ctx context.Context, id uint64) error

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

func (c *Client) GetSubject(ctx context.Context, id uint64) (*cert.Subject, error)

GetSubject returns a subject, with the number of certificates which use it

func (*Client) ListCerts

func (c *Client) ListCerts(ctx context.Context, req cert.CertListRequest) (*cert.CertList, error)

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.

func (*Client) UpdateSubject added in v0.0.15

func (c *Client) UpdateSubject(ctx context.Context, id uint64, meta cert.SubjectMeta) (*cert.Subject, error)

UpdateSubject updates a subject which no certificate uses. A field which isn't set is kept, and an empty one removed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL