cli_plugin

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const AllowCommand = "allow-access"
View Source
const DenyCommand = "deny-access" //deprecated
View Source
const ListCommand = "list-access"
View Source
const MaxPort = 65535
View Source
const MinPort = 1
View Source
const RemoveCommand = "remove-access"

Variables

View Source
var AllowUsageRegex = fmt.Sprintf(`\A%s\s+\S+\s+\S+\s+(--|-)\w+(\s+|=)\w+\s+(--|-)\w+(\s+|=)\w+\z`, AllowCommand)
View Source
var DenyUsageRegex = fmt.Sprintf(`\A%s\s+\S+\s+\S+\s+(--|-)\w+(\s+|=)\w+\s+(--|-)\w+(\s+|=)\w+\z`, DenyCommand)
View Source
var ListUsageRegex = fmt.Sprintf(`\A%s\s*(--app(\s+|=)\S+\z|\z)`, ListCommand)
View Source
var RemoveUsageRegex = fmt.Sprintf(`\A%s\s+\S+\s+\S+\s+(--|-)\w+(\s+|=)\w+\s+(--|-)\w+(\s+|=)\w+\z`, RemoveCommand)

Functions

This section is empty.

Types

type CommandRunner added in v0.3.0

type CommandRunner struct {
	Styler        *styles.StyleGroup
	Logger        *log.Logger
	PolicyClient  policy_client.ExternalPolicyClient
	CliConnection plugin.CliConnection
	Args          []string
}

func (*CommandRunner) Allow added in v0.3.0

func (r *CommandRunner) Allow() (string, error)

func (*CommandRunner) List added in v0.3.0

func (r *CommandRunner) List() (string, error)

func (*CommandRunner) Remove added in v0.7.0

func (r *CommandRunner) Remove() (string, error)

type Plugin

type Plugin struct {
	Styler       *styles.StyleGroup
	Logger       *log.Logger
	PolicyClient policy_client.ExternalPolicyClient
}

func (*Plugin) GetMetadata

func (p *Plugin) GetMetadata() plugin.PluginMetadata

func (*Plugin) Run

func (p *Plugin) Run(cliConnection plugin.CliConnection, args []string)

func (*Plugin) RunWithErrors

func (p *Plugin) RunWithErrors(cliConnection plugin.CliConnection, args []string) (string, error)

type ValidArgs

type ValidArgs struct {
	SourceAppName string
	DestAppName   string
	Protocol      string
	Port          int
}

func ValidateArgs

func ValidateArgs(cliConnection plugin.CliConnection, args []string) (ValidArgs, error)

Jump to

Keyboard shortcuts

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