Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddrPort ¶
AddrPort is a wrapper for netip.AddrPort for which (json/yaml).(Marshaller/Unmarshaller) are implemented.
func ParseAddrPort ¶
ParseAddrPort parses an IPv4/IPv6 address and port string into an AddrPort.
func (AddrPort) MarshalJSON ¶
MarshalJSON implements json.Marshaler for the AddrPort type.
func (AddrPort) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler for the AddrPort type. Note that for yaml we just need to return a yaml marshallable type (if we return []byte as in the json implementation it is written as an int array).
func (*AddrPort) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler for AddrPort.
type AddrPorts ¶
type AddrPorts []AddrPort
AddrPorts is a defined type for a slice of AddrPort. This facilitates convenience functions.
func ParseAddrPorts ¶
ParseAddrPorts parses a list of IPv4/IPv6 address and port strings into an AddrPorts.
func (AddrPorts) SelectRandom ¶
SelectRandom returns a randomly selected AddrPort from AddrPorts.
type ClusterCertificatePut ¶
type ClusterCertificatePut struct { PublicKey string `json:"public_key" yaml:"public_key"` PrivateKey string `json:"private_key" yaml:"private_key"` CA string `json:"ca" yaml:"ca"` }
ClusterCertificatePut represents the content of a new cluster keypair and CA.
type X509Certificate ¶
type X509Certificate struct {
*x509.Certificate
}
X509Certificate is a json/yaml marshallable/unmarshallable type wrapper for x509.Certificate.
func ParseX509Certificate ¶
func ParseX509Certificate(certStr string) (*X509Certificate, error)
func (X509Certificate) MarshalJSON ¶
func (c X509Certificate) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler for X509Certificate.
func (X509Certificate) MarshalYAML ¶
func (c X509Certificate) MarshalYAML() (any, error)
MarshalYAML implements yaml.Marshaller for X509Certificate.
func (X509Certificate) String ¶
func (c X509Certificate) String() string
String returns the x509.Certificate as a PEM encoded string.
func (*X509Certificate) UnmarshalJSON ¶
func (c *X509Certificate) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler for X509Certificate.
func (*X509Certificate) UnmarshalYAML ¶
func (c *X509Certificate) UnmarshalYAML(unmarshal func(v any) error) error
UnmarshalYAML implements yaml.Unmarshaler for X509Certificate.