config

package
v0.0.0-...-386a0b5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config implements a global configuration to be used with gophish.

Index

Constants

View Source
const ServerName = "gophish"

ServerName is the server type that is returned in the transparency response.

Variables

View Source
var Version = ""

Version contains the current gophish version

Functions

func LoadConfig

func LoadConfig(filepath string) error

LoadConfig loads the configuration from the specified filepath

Types

type AdminServer

type AdminServer struct {
	ListenURL string `json:"listen_url"`
	UseTLS    bool   `json:"use_tls"`
	CertPath  string `json:"cert_path"`
	KeyPath   string `json:"key_path"`
}

AdminServer represents the Admin server configuration details

type Config

type Config struct {
	AdminConf           AdminServer   `json:"admin_server"`
	PhishConf           PhishServer   `json:"phish_server"`
	DBName              string        `json:"db_name"`
	DBPath              string        `json:"db_path"`
	MigrationsPath      string        `json:"migrations_prefix"`
	TestFlag            bool          `json:"test_flag"`
	ContactAddress      string        `json:"contact_address"`
	Logging             LoggingConfig `json:"logging"`
	SsoKey              string        `json:"sso_key"`
	ViaProxy            string        `json:"via_proxy"`
	Production          string        `json:"production"`
	UserSyncApiUser     string        `json:"usersync_api_user"`
	UserSyncApiPassword string        `json:"usersync_api_password"`
	ByPassSso           string        `json:"bypass_sso"`
}

Config represents the configuration information.

var Conf Config

Conf contains the initialized configuration struct

type LoggingConfig

type LoggingConfig struct {
	Filename string `json:"filename"`
}

LoggingConfig represents configuration details for Gophish logging.

type PhishServer

type PhishServer struct {
	ListenURL string `json:"listen_url"`
	UseTLS    bool   `json:"use_tls"`
	CertPath  string `json:"cert_path"`
	KeyPath   string `json:"key_path"`
}

PhishServer represents the Phish server configuration details

Jump to

Keyboard shortcuts

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