tlscfg

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFlagsConfig

type ClientFlagsConfig struct {
	Prefix         string
	ShowEnabled    bool
	ShowServerName bool
}

ClientFlagsConfig describes which CLI flags for TLS client should be generated.

func (ClientFlagsConfig) AddFlags

func (c ClientFlagsConfig) AddFlags(flags *flag.FlagSet)

AddFlags adds flags for TLS to the FlagSet.

func (ClientFlagsConfig) InitFromViper

func (c ClientFlagsConfig) InitFromViper(v *viper.Viper) Options

InitFromViper creates tls.Config populated with values retrieved from Viper.

type Options

type Options struct {
	Enabled      bool
	CAPath       string
	CertPath     string
	KeyPath      string
	ServerName   string // only for client-side TLS config
	ClientCAPath string // only for server-side TLS config for client auth
}

Options describes the configuration properties for TLS Connections.

func (Options) Config

func (p Options) Config() (*tls.Config, error)

Config loads TLS certificates and returns a TLS Config.

type ServerFlagsConfig

type ServerFlagsConfig struct {
	Prefix       string
	ShowEnabled  bool
	ShowClientCA bool
}

ServerFlagsConfig describes which CLI flags for TLS server should be generated.

func (ServerFlagsConfig) AddFlags

func (c ServerFlagsConfig) AddFlags(flags *flag.FlagSet)

AddFlags adds flags for TLS to the FlagSet.

func (ServerFlagsConfig) InitFromViper

func (c ServerFlagsConfig) InitFromViper(v *viper.Viper) Options

InitFromViper creates tls.Config populated with values retrieved from Viper.

Jump to

Keyboard shortcuts

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