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) 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
Click to show internal directories.
Click to hide internal directories.