Documentation
¶
Overview ¶
Cloud Foundy/PivotalCF client library
This library is able to connect to any Cloud Fondry instance and perform various operations.
Index ¶
- Variables
- type App
- type AppUpdate
- type Archetype
- type Domain
- type Error
- type FileInfo
- type Info
- type Instance
- type NewApp
- type Organization
- type Route
- type Service
- type Space
- type Summary
- type Target
- func (target *Target) AppAddRoute(appGUID, routeGUID string) (err error)
- func (target *Target) AppCreate(app *NewApp) (ret *App, err error)
- func (target *Target) AppDelete(appGUID string) (err error)
- func (target *Target) AppDeleteRoute(appGUID, routeGUID string) (err error)
- func (target *Target) AppGet(appGUID, instance, file string) (reader io.Reader, err error)
- func (target *Target) AppInstances(appGUID string) (instances map[string]Instance, err error)
- func (target *Target) AppLs(appGUID, instance, dir string) (files []FileInfo, err error)
- func (target *Target) AppPush(appGUID string, archetypes []*Archetype) (err error)
- func (target *Target) AppPushArchive(appGUID string, reader io.Reader) (err error)
- func (target *Target) AppRoutesGet(appGUID string) (routes []Route, err error)
- func (target *Target) AppStart(appGUID string) (resp *http.Response, err error)
- func (target *Target) AppStop(appGUID string) (resp *http.Response, err error)
- func (target *Target) AppUpdate(app *AppUpdate) (ret *App, err error)
- func (target *Target) AppsGet() (apps []App, err error)
- func (target *Target) DomainsGet() (domains []Domain, err error)
- func (target *Target) GetServices() (services []Service, err error)
- func (target *Target) Info() (info Info, err error)
- func (target *Target) Login(username, pass string) error
- func (target *Target) Logout()
- func (target *Target) OrganizationsGet() (orgs []Organization, err error)
- func (target *Target) RouteCreate(host, domainGUID, spaceGUID string) (err error)
- func (target *Target) RouteDelete(routeGUID string) (err error)
- func (target *Target) RoutesGet() (routes []Route, err error)
- func (target *Target) SpacesGet() (spaces []Space, err error)
- func (target *Target) Summary(spaceGUID string) (summary *Summary, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Enables Logging Trace bool = false // Writer used for tracing (osdefault .Stderr) Out io.Writer = os.Stderr )
View Source
var HttpClient = http.DefaultClient
HttpClient used for HTTP Requests. Replace with different http client if needed.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Info ¶
type Info struct { Name string `json:"name"` Build string `json:"build"` Support string `json:"support"` Version int `json:"version"` Description string `json:"description"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` ApiVersion string `json:"api_version"` }
type NewApp ¶
type NewApp struct { SpaceGUID string `json:"space_guid"` Name string `json:"name"` Instances int `json:"instances"` Memory int `json:"memory"` Buildpack *string `json:"buildpack"` Command *string `json:"command"` StackGUID *string `json:"stack_guid"` }
Structure used to create a new application.
type Organization ¶
type Organization struct {
// contains filtered or unexported fields
}
type Target ¶
type Target struct { TargetUrl string Username string TokenEndpoint string AccessToken string RefreshToken string }
Target is the centra structure of this library. All the API remote operatins are performed on Target
func (*Target) AppAddRoute ¶
func (*Target) AppDeleteRoute ¶
func (*Target) AppInstances ¶
func (*Target) AppPush ¶
AppPush creates a zip archive from all the provided atchetypes and upload the archive to the server with relevant application uuid TODO: implement resources diff
func (*Target) AppPushArchive ¶
func (*Target) AppRoutesGet ¶
func (*Target) DomainsGet ¶
GetDomains returns a slice of registered domains for given space
func (*Target) GetServices ¶
func (*Target) OrganizationsGet ¶
func (target *Target) OrganizationsGet() (orgs []Organization, err error)
GetOrtanizations returns a slice of all organizations
func (*Target) RouteCreate ¶
func (*Target) RouteDelete ¶
Click to show internal directories.
Click to hide internal directories.