config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
}

type Config

type Config struct {
	AuthURI    string     `json:"authURI"`
	FFSURI     string     `json:"ffsURI"`
	FFSQueries []FFSQuery `json:"ffsQueries"`
	Prometheus Prometheus `json:"prometheus,omitempty"`
}

Configuration File structs

func ReadConfig

func ReadConfig(configLocation string) (Config, error)

ReadConfig - read a configuration file from a specified location configLocation - string which contains the location of the configuration file Returns Config - config struct of the configuration file (can be a "new" struct as well) error - any errors which have been caught

type Elasticsearch

type Elasticsearch struct {
	NumberOfShards        int       `json:"numberOfShards,omitempty"`
	NumberOfReplicas      int       `json:"numberOfReplicas,omitempty"`
	IndexName             string    `json:"indexName,omitempty"`
	IndexTimeAppend       string    `json:"indexTimeAppend,omitempty"`
	IndexTimeGen          string    `json:"indexTimeGen,omitempty"`
	ElasticURL            string    `json:"elasticUrl,omitempty"`
	UseCustomIndexPattern bool      `json:"useCustomIndexPattern"`
	BasicAuth             BasicAuth `json:"basicAuth,omitempty"`
	Sniffing              bool      `json:"sniffing,omitempty"`
	BestCompression       bool      `json:"bestCompression,omitempty"`
	RefreshInterval       int       `json:"refreshInterval,omitempty"`
	Aliases               []string  `json:"aliases,omitempty"`
}

type FFSQuery

type FFSQuery struct {
	Name                 string        `json:"name"`
	Username             string        `json:"username"`
	Password             string        `json:"password"`
	Interval             string        `json:"interval"`
	TimeGap              string        `json:"timeGap"`
	Query                ffs.Query     `json:"query"`
	OutputType           string        `json:"outputType"`
	OutputLocation       string        `json:"outputLocation,omitempty"`
	IPAPI                IPAPI         `json:"ip-api,omitempty"`
	Elasticsearch        Elasticsearch `json:"elasticsearch,omitempty"`
	Logstash             Logstash      `json:"logstash,omitempty"`
	EsStandardized       bool          `json:"esStandardized,omitempty"`
	ValidIpAddressesOnly bool          `json:"validIpAddressesOnly"`
}

type IPAPI

type IPAPI struct {
	Enabled bool   `json:"enabled,omitempty"`
	URL     string `json:"url,omitempty"`
	APIKey  string `json:"apiKey,omitempty"`
	Fields  string `json:"fields,omitempty"`
	Lang    string `json:"lang,omitempty"`
}

type Logstash added in v0.1.0

type Logstash struct {
	LogstashURL string `json:"logstashURL"`
}

type Prometheus

type Prometheus struct {
	Enabled bool `json:"enabled,omitempty"`
	Port    int  `json:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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