util

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source, dest string)

CopyFile copies a file from the source to the provided destination

func DownloadFile

func DownloadFile(url string, target string) error

DownloadFile downloads a file and saves it to the given path

func GenerateDHParams

func GenerateDHParams()

GenerateDHParams for NginX DHE key exchange (strength of 4096bit) using -dsaparam to disable prime number check => speedup (but not less secure!)

func RunAndPrintCommandOutput

func RunAndPrintCommandOutput(cmd *exec.Cmd)

RunAndPrintCommandOutput calls the given command and prints the output - line by line - into the console

func SetupFileStructure

func SetupFileStructure()

SetupFileStructure creates all required folder for NginX and moves the delivered nginx file structure to /etc/nginx

func SetupInitD

func SetupInitD()

SetupInitD downloads the recommended LSB compliant init.d script for NginX

func SetupNginxUser

func SetupNginxUser()

SetupNginxUser creates the nginx group and user and assigns ownership to nginx directories

func SetupSystemd

func SetupSystemd()

SetupSystemd sets up the recommended nginx.service file

Types

type CTLogProvider

type CTLogProvider struct {
	Name string
	Key  string
	URL  string
}

CTLogProvider holds information about a CTLogProvider, currently active in Chrome

func (CTLogProvider) Submit

func (ctLog CTLogProvider) Submit(payload []byte, outputFile string, wg *sync.WaitGroup)

Submit the given payload to the CTLogProvider and write the response into the given output file

type Config

type Config struct {
	NginXVersion   string
	PCREVersion    string
	ZLibVersion    string
	OpenSSLVersion string
	Configuration  string
	Modules        string
}

Config - Wrapper for the toml config

func GetConfig

func GetConfig() (*Config, error)

GetConfig from the toml config

Jump to

Keyboard shortcuts

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