utils

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFullPathFile

func GetFullPathFile(file string) string

func GetTlsConfig added in v0.2.0

func GetTlsConfig(conf *TlsConfig) (*tls.Config, error)

Types

type TlsConfig

type TlsConfig struct {
	//public key of ca
	CaPem string `json:"caPem"`
	//public key of client or server
	Pem string `json:"pem"`
	//private key of client
	Key string `json:"key"`
	//if the CaPam and Key are empty, set the ServerNameOverride is the name of the pem
	ServerNameOverride string `json:"serverNameOverride"`
}

TlsConfig case the CaPem Pem Key are not empty, both tls case only the Pem is not empty, server tls, if the ServerNameOverride exist, then set the ServerNameOverride that it make the pam and key

Jump to

Keyboard shortcuts

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