util

package
v0.0.0-...-769830f Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigParser

type ConfigParser struct {
}

ConfigParser is the struct for this implementation of IConfigParser.

func GetConfigParser

func GetConfigParser() *ConfigParser

GetConfigParser returns a pointer to an implementation of IConfigParser.

func (*ConfigParser) ParseYamlConfig

func (c *ConfigParser) ParseYamlConfig(path string) (models.Config, error)

ParseYamlConfig takes a string path to the yaml config file and returns a config model.

type IConfigParser

type IConfigParser interface {
	ParseYamlConfig(path string) (models.Config, error)
}

IConfigParser is the interface to use for parsing file configurations.

type ILookup

type ILookup interface {
	GetIP(domain string) (string, error)
}

ILookup is the interface for interacting with IPLookup services.

type Lookup

type Lookup struct {
	ILookup
}

Lookup is the struct for this implementation of ILookup.

func GetLookup

func GetLookup() *Lookup

GetLookup returns a pointer to an instance of this implementation of ILookup.

func (*Lookup) GetIP

func (l *Lookup) GetIP(domain string) (string, error)

GetIP takes a domain name and returns the DNS results for the IP of the given domain.

Jump to

Keyboard shortcuts

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