{"modulePath":"github.com/mutablelogic/go-server","version":"v1.4.15","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package certmanager\n\n## Functions\n\n```go\nfunc New(c Config) (*certmanager, error)\n```\nCreate a new auth task from the configuration\n\n## Types\n\n```go\ntype Cert interface {\n\t// Return Serial of the certificate\n\tSerial() string\n\n\t// Return the subject of the certificate\n\tSubject() string\n\n\t// Return ErrExpired if the certificate has expired,\n\t// or nil if the certificate is valid. Other error returns\n\t// indicate other problems with the certificate\n\tIsValid() error\n\n\t// Return the expiry date of the certificate\n\tExpires() time.Time\n\n\t// Return true if the certificate is a CA\n\tIsCA() bool\n\n\t// Return the key type\n\tKeyType() string\n\n\t// Write a .pem file with the certificate\n\tWriteCertificate(w io.Writer) error\n\n\t// Write a .pem file with the private key\n\tWritePrivateKey(w io.Writer) error\n}\n```\nCert interface represents a certificate or certificate authority\n\n```go\ntype CertStorage interface {\n\tserver.Task\n\n\t// Return all certificates. This may not return the certificates\n\t// themselves, but the metadata for the certificates. Use Read\n\t// to get the certificate itself\n\tList() ([]Cert, error)\n\n\t// Read a certificate by serial number\n\tRead(string) (Cert, error)\n\n\t// Write a certificate\n\tWrite(Cert) error\n\n\t// Delete a certificate\n\tDelete(Cert) error\n}\n```\nCertStorage interface represents a storage for certificates\n\n```go\ntype Config struct {\n\tX509Name    `hcl:\"x509_name\" description:\"X509 name for certificate\"`\n\tCertStorage CertStorage `hcl:\"cert_storage\" description:\"Certificate storage\"`\n}\n```\n\n```go\nfunc (Config) Description() string\n```\nDescription returns the description of the service\n\n```go\nfunc (Config) Name() string\n```\nName returns the name of the service\n\n```go\nfunc (c Config) New() (server.Task, error)\n```\nCreate a new task from the configuration\n\n```go\ntype X509Name struct {\n\tOrganizationalUnit string `hcl:\"organizational_unit,omitempty\" description:\"X509 Organizational Unit\"`\n\tOrganization       string `hcl:\"organization\" description:\"X509 Organization\"`\n\tLocality           string `hcl:\"locality,omitempty\"  description:\"X509 Locality\"`\n\tProvince           string `hcl:\"province,omitempty\"  description:\"X509 Province\"`\n\tCountry            string `hcl:\"country,omitempty\"  description:\"X509 Country\"`\n\tStreetAddress      string `hcl:\"street_address,omitempty\"  description:\"X509 Street Address\"`\n\tPostalCode         string `hcl:\"postal_code,omitempty\"  description:\"X509 Postal Code\"`\n}\n```\n\n","path":"github.com/mutablelogic/go-server/pkg/handler/certmanager","name":"certmanager","synopsis":"","isRedistributable":true}
