cfnetworking

package
v6.29.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorWrapper

func NewErrorWrapper() *errorWrapper

Types

type Config

type Config struct {
	DialTimeout       time.Duration
	SkipSSLValidation bool
}

Config is for configuring a NetworkingConnection.

type Connection

type Connection interface {
	Make(request *Request, passedResponse *Response) error
}

Connection creates and executes http requests

type NetworkingConnection

type NetworkingConnection struct {
	HTTPClient *http.Client
	UserAgent  string
}

NetworkingConnection represents a connection to the Cloud Controller server.

func NewConnection

func NewConnection(config Config) *NetworkingConnection

NewConnection returns a new NetworkingConnection with provided configuration.

func (*NetworkingConnection) Make

func (connection *NetworkingConnection) Make(request *Request, passedResponse *Response) error

Make performs the request and parses the response.

type ReadSeeker

type ReadSeeker interface {
	io.ReadSeeker
}

type Request

type Request struct {
	*http.Request
	// contains filtered or unexported fields
}

Request represents the request of the cloud controller.

func NewRequest

func NewRequest(request *http.Request, body io.ReadSeeker) *Request

func (*Request) ResetBody

func (r *Request) ResetBody() error

type Response

type Response struct {
	// Result represents the resource entity type that is expected in the
	// response JSON.
	Result interface{}

	// RawResponse represents the response body.
	RawResponse []byte

	// Warnings represents warnings parsed from the custom warnings headers of a
	// Cloud Controller response.
	Warnings []string

	// HTTPResponse represents the HTTP response object.
	HTTPResponse *http.Response

	// ResourceLocationURL represents the Location header value
	ResourceLocationURL string
}

Response represents a Cloud Controller response object.

Directories

Path Synopsis
Package cfnetv1 represents a CF Networking V1 client.
Package cfnetv1 represents a CF Networking V1 client.
cfnetv1fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
wrapperfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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