Documentation ¶
Overview ¶
Package confutil contains utility types and functions which help with configuration loading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertPool ¶
CertPool is a set of X.509 certificates.
func (*CertPool) UnmarshalJSON ¶
UnmarshalJSON unmarshals CertPool from a JSON array of encoded Certificates.
type Certificate ¶
type Certificate x509.Certificate
Certificate is a single X.509 certificate.
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals Certificate from a JSON string containing the PEM-encoding of the X.509 certificate.
type Date ¶
Date is a time.Time which is represented as ISO date (yyyy-mm-dd) in JSON representations.
func (Date) At ¶
At returns a new date value with the same date, but time set to 'hh:mm:ss' in local TZ.
func (Date) AtEndOfDay ¶
AtEndOfDay if date represents zero time, returns it's value, otherwise returns the date value at time '23:59:59' in local TZ.
func (Date) MarshalJSON ¶
MarshalJSON marshals the Date to string.
func (*Date) UnmarshalJSON ¶
UnmarshalJSON unmarshals Date from a JSON string.
type DateTime ¶
DateTime is a time.Time which is represented as ISO datetime (yyyy-mm-ddTHH:MM:SSZ07:00) in JSON representations. It is needed as a wrapper around time.Time to marshal the zero time as an empty string.
func ParseDateTime ¶
ParseDateTime parses DateTime from a string value.
func (DateTime) MarshalJSON ¶
MarshalJSON marshals the DateTime to string.
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON unmarshals DateTime from a JSON string.
type Duration ¶
Duration is a time.Time which is represented as ISO date (yyyy-mm-dd) in JSON representations.
func ParseDuration ¶
ParseDuration parses Duration from a string value.
func (Duration) MarshalJSON ¶
MarshalJSON marshals the Duration to string.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON unmarshals Duration from a JSON string.
type Seconds ¶
Seconds is a time.Duration which is represented in configuration files as a whole number of seconds.
func (*Seconds) UnmarshalJSON ¶
UnmarshalJSON unmarshals Seconds from a JSON number.
type TLS ¶
type TLS tls.Certificate
TLS is a TLS certificate chain and private key.
func (*TLS) UnmarshalJSON ¶
UnmarshalJSON unmarshals TLS from a {"chain": "string", "key": "string"} JSON object where
"chain" contains the concatenated PEM-encodings of X.509 certificates (leaf certificate first) and
"key" the PEM-encoding of the PKCS #8 private key for the leaf.
type Time ¶
Time is a time.Time which is represented as clock (HH:MM) in JSON representations.
func (Time) MarshalJSON ¶
MarshalJSON marshals the Time to string.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON unmarshals Time from a JSON string.
type URL ¶
URL is an absolute URL. It has the original string and a parsed structure.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON unmarshals URL from a JSON string. The URL must be absolute.