cf

package
v0.0.0-...-85617d8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxResultsPerPage int = 5000

determined by CC API: https://v3-apidocs.cloudfoundry.org/version/3.76.0/index.html#get-a-route

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(host string, restClient Rest, uaaClient TokenFetcher) *Client

func (*Client) ListRoutes

func (c *Client) ListRoutes() (model.RouteList, error)

TODO: shouldn't this use the REST client?

func (*Client) UpdateBuild

func (c *Client) UpdateBuild(buildGUID string, build model.Build) error

func (*Client) UpdateDroplet

func (c *Client) UpdateDroplet(dropletGUID string, droplet model.Droplet) error

type ClientInterface

type ClientInterface interface {
	ListRoutes() (model.RouteList, error)
}

TODO: rename this to `Client`

type Rest

type Rest interface {
	Patch(url string, authToken string, body io.Reader) (*http.Response, error)
}

type RestClient

type RestClient struct {
	*http.Client
}

func (*RestClient) Patch

func (r *RestClient) Patch(url, authToken string, body io.Reader) (*http.Response, error)

type TokenFetcher

type TokenFetcher interface {
	Fetch() (string, error)
}

Directories

Path Synopsis
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