env

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package env handles environment variable.

Index

Constants

View Source
const (
	// Mode indicates if this wallhack instance shall be run in "server" or "client" mode.
	Mode = "WALLHACK_MODE"
	// Certificate wallhack shall use to authenticate against its peer. This is not a file name but the certificate itself.
	Certificate = "WALLHACK_CERTIFICATE"
	// Key wallhack shall use to encrypt traffic to its peer. This is not a file name but the key itself.
	Key = "WALLHACK_KEY"
	// CA wallhack shall use to authenticate its peer peer. This is not a file name but the certificate itself.
	CA = "WALLHACK_CA"
	// ServerAddr is the address a client shall connect to.
	ServerAddr = "WALLHACK_SERVER"
)

Variables

This section is empty.

Functions

func CreateTLSConfig

func CreateTLSConfig() (*tls.Config, error)

CreateTLSConfig using environment variable names defined above.

func Lookup

func Lookup(name string) (string, error)

Lookup the environment variable name and return an error if not found. Just a wrapper for os.Lookup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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