cli: github.com/cloudfoundry/cli/api/cloudcontroller Index | Files | Directories

package cloudcontroller

import "github.com/cloudfoundry/cli/api/cloudcontroller"

Package cloudcontroller contains shared utilies between the V2 and V3 clients.

These sets of packages are still under development/pre-pre-pre...alpha. Use at your own risk! Functionality and design may change without warning.

Where are the clients?

These clients live in ccv2 and ccv3 packages. Each of them only works with the V2 and V3 api respectively.

Index

Package Files

cloud_controller_connection.go connection.go pipebomb.go request.go response.go

type CloudControllerConnection Uses

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

CloudControllerConnection represents a connection to the Cloud Controller server.

func NewConnection Uses

func NewConnection(config Config) *CloudControllerConnection

NewConnection returns a new CloudControllerConnection with provided configuration.

func (*CloudControllerConnection) Make Uses

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

Make performs the request and parses the response.

type Config Uses

type Config struct {
    DialTimeout       time.Duration
    SkipSSLValidation bool
}

Config is for configuring a CloudControllerConnection.

type Connection Uses

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

Connection creates and executes http requests

type Pipebomb Uses

type Pipebomb struct {
    io.ReadCloser
}

Pipebomb is a wrapper around an io.Pipe's io.ReadCloser that turns it into a ReadSeeker that errors on Seek calls.

func NewPipeBomb Uses

func NewPipeBomb() (*Pipebomb, io.WriteCloser)

NewPipeBomb returns an io.WriteCloser that can be used to stream data to a the Pipebomb.

func (*Pipebomb) Seek Uses

func (_ *Pipebomb) Seek(offset int64, whence int) (int64, error)

Seek returns a PipeSeekError; allowing the top level calling function to handle the retry instead of seeking back to the beginning of the Reader.

type Request Uses

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

Request represents the request of the cloud controller.

func NewRequest Uses

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

func (*Request) ResetBody Uses

func (r *Request) ResetBody() error

type Response Uses

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
}

Response represents a Cloud Controller response object.

Directories

PathSynopsis
ccerror
ccv2Package ccv2 represents a Cloud Controller V2 client.
ccv2/ccv2fakesThis file was generated by counterfeiter
ccv2/internal
ccv3Package ccv3 represents a Cloud Controller V3 client.
ccv3/ccv3fakesThis file was generated by counterfeiter
ccv3/internal
cloudcontrollerfakesThis file was generated by counterfeiter
wrapper
wrapper/util
wrapper/wrapperfakesThis file was generated by counterfeiter

Package cloudcontroller imports 12 packages (graph). Updated 2017-05-27. Refresh now. Tools for package owners.