cli

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calls

type Calls interface {
	GetJSON(path string) (string, error)
	PostJSON(path string, jsonBody string) (string, error)
	PatchJSON(path string, jsonBody string) (string, error)
}

Calls cli curl calls

type CfExecutor

type CfExecutor interface {
	Execute(arguments []string) (err error)
}

func NewExecutor

func NewExecutor(traceLogging bool) CfExecutor

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection cli connection object

func NewCli

func NewCli(conn plugin.CliConnection, traceLogging bool) *Connection

NewCli ff

func (*Connection) GetJSON

func (conn *Connection) GetJSON(path string) (string, error)

GetJSON make an get call to an url

func (*Connection) PatchJSON

func (conn *Connection) PatchJSON(path string, jsonBody string) (string, error)

PatchJSON post to path with json body

func (*Connection) PostJSON

func (conn *Connection) PostJSON(path string, jsonBody string) (string, error)

PostJSON post to path with json body

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

HttpConnection

func (Executor) Execute

func (ec Executor) Execute(arguments []string) (err error)

type FakeExecutor

type FakeExecutor struct {
	// contains filtered or unexported fields
}

Test struct for executro

func (*FakeExecutor) Execute

func (tx *FakeExecutor) Execute(arguments []string) (err error)

func (*FakeExecutor) ExecutorArgumentsOutput

func (tx *FakeExecutor) ExecutorArgumentsOutput() map[int][]string

func (*FakeExecutor) ExecutorCallCount

func (tx *FakeExecutor) ExecutorCallCount() int

func (*FakeExecutor) NewFakeExecutor

func (tx *FakeExecutor) NewFakeExecutor() CfExecutor

type HttpCalls

type HttpCalls interface {
	PostJSON(path string, body []byte) (string, error)
	PostFormData(path string, body []byte, contentType string) (string, error)
}

Calls interface

type HttpConnection

type HttpConnection struct {
	// contains filtered or unexported fields
}

HttpConnection

func NewHttpClient

func NewHttpClient(cliConnection plugin.CliConnection, traceLogging bool, timeout int, skipSSLValidation bool) *HttpConnection

NewHttpClient ff

func (*HttpConnection) PostFormData

func (conn *HttpConnection) PostFormData(path string, body []byte, contentType string) (string, error)

func (*HttpConnection) PostJSON

func (conn *HttpConnection) PostJSON(path string, body []byte) (string, error)

Jump to

Keyboard shortcuts

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