Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientTLSConfig ¶
type ClientTLSConfig struct {
CertFile string `json:"cert_file" validate:"omitempty,file"`
KeyFile string `json:"key_file" validate:"omitempty,file"`
CAFile string `json:"ca_file" validate:"omitempty,file"`
KeyLogWriter string `json:"key_log_file" validate:"omitempty,file"`
InsecureSkipVerify bool `json:"insecure_skip_verify"`
}
ClientTLSConfig is the config for client TLS. swagger:model
func (*ClientTLSConfig) GetGRPCDialOptions ¶
func (c *ClientTLSConfig) GetGRPCDialOptions(insecureEnabled bool) ([]grpc.DialOption, error)
GetGRPCDialOptions creates GRPC DialOptions for TLS.
func (*ClientTLSConfig) GetTLSConfig ¶
func (c *ClientTLSConfig) GetTLSConfig() (*tls.Config, error)
GetTLSConfig initializes tls.Config from config options.
type Constructor ¶
type Constructor struct {
Name string
Key string
DefaultConfig ServerTLSConfig
}
Constructor holds fields to create an annotated instance of *tls.Config.
func (Constructor) Annotate ¶
func (constructor Constructor) Annotate() fx.Option
Annotate creates an annotated instance of *tls.Config.
type ServerTLSConfig ¶
type ServerTLSConfig struct {
// Path to credentials. This can be set via command line arguments as well.
CertsPath string `json:"certs_path"`
// Server Cert file
ServerCert string `json:"server_cert" default:"ca.crt"`
// Server Key file
ServerKey string `json:"server_key" default:"ca.key"`
// Client CA file
ClientCA string `json:"client_ca" validate:"omitempty"`
// Allowed CN
AllowedCN string `json:"allowed_cn" validate:"omitempty,fqdn"`
// Enable TLS
Enable bool `json:"enable" default:"false"`
}
ServerTLSConfig holds configuration for setting up server TLS support. swagger:model
Click to show internal directories.
Click to hide internal directories.