Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetPrintConfigTypeInSummary ¶
func SetPrintConfigTypeInSummary(p bool)
Types ¶
type SDSWriter ¶
type SDSWriter interface { PrintSecretItems([]SecretItem) error PrintDiffs([]SecretItemDiff) error }
SDSWriter takes lists of SecretItem or SecretItemDiff and prints them through supplied output writer
type SecretItem ¶
type SecretItem struct { Name string `json:"resource_name"` Data string `json:"cert"` Source string `json:"source"` Destination string `json:"destination"` State string `json:"state"` TrustDomain string `json:"trust_domain"` SecretMeta }
SecretItem is an intermediate representation of secrets, used to provide a common format between the envoy proxy secrets and node agent output which can be diffed
func GetEnvoySecrets ¶
func GetEnvoySecrets( wrapper *configdump.Wrapper, ) ([]SecretItem, error)
GetEnvoySecrets parses the secrets section of the config dump into []SecretItem
type SecretItemBuilder ¶
type SecretItemBuilder interface { Name(string) SecretItemBuilder Data(string) SecretItemBuilder Source(string) SecretItemBuilder Destination(string) SecretItemBuilder State(string) SecretItemBuilder TrustDomain(string) SecretItemBuilder Build() (SecretItem, error) }
SecretItemBuilder wraps the process of setting fields for the SecretItem and builds the Metadata fields from the cert contents behind the scenes
func NewSecretItemBuilder ¶
func NewSecretItemBuilder() SecretItemBuilder
NewSecretItemBuilder returns a new builder to create a secret item
type SecretItemDiff ¶
type SecretItemDiff struct { Agent string `json:"agent"` Proxy string `json:"proxy"` SecretItem }
SecretItemDiff represents a secret that has been diffed between nodeagent and proxy
type SecretMeta ¶
type SecretMeta struct { Valid bool `json:"cert_valid"` SerialNumber string `json:"serial_number"` NotAfter string `json:"not_after"` NotBefore string `json:"not_before"` Type string `json:"type"` TrustDomain string `json:"trust_domain"` }
SecretMeta holds selected fields which can be extracted from parsed x509 cert