conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory() (string, error)

Directory gets the config directory for a user

func Exists

func Exists(path string) bool

Exists checks if the config file exists in the given path

Types

type Conf

type Conf struct {
	// Version indicates the version of subfinder installed.
	Version string `yaml:"version"`
	// Sources contains a list of sources to use for enumeration
	Sources []string `yaml:"sources,omitempty"`
	Keys    struct {
		Chaos []string `yaml:"chaos"`
	}
}

Conf contains the fields stored in the configuration file

func UnmarshalRead

func UnmarshalRead(file string) (Conf, error)

UnmarshalRead reads the unmarshalled config yaml file from disk

func (*Conf) GetKeys

func (c *Conf) GetKeys() sources.Keys

GetKeys gets the API keys from config file and creates a Keys struct We use random selection of api keys from the list of keys supplied. Keys that require 2 options are separated by colon (:).

func (*Conf) MarshalWrite

func (c *Conf) MarshalWrite(file string) error

MarshalWrite writes the marshaled yaml config to disk

type Options

type Options struct {
	Configuration  string
	Domain         string
	ExcludeSources string
	UseSources     string
	YAMLConfig     Conf
}

Options is the structure of the options expected

func ParseOptions

func ParseOptions(options *Options) (*Options, error)

ParseOptions is a

Jump to

Keyboard shortcuts

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