2021-01-04 10:28:55 +00:00
|
|
|
package schema
|
|
|
|
|
2022-08-08 21:50:12 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2021-01-04 10:28:55 +00:00
|
|
|
// TLSConfig is a representation of the TLS configuration.
|
|
|
|
type TLSConfig struct {
|
2022-10-21 08:41:33 +00:00
|
|
|
MinimumVersion TLSVersion `koanf:"minimum_version"`
|
|
|
|
MaximumVersion TLSVersion `koanf:"maximum_version"`
|
|
|
|
|
|
|
|
SkipVerify bool `koanf:"skip_verify"`
|
|
|
|
ServerName string `koanf:"server_name"`
|
|
|
|
|
|
|
|
PrivateKey CryptographicPrivateKey `koanf:"private_key"`
|
|
|
|
CertificateChain X509CertificateChain `koanf:"certificate_chain"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// TLSCertificateConfig is a representation of the TLS Certificate configuration.
|
|
|
|
type TLSCertificateConfig struct {
|
|
|
|
Key CryptographicPrivateKey `koanf:"key"`
|
|
|
|
CertificateChain X509CertificateChain `koanf:"certificate_chain"`
|
2021-01-04 10:28:55 +00:00
|
|
|
}
|
2022-08-08 21:50:12 +00:00
|
|
|
|
|
|
|
// ServerTimeouts represents server timeout configurations.
|
|
|
|
type ServerTimeouts struct {
|
|
|
|
Read time.Duration `koanf:"read"`
|
|
|
|
Write time.Duration `koanf:"write"`
|
|
|
|
Idle time.Duration `koanf:"idle"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ServerBuffers represents server buffer configurations.
|
|
|
|
type ServerBuffers struct {
|
|
|
|
Read int `koanf:"read"`
|
|
|
|
Write int `koanf:"write"`
|
|
|
|
}
|
2023-04-19 04:24:05 +00:00
|
|
|
|
|
|
|
// JWK represents a JWK.
|
|
|
|
type JWK struct {
|
|
|
|
KeyID string `koanf:"key_id"`
|
|
|
|
Use string
|
|
|
|
Algorithm string `koanf:"algorithm"`
|
|
|
|
Key CryptographicKey `koanf:"key"`
|
|
|
|
CertificateChain X509CertificateChain `koanf:"certificate_chain"`
|
|
|
|
}
|