cert

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FmtDuration added in v0.2.0

func FmtDuration(d time.Duration) string

FmtDuration returns a string representing the duration in the form "72h3m".

Types

type HostInfo

type HostInfo struct {
	Host       string
	Port       int
	Certs      []*x509.Certificate
	Expired    string
	ExpiredAt  time.Time
	ExpireDays int
	DryRun     bool
}

func (*HostInfo) GetCerts

func (h *HostInfo) GetCerts(timeout int) error

GetCerts returns the certificates of the host

func (*HostInfo) GetKubernetesDistributive added in v0.2.0

func (h *HostInfo) GetKubernetesDistributive() (dist string)

GetKubernetesDistributive returns the kubernetes distributive name.

func (*HostInfo) IsExpired added in v0.2.0

func (h *HostInfo) IsExpired() bool

IsExpired returns true if the certificate is expired.

func (*HostInfo) RenewCert added in v0.2.0

func (h *HostInfo) RenewCert(command string)

RenewCert renew the certificate of the host

func (*HostInfo) RenewCertK3s added in v0.2.0

func (h *HostInfo) RenewCertK3s()

RenewCertK3s renew the certificate of the host for k3s

func (*HostInfo) ShowCerts

func (h *HostInfo) ShowCerts(mode string) (err error)

show the certificates of the host

Jump to

Keyboard shortcuts

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