setup

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InetRefresh

func InetRefresh()

InetRefresh is just a dummy. It only has functionality in Windows

func ShowInternetOptions

func ShowInternetOptions()

ShowInternetOptions is just a dummy for now this is only used for Windows

Types

type Configurator

type Configurator interface {
	SetUp(proxyURL string) error
	SetDown() error
}

Configurator is a interface of setup ergo configuration

func GetConfigurator

func GetConfigurator(system string) Configurator

GetConfigurator gets the right configurator strategy for a given system

type DefaultRunner

type DefaultRunner struct{}

DefaultRunner implements the default runner for ergo

func (DefaultRunner) Run

func (r DefaultRunner) Run(command string, args ...string) error

Run a given command script

type LinuxConfigurator

type LinuxConfigurator struct{}

LinuxConfigurator implements Configurator for windows

func (*LinuxConfigurator) SetDown

func (c *LinuxConfigurator) SetDown() error

SetDown is responsible for remove the ergo as proxy

func (*LinuxConfigurator) SetUp

func (c *LinuxConfigurator) SetUp(proxyURL string) error

SetUp is responsible for setting up the ergo as proxy

type OSXConfigurator

type OSXConfigurator struct{}

OSXConfigurator implements Configurator for windows

func (*OSXConfigurator) SetDown

func (c *OSXConfigurator) SetDown() error

SetDown is responsible for remove the ergo as proxy

func (*OSXConfigurator) SetUp

func (c *OSXConfigurator) SetUp(proxyURL string) error

SetUp is responsible for setting up the ergo as proxy

type Runner

type Runner interface {
	Run(string, ...string) error
}

Runner is a process runner

var RunnerDefault Runner = &DefaultRunner{}

RunnerDefault run given commands

type WindowsConfigurator

type WindowsConfigurator struct{}

WindowsConfigurator implements Configurator for windows

func (*WindowsConfigurator) SetDown

func (c *WindowsConfigurator) SetDown() error

SetDown is responsible for remove the ergo as proxy

func (*WindowsConfigurator) SetUp

func (c *WindowsConfigurator) SetUp(proxyURL string) error

SetUp is responsible for setting up the ergo as proxy

Jump to

Keyboard shortcuts

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