tlsconfig

package
v0.2.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

+kubebuilder:validation:Optional

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module is a fx module that constructs annotated instance of *tls.Config.

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 +kubebuilder:object:generate=true

func (*ClientTLSConfig) DeepCopy added in v0.1.2

func (in *ClientTLSConfig) DeepCopy() *ClientTLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTLSConfig.

func (*ClientTLSConfig) DeepCopyInto added in v0.1.2

func (in *ClientTLSConfig) DeepCopyInto(out *ClientTLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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
	ConfigKey     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"`
	// Enabled TLS
	Enabled bool `json:"enabled" default:"false"`
}

ServerTLSConfig holds configuration for setting up server TLS support. swagger:model +kubebuilder:object:generate=true

func (*ServerTLSConfig) DeepCopy added in v0.1.2

func (in *ServerTLSConfig) DeepCopy() *ServerTLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerTLSConfig.

func (*ServerTLSConfig) DeepCopyInto added in v0.1.2

func (in *ServerTLSConfig) DeepCopyInto(out *ServerTLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL