config

package
v0.0.0-...-c4f21ae Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLog

func CreateLog(timestamp time.Time) (*os.File, error)

CreateLog checks for existence of a 'results' folder in current directory and creates and opens a log file for the current run.

Types

type Config

type Config struct {
	Server   Server
	Settings Settings
	Session  Session
}

Config holds all information parsed from supplied config file.

func LoadConfig

func LoadConfig(configFile string) (*Config, error)

LoadConfig decodes the config file and creates a Config object.

type Server

type Server struct {
	Addr string
	TLS  bool
}

Server holds all server information including hostname and port.

type Session

type Session struct {
	MinLength int
	MaxLength int
}

Session holds all information about the length of one session.

type Settings

type Settings struct {
	Threads  int
	Sessions int
	Seed     int64
	Throttle int
}

Settings holds all global parameters such as the number of threads and the seed to generate the involved IMAP commands.

type User

type User struct {
	Username string
	Password string
}

User represents a user by name and password.

func LoadUsers

func LoadUsers(userdbFile string) ([]User, error)

LoadUsers populates all users from supplied file into a slice of above User struct.

Jump to

Keyboard shortcuts

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