Documentation ¶
Index ¶
- type Accumulator
- type AppGuidCache
- type CapiClient
- func (c *CapiClient) Apps(query map[string]string) ([]models.App, error)
- func (c *CapiClient) CreateTask(appGuid, command string, cfg models.TaskConfig, opts ...models.HeaderOption) (models.Task, error)
- func (c *CapiClient) Process(appGuid, processType string) (models.Process, error)
- func (c *CapiClient) Scale(appGuid, processType string, instanceCount uint) error
- func (c *CapiClient) Stop(appGuid string) error
- type CapiDoer
- type CapiError
- type OauthClient
- type TokenCache
- type TokenWithExpiry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type Accumulator func(json.RawMessage) error
type AppGuidCache ¶
type AppGuidCache struct {
// contains filtered or unexported fields
}
func NewAppGuidCache ¶
func NewAppGuidCache(appGetter appGetter, spaceGuid string) *AppGuidCache
func (*AppGuidCache) Invalidate ¶
func (c *AppGuidCache) Invalidate()
func (*AppGuidCache) TryWithRefresh ¶
func (c *AppGuidCache) TryWithRefresh(appName string, f func(appGuid string) error) error
type CapiClient ¶
type CapiClient struct {
// contains filtered or unexported fields
}
func NewCapiClient ¶
func NewCapiClient(requestor capiRequestor) *CapiClient
func (*CapiClient) CreateTask ¶
func (c *CapiClient) CreateTask(appGuid, command string, cfg models.TaskConfig, opts ...models.HeaderOption) (models.Task, error)
func (*CapiClient) Process ¶
func (c *CapiClient) Process(appGuid, processType string) (models.Process, error)
func (*CapiClient) Scale ¶
func (c *CapiClient) Scale(appGuid, processType string, instanceCount uint) error
func (*CapiClient) Stop ¶
func (c *CapiClient) Stop(appGuid string) error
type CapiDoer ¶
type CapiDoer struct {
// contains filtered or unexported fields
}
func NewCapiDoer ¶
func (*CapiDoer) Do ¶
func (c *CapiDoer) Do(method, path, body string, v interface{}, opts ...models.HeaderOption) error
func (*CapiDoer) GetPagedResources ¶
func (c *CapiDoer) GetPagedResources(path string, a Accumulator, opts ...models.HeaderOption) error
type CapiError ¶
type CapiError struct { ResponseCode int // contains filtered or unexported fields }
type OauthClient ¶
type OauthClient struct {
// contains filtered or unexported fields
}
func NewClientCredentialsOauthClient ¶
func NewClientCredentialsOauthClient(httpClient httpClient, oauthUrl, client, secret string) *OauthClient
func NewUserOauthClient ¶
func NewUserOauthClient(httpClient httpClient, oauthUrl, username, password string) *OauthClient
func (*OauthClient) Token ¶
func (c *OauthClient) Token() (string, error)
func (*OauthClient) TokenWithExpiry ¶
func (c *OauthClient) TokenWithExpiry() (TokenWithExpiry, error)
type TokenCache ¶
func NewTokenCache ¶
func NewTokenCache(tokenGetter tokenWithExpiryGetter) *TokenCache
func (*TokenCache) Token ¶
func (c *TokenCache) Token() (string, error)
type TokenWithExpiry ¶
Click to show internal directories.
Click to hide internal directories.