commands

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: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddServiceCommand added in v0.2.2

type AddServiceCommand struct {
	Service proxy.Service
}

AddServiceCommand Allows to add new services to existing configuration file Usage: `ergo add service servicehost:port`

func (AddServiceCommand) Execute added in v0.2.2

func (c AddServiceCommand) Execute(config *proxy.Config) (string, error)

Execute apply the AddServiceCommand

type Command added in v0.2.2

type Command interface {
	Execute(config *proxy.Config) (string, error)
}

Command is the interface for a command in ergo returns a string with the result of the execution or a error

type ListCommand added in v0.2.2

type ListCommand struct{}

ListCommand lists all configured apps local url and its original urls. Usage: `ergo list`

func (ListCommand) Execute added in v0.2.2

func (c ListCommand) Execute(config *proxy.Config) (string, error)

Execute apply the ListCommand

type ListNameCommand added in v0.2.2

type ListNameCommand struct{}

ListNameCommand lists all configured apps names and its urls. Usage: `ergo list-names`

func (ListNameCommand) Execute added in v0.2.2

func (c ListNameCommand) Execute(config *proxy.Config) (string, error)

Execute apply the ListNameCommand

type RemoveServiceCommand added in v0.2.2

type RemoveServiceCommand struct {
	Service proxy.Service
}

RemoveServiceCommand removes a service from the configuration and tells the proxy to remove it from the config file. USAGE: ergo remove myservicename

func (RemoveServiceCommand) Execute added in v0.2.2

func (c RemoveServiceCommand) Execute(config *proxy.Config) (string, error)

Execute apply the RemoveServiceCommand

type RunCommand added in v0.2.2

type RunCommand struct{}

RunCommand starts the ergo proxy server.

Usage: `ergo run`

func (RunCommand) Execute added in v0.2.2

func (c RunCommand) Execute(config *proxy.Config) (string, error)

Execute apply the RunCommand

type SetupCommand added in v0.2.2

type SetupCommand struct {
	System string
	Remove bool
}

SetupCommand tries set ergo as the proxy on networking settings. For now, this feature is only supported for:

- OSX
- Linux-gnome
- Windows

Usage:

`ergo setup osx`

func (SetupCommand) Execute added in v0.2.2

func (c SetupCommand) Execute(config *proxy.Config) (string, error)

Execute apply the SetupCommand

type URLCommand added in v0.2.2

type URLCommand struct {
	FilterName string
}

URLCommand find and print the url for a given app name. Usage: `ergo url foo`

func (URLCommand) Execute added in v0.2.2

func (c URLCommand) Execute(config *proxy.Config) (string, error)

Execute apply the URLCommand

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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