ccclient

package module
v0.0.0-...-2789681 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2015 License: Apache-2.0 Imports: 6 Imported by: 16

README

cloudcontroller-client wercker status GoDoc

Coverage Status

Documentation

Index

Constants

View Source
const (
	//URLPWSLogin - default pws login url
	URLPWSLogin = "https://login.run.pivotal.io"
	//RouteLogin - default oauth endpoint for cf
	RouteLogin = "/oauth/token"

	HeaderAuth = "Authorization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Error        string `json:"error"`
	ErrorDesc    string `json:"error_description"`
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	Scope        string `json:"scope"`
	Jti          string `json:"jti"`
	// contains filtered or unexported fields
}

Client - cloud controller client object

func New

func New(loginurl, user, pass string, client ClientDoer) *Client

New - creates a new cloud controller client

func (*Client) AccessTokenDecorate

func (s *Client) AccessTokenDecorate(req *http.Request)

AccessTokenDecorate - will decorate the given http.Request with the clients accesstoken aquired during the Login call

func (*Client) CreateAuthRequest

func (s *Client) CreateAuthRequest(verb, requestURL, path string, args interface{}) (*http.Request, error)

CreateAuthRequest - Creates a request w/ auth token added to the header to allow authenticated calls to the cloud controller

func (*Client) CreateRequest

func (s *Client) CreateRequest(verb, requestURL, path string, args interface{}) (*http.Request, error)

CreateRequest - Creates a request object targeted at the cloud controller

func (*Client) HttpClient

func (s *Client) HttpClient() ClientDoer

HttpClient - returns the internal client object

func (*Client) Login

func (s *Client) Login() (*Client, error)

Login - logs into the target cloud controller

type ClientDoer

type ClientDoer interface {
	Do(*http.Request) (*http.Response, error)
}

Directories

Path Synopsis
Godeps
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.

Jump to

Keyboard shortcuts

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