cert

package
v0.5.52 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const TypeCertificateCA string = "certificate_ca"

TypeCertificateCA is the resource string for a self-signed CA

View Source
const TypeCertificateLeaf string = "certificate_leaf"

TypeCertificateCA is the resource string for a self-signed CA

Variables

This section is empty.

Functions

This section is empty.

Types

type CAProvider

type CAProvider struct {
	// contains filtered or unexported fields
}

func (*CAProvider) Changed

func (p *CAProvider) Changed() (bool, error)

func (*CAProvider) Create

func (p *CAProvider) Create() error

func (*CAProvider) Destroy

func (p *CAProvider) Destroy() error

func (*CAProvider) Init

func (p *CAProvider) Init(cfg htypes.Resource, l logger.Logger) error

func (*CAProvider) Lookup

func (p *CAProvider) Lookup() ([]string, error)

func (*CAProvider) Refresh

func (p *CAProvider) Refresh() error

type CertificateCA

type CertificateCA struct {
	types.ResourceMetadata `hcl:",remain"`

	// Output directory to write the certificate and key too
	Output string `hcl:"output" json:"output"`

	// Key is the value related to the certificate key
	PrivateKey File `hcl:"private_key,optional" json:"private_key"`

	// Key is the value related to the certificate key
	PublicKeyPEM File `hcl:"public_key_pem,optional" json:"public_key_pem"`
	PublicKeySSH File `hcl:"public_key_ssh,optional" json:"public_key_ssh"`

	// Cert is the value related to the certificate
	Cert File `hcl:"certificate,optional" json:"certificate"`
}

CertificateCA allows the generate of CA certificates

func (*CertificateCA) Process

func (c *CertificateCA) Process() error

type CertificateLeaf

type CertificateLeaf struct {
	types.ResourceMetadata `hcl:",remain"`

	CAKey  string `hcl:"ca_key" json:"ca_key"`   // Path to the primary key for the root CA
	CACert string `hcl:"ca_cert" json:"ca_cert"` // Path to the root CA

	IPAddresses []string `hcl:"ip_addresses,optional" json:"ip_addresses,omitempty"` // ip addresses to add to the cert
	DNSNames    []string `hcl:"dns_names,optional" json:"dns_names,omitempty"`       // DNS names to add to the cert

	Output string `hcl:"output" json:"output"` // output location for the certificate

	// Key is the value related to the certificate key
	PrivateKey File `hcl:"private_key,optional" json:"private_key"`

	// Key is the value related to the certificate key
	PublicKeyPEM File `hcl:"public_key_pem,optional" json:"public_key_pem"`
	PublicKeySSH File `hcl:"public_key_ssh,optional" json:"public_key_ssh"`

	// Cert is the value related to the certificate
	Cert File `hcl:"certificate,optional" json:"certificate"`
}

CertificateCA allows the generate of CA certificates

func (*CertificateLeaf) Process

func (c *CertificateLeaf) Process() error

type File

type File struct {
	Filename  string `hcl:"filename,optional" json:"filename"`
	Directory string `hcl:"directory,optional" json:"directory"`
	Path      string `hcl:"path,optional" json:"path"`
	Contents  string `hcl:"contents,optional" json:"contents"`
}

type LeafProvider

type LeafProvider struct {
	// contains filtered or unexported fields
}

func (*LeafProvider) Changed

func (p *LeafProvider) Changed() (bool, error)

func (*LeafProvider) Create

func (p *LeafProvider) Create() error

func (*LeafProvider) Destroy

func (p *LeafProvider) Destroy() error

func (*LeafProvider) Init

func (p *LeafProvider) Init(cfg htypes.Resource, l logger.Logger) error

func (*LeafProvider) Lookup

func (p *LeafProvider) Lookup() ([]string, error)

func (*LeafProvider) Refresh

func (p *LeafProvider) Refresh() error

Jump to

Keyboard shortcuts

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