Documentation ¶
Index ¶
- func CipherSuitesToUint16(ciphers []string) ([]uint16, []string, error)
- func ParseClientAuthType(clientAuth string) (tls.ClientAuthType, error)
- func ParseClientTLSConfig(config *TLS) (*tls.Config, []string, error)
- func ParseCurves(curveNames []string) ([]tls.CurveID, error)
- func ParseTLSVersion(version string) (uint16, error)
- type CertificatePair
- type ChunkAutoInterval
- func (c *ChunkAutoInterval) GetDefault() time.Duration
- func (c *ChunkAutoInterval) GetInterval(unhandledCount int) time.Duration
- func (c *ChunkAutoInterval) MarshalText() ([]byte, error)
- func (c *ChunkAutoInterval) SetDefault(v time.Duration)
- func (c *ChunkAutoInterval) UnmarshalText(p []byte) error
- type CompAlgo
- type Compression
- type Duration
- type Size
- type TLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CipherSuitesToUint16 ¶ added in v0.11.7
CipherSuitesToUint16 for a given list of ciphers returns list of corresponding ids, list of insecure ciphers if cipher is unknown, it will return an error
func ParseClientAuthType ¶ added in v0.11.7
func ParseClientAuthType(clientAuth string) (tls.ClientAuthType, error)
func ParseClientTLSConfig ¶ added in v0.11.7
ParseClientTLSConfig parses TLSConfig as it should be used for HTTPS client mTLS and returns &tls.Config, list of warnings or error if parsing has failed. At this moment warnings are only about insecure ciphers
func ParseCurves ¶ added in v0.11.7
ParseCurves returns list of tls.CurveIDs that can be passed to tls.Config or error if they are not supported ParseCurves also deduplicate input list
func ParseTLSVersion ¶ added in v0.11.7
ParseTLSVersion converts a TLS version string ("TLS10", "TLS11", "TLS12", "TLS13") to its respective uint16 constant. An empty string defaults to TLS version 1.3.
Returns an error for unknown or invalid versions.
Types ¶
type CertificatePair ¶ added in v0.11.7
type ChunkAutoInterval ¶ added in v0.8.0
type ChunkAutoInterval struct {
// contains filtered or unexported fields
}
func NewChunkAutoInterval ¶ added in v0.8.0
func NewChunkAutoInterval() *ChunkAutoInterval
func (*ChunkAutoInterval) GetDefault ¶ added in v0.8.0
func (c *ChunkAutoInterval) GetDefault() time.Duration
func (*ChunkAutoInterval) GetInterval ¶ added in v0.8.0
func (c *ChunkAutoInterval) GetInterval(unhandledCount int) time.Duration
func (*ChunkAutoInterval) MarshalText ¶ added in v0.8.0
func (c *ChunkAutoInterval) MarshalText() ([]byte, error)
func (*ChunkAutoInterval) SetDefault ¶ added in v0.8.0
func (c *ChunkAutoInterval) SetDefault(v time.Duration)
func (*ChunkAutoInterval) UnmarshalText ¶ added in v0.8.0
func (c *ChunkAutoInterval) UnmarshalText(p []byte) error
UnmarshalText from TOML
type Compression ¶ added in v0.10.0
type Compression struct {
CompAlgo
}
Compression wrapper for TOML
func (*Compression) MarshalText ¶ added in v0.10.0
func (c *Compression) MarshalText() ([]byte, error)
MarshalText encode text with TOML format
func (*Compression) UnmarshalText ¶ added in v0.10.0
func (c *Compression) UnmarshalText(text []byte) (err error)
UnmarshalText from TOML
func (*Compression) Value ¶ added in v0.10.0
func (c *Compression) Value() CompAlgo
Value return time.Duration value
type Duration ¶
Duration wrapper time.Duration for TOML
func (*Duration) MarshalText ¶
MarshalText encode text with TOML format
func (*Duration) UnmarshalText ¶
UnmarshalText from TOML
type TLS ¶ added in v0.11.7
type TLS struct { Certificates []CertificatePair `toml:"certificates"` CACertFiles []string `toml:"ca-cert"` ClientAuth string `toml:"client-auth"` ServerName string `toml:"server-name"` MinVersion string `toml:"min-version"` // supported formats: TLS10, TLS11, TLS12, TLS13 MaxVersion string `toml:"max-version"` // supported formats: TLS10, TLS11, TLS12, TLS13 InsecureSkipVerify bool `toml:"insecure-skip-verify"` Curves []string `toml:"curves"` CipherSuites []string `toml:"cipher-suites"` }