package
1.20240719.1
Repository: https://github.com/blend/go-sdk.git
Documentation: pkg.go.dev

# Functions

BytesWithError returns a bytes error response with the error as an ex.
CommonNamesForCertPEM returns the common names from a cert pair.
CreateCertificateAuthority creates a ca cert bundle from a given set of options.
CreateCertPool extends an empty pool with a given set of certs.
CreateClient creates a client cert bundle associated with a given common name.
CreateSelfServerCert creates a self signed server certificate bundle.
CreateServer creates a ca cert bundle.
ExtendSystemCertPool extends the system ca pool with a given list of ca cert key pairs.
JoinPEMs appends pem blocks together with newlines.
MustBytes panics on an error or returns the contents.
NewCertBundle returns a new cert bundle from a given key pair, which can denote the raw PEM encoded contents of the public and private key portions of the cert, or paths to files.
NewCertFileWatcher creates a new CertReloader object with a reload delay.
NewCertManager returns a new cert manager.
NewCertManagerWithKeyPairs returns a new cert pool from key pairs.
NewClientTLSConfig returns a new client tls config.
NewKeyPairFromPaths returns a key pair from paths.
OptAddDNSNames adds valid dns names for the cert.
OptCertFileWatcherNotifyReload sets the notify reload channel.
OptCertFileWatcherOnReload sets the on reload handler.
OptCertFileWatcherPollInterval sets the poll interval .
OptCertManagerClientCerts sets a field on the cert manager.
OptCertManagerRootCAs sets a field on the cert manager.
OptCertManagerServerCerts sets a field on the cert manager.
OptDNSNames sets valid dns names for the cert.
OptIsCA sets the is certificate authority flag.
OptKeyUsage sets the key usage flags.
OptNotAfter sets the not after time.
OptNotBefore sets the not before time.
OptPrivateKey sets the private key to use when generating the certificate.
OptPrivateKeyFromPath reads a private key from a given path and parses it as PKCS1PrivateKey.
OptSerialNumber sets the serial number for the certificate.
OptSubjectAlternateNames sets the subject alternate names.
OptSubjectCommonName sets the subject common name.
OptSubjectCountry sets the subject country names.
OptSubjectLocality sets the subject locality names.
OptSubjectOrganization sets the subject organization names.
OptSubjectProvince sets the subject province names.
ParseCertPEM parses the cert portion of a cert pair.
ReadFiles reads a list of files as bytes.
ReadPrivateKeyPEMFromPath reads a private key pem from a given path.
ResolveCertOptions resolves the common create cert options.

# Constants

BlockTypes.
BlockTypes.
Not After defaults.
DefaultCertficicateFileWatcherPollInterval is the default poll interval when re-reading certs.
Not After defaults.
Not After defaults.
Errors.
Error constants.

# Variables

DefaultOptionsCertificateAuthority are the default options for certificate authorities.
DefaultOptionsClient are the default create cert options for client certificates.
DefaultOptionsServer are the default create cert options for server certificates.

# Structs

CertBundle is the packet of information for a certificate.
CertFileWatcher reloads a cert key pair when there is a change, e.g.
CertManager is a pool of client certs.
CertOptions are required arguments when creating certificates.
KeyPair is an x509 pem key pair as strings.

# Type aliases

CertFileWatcherOnReloadAction is the on reload action for a cert file watcher.
CertFileWatcherOption is an option for a cert watcher.
CertManagerOption is an option for a cert manager.
CertOption is an option for creating certs.