Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateLeafCert ¶
func GenerateLeafCert(sni string, ca *CA, priv *rsa.PrivateKey) (*tls.Certificate, error)
Types ¶
type CA ¶
type CA struct {
CertBytes []byte
Certificate *x509.Certificate
PrivateKey *rsa.PrivateKey
}
func GenerateEphemeralCA ¶
type CertCache ¶
type CertCache struct {
// contains filtered or unexported fields
}
func NewCertCache ¶
func NewCertCache() *CertCache
func (*CertCache) GetCertificate ¶
type Gateway ¶
type Gateway struct {
CA *CA
CertCache *CertCache
SecretStore map[string]SecretConfig
Transport http.RoundTripper
InterceptorsDir string
// contains filtered or unexported fields
}
func NewGateway ¶
func NewGateway(secretStore map[string]SecretConfig, transport http.RoundTripper, interceptorsDir string) (*Gateway, error)
type SecretConfig ¶
type SecretConfig struct {
Kind SecretKind `yaml:"kind" json:"kind"`
HeaderName string `yaml:"header_name" json:"header_name"`
Value string `yaml:"value" json:"value"`
}
type SecretKind ¶
type SecretKind string
const ( SecretKindBearer SecretKind = "bearer" SecretKindCustomHeader SecretKind = "customheader" SecretKindBasicAuth SecretKind = "basicauth" )
Click to show internal directories.
Click to hide internal directories.