Documentation ¶
Overview ¶
Package heroku is a client interface to the Heroku API.
Background ¶
This package provides a complete interface to all of the Heroku Platform API v3 actions, and is almost entirely auto-generated based on the API's JSON Schema. The exceptions are the files heroku.go, heroku_test.go, and app_test.go, as well as the generator itself. All models are auto-generated by the Ruby script in gen/gen.rb.
The client leverages Go's powerful net/http Client. That means that, out-of-the-box, it has keep-alive support and the ability to handle many concurrent requests from different goroutines.
You should have at least some understanding of Heroku and its Platform API: https://devcenter.heroku.com/articles/platform-api-reference
Installation ¶
This package is targeted towards Go 1.2 or later, though it may work on earlier versions as well.
Run `go get github.com/ctrlaltdel121/heroku-go` to download, build, and install the package.
Getting Started ¶
To use the client, first add it to your Go file's imports list:
import ( "github.com/ctrlaltdel121/heroku-go" )
Then create a Client object and make calls to it:
client := heroku.Client{Username: "email@me.com", Password: "my-api-key"} // pass nil for options if you don't need to set any optional params app, err := client.AppCreate(nil) if err != nil { panic(err) } fmt.Println("Created", app.Name) // Output: // Created dodging-samurai-42
That's it! Here is a more advanced example that also sets some options on the new app:
name := "myapp" region := "region" // Optional values need to be provided as pointers. If a field in an option // struct is nil (not provided), the option is omitted from the API request. opts := heroku.AppCreateOpts{Name: &name, Region: ®ion} // Create an app with options set: app2, err := client.AppCreate(&opts) if err != nil { // if this is a heroku.Error, it will contain details about the error if hkerr, ok := err.(heroku.Error); ok { panic(fmt.Sprintf("Error id=%s message=%q", hkerr.Id, hkerr)) } } fmt.Printf("created app2: name=%s region=%s", app2.Name, app2.Region.Name) // Output: // created app2: name=myapp region=eu
Optional Parameters ¶
Many of the Heroku Platform API actions have optional parameters. For example, when creating an app, you can either specify a custom name, or allow the API to choose a random haiku name for your app.
Optional parameters in heroku-go are always provided to functions as a pointer to a struct, such as AppCreateOpts for the function AppCreate(). If you do not wish to set any optional parameters, simply provide a nil in place of the options struct, and the options will be omitted from the API request entirely. For any individual options that you don't want to set, simply leave them as nil, and they will be omitted from the API request.
List Ranges & Sorting
Results from the Heroku API are paginated. You can specify a field for sorting and adjust the maximum number of records returned by providing a ListRange to API calls that list objects:
apps, err = client.AppList(&heroku.ListRange{Field: "name", Max: 1000})
Note Field is required when setting any range options.
Index ¶
- Constants
- type Account
- type AccountFeature
- type AccountUpdateOpts
- type Addon
- type AddonAttachment
- type AddonCreateOpts
- type AddonPlanPrice
- type AddonService
- type App
- type AppCreateOpts
- type AppFeature
- type AppTransfer
- type AppUpdateOpts
- type AttachmentAddon
- type Client
- func (c *Client) APIReq(v interface{}, meth, path string, body interface{}) error
- func (c *Client) AccountChangeEmail(password string, email string) (*Account, error)
- func (c *Client) AccountChangePassword(newPassword string, password string) (*Account, error)
- func (c *Client) AccountFeatureInfo(accountFeatureIdentity string) (*AccountFeature, error)
- func (c *Client) AccountFeatureList(lr *ListRange) ([]AccountFeature, error)
- func (c *Client) AccountFeatureUpdate(accountFeatureIdentity string, enabled bool) (*AccountFeature, error)
- func (c *Client) AccountInfo() (*Account, error)
- func (c *Client) AccountUpdate(password string, options *AccountUpdateOpts) (*Account, error)
- func (c *Client) AddonAttachmentCreate(appIdentity, addonName, attachmentName string, attachForce bool) (*AddonAttachment, error)
- func (c *Client) AddonAttachmentDelete(attachmentIdentity string) error
- func (c *Client) AddonAttachmentInfo(appIdentity string, attachmentIdentity string) (*AddonAttachment, error)
- func (c *Client) AddonAttachmentList(addonIdentity string) ([]AddonAttachment, error)
- func (c *Client) AddonAttachmentListAll() ([]AddonAttachment, error)
- func (c *Client) AddonCreate(appIdentity string, plan string, options *AddonCreateOpts) (*Addon, error)
- func (c *Client) AddonDelete(appIdentity string, addonIdentity string) error
- func (c *Client) AddonInfo(appIdentity string, addonIdentity string) (*Addon, error)
- func (c *Client) AddonList(appIdentity string, lr *ListRange) ([]Addon, error)
- func (c *Client) AddonListAll() ([]Addon, error)
- func (c *Client) AddonServiceInfo(addonServiceIdentity string) (*AddonService, error)
- func (c *Client) AddonServiceList(lr *ListRange) ([]AddonService, error)
- func (c *Client) AddonUpdate(appIdentity string, addonIdentity string, plan string) (*Addon, error)
- func (c *Client) AppCreate(options *AppCreateOpts) (*App, error)
- func (c *Client) AppDelete(appIdentity string) error
- func (c *Client) AppFeatureInfo(appIdentity string, appFeatureIdentity string) (*AppFeature, error)
- func (c *Client) AppFeatureList(appIdentity string, lr *ListRange) ([]AppFeature, error)
- func (c *Client) AppFeatureUpdate(appIdentity string, appFeatureIdentity string, enabled bool) (*AppFeature, error)
- func (c *Client) AppInfo(appIdentity string) (*App, error)
- func (c *Client) AppList(lr *ListRange) ([]App, error)
- func (c *Client) AppTransferCreate(app string, recipient string) (*AppTransfer, error)
- func (c *Client) AppTransferDelete(appTransferIdentity string) error
- func (c *Client) AppTransferInfo(appTransferIdentity string) (*AppTransfer, error)
- func (c *Client) AppTransferList(lr *ListRange) ([]AppTransfer, error)
- func (c *Client) AppTransferUpdate(appTransferIdentity string, state string) (*AppTransfer, error)
- func (c *Client) AppUpdate(appIdentity string, options *AppUpdateOpts) (*App, error)
- func (c *Client) CollaboratorCreate(appIdentity string, user string, options *CollaboratorCreateOpts) (*Collaborator, error)
- func (c *Client) CollaboratorDelete(appIdentity string, collaboratorIdentity string) error
- func (c *Client) CollaboratorInfo(appIdentity string, collaboratorIdentity string) (*Collaborator, error)
- func (c *Client) CollaboratorList(appIdentity string, lr *ListRange) ([]Collaborator, error)
- func (c *Client) ConfigVarInfo(appIdentity string) (map[string]string, error)
- func (c *Client) ConfigVarUpdate(appIdentity string, options map[string]*string) (map[string]string, error)
- func (c *Client) Delete(path string) error
- func (c *Client) DoReq(req *http.Request, v interface{}) error
- func (c *Client) DomainCreate(appIdentity string, hostname string) (*Domain, error)
- func (c *Client) DomainDelete(appIdentity string, domainIdentity string) error
- func (c *Client) DomainInfo(appIdentity string, domainIdentity string) (*Domain, error)
- func (c *Client) DomainList(appIdentity string, lr *ListRange) ([]Domain, error)
- func (c *Client) DynoCreate(appIdentity string, command string, options *DynoCreateOpts) (*Dyno, error)
- func (c *Client) DynoInfo(appIdentity string, dynoIdentity string) (*Dyno, error)
- func (c *Client) DynoList(appIdentity string, lr *ListRange) ([]Dyno, error)
- func (c *Client) DynoRestart(appIdentity string, dynoIdentity string) error
- func (c *Client) DynoRestartAll(appIdentity string) error
- func (c *Client) DynoStatus(appIdentity string, dynoIdentity string) (*DynoStatus, error)
- func (c *Client) FormationBatchUpdate(appIdentity string, updates []FormationBatchUpdateOpts) ([]Formation, error)
- func (c *Client) FormationInfo(appIdentity string, formationIdentity string) (*Formation, error)
- func (c *Client) FormationList(appIdentity string, lr *ListRange) ([]Formation, error)
- func (c *Client) FormationUpdate(appIdentity string, formationIdentity string, options *FormationUpdateOpts) (*Formation, error)
- func (c *Client) Get(v interface{}, path string) error
- func (c *Client) GlobalAddonInfo(addonIdentity string) (*Addon, error)
- func (c *Client) KeyCreate(publicKey string) (*Key, error)
- func (c *Client) KeyDelete(keyIdentity string) error
- func (c *Client) KeyInfo(keyIdentity string) (*Key, error)
- func (c *Client) KeyList(lr *ListRange) ([]Key, error)
- func (c *Client) LogDrainCreate(appIdentity string, url string) (*LogDrain, error)
- func (c *Client) LogDrainDelete(appIdentity string, logDrainIdentity string) error
- func (c *Client) LogDrainInfo(appIdentity string, logDrainIdentity string) (*LogDrain, error)
- func (c *Client) LogDrainList(appIdentity string, lr *ListRange) ([]LogDrain, error)
- func (c *Client) LogSessionCreate(appIdentity string, options *LogSessionCreateOpts) (*LogSession, error)
- func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error)
- func (c *Client) OAuthAuthorizationCreate(scope []string, options *OAuthAuthorizationCreateOpts) (*OAuthAuthorization, error)
- func (c *Client) OAuthAuthorizationDelete(oauthAuthorizationIdentity string) error
- func (c *Client) OAuthAuthorizationInfo(oauthAuthorizationIdentity string) (*OAuthAuthorization, error)
- func (c *Client) OAuthAuthorizationList(lr *ListRange) ([]OAuthAuthorization, error)
- func (c *Client) OAuthClientCreate(name string, redirectUri string) (*OAuthClient, error)
- func (c *Client) OAuthClientDelete(oauthClientIdentity string) error
- func (c *Client) OAuthClientInfo(oauthClientIdentity string) (*OAuthClient, error)
- func (c *Client) OAuthClientList(lr *ListRange) ([]OAuthClient, error)
- func (c *Client) OAuthClientUpdate(oauthClientIdentity string, options *OAuthClientUpdateOpts) (*OAuthClient, error)
- func (c *Client) OAuthTokenCreate(grant OAuthTokenCreateGrant, client OAuthTokenCreateClient, ...) (*OAuthToken, error)
- func (c *Client) OrganizationAppCollaboratorCreate(appIdentity string, user string, ...) (*OrganizationAppCollaborator, error)
- func (c *Client) OrganizationAppCollaboratorDelete(appIdentity string, collaboratorIdentity string) error
- func (c *Client) OrganizationAppCollaboratorInfo(appIdentity string, collaboratorIdentity string) (*OrganizationAppCollaborator, error)
- func (c *Client) OrganizationAppCollaboratorList(appIdentity string, lr *ListRange) ([]OrganizationAppCollaborator, error)
- func (c *Client) OrganizationAppCreate(options *OrganizationAppCreateOpts) (*OrganizationApp, error)
- func (c *Client) OrganizationAppInfo(appIdentity string) (*OrganizationApp, error)
- func (c *Client) OrganizationAppList(lr *ListRange) ([]OrganizationApp, error)
- func (c *Client) OrganizationAppListForOrganization(organizationIdentity string, lr *ListRange) ([]OrganizationApp, error)
- func (c *Client) OrganizationAppTransferToAccount(appIdentity string, owner string) (*OrganizationApp, error)
- func (c *Client) OrganizationAppTransferToOrganization(appIdentity string, owner string) (*OrganizationApp, error)
- func (c *Client) OrganizationAppUpdateLocked(appIdentity string, locked bool) (*OrganizationApp, error)
- func (c *Client) OrganizationList(lr *ListRange) ([]Organization, error)
- func (c *Client) OrganizationMemberCreateOrUpdate(organizationIdentity string, email string, role string) (*OrganizationMember, error)
- func (c *Client) OrganizationMemberDelete(organizationIdentity string, organizationMemberIdentity string) error
- func (c *Client) OrganizationMemberList(organizationIdentity string, lr *ListRange) ([]OrganizationMember, error)
- func (c *Client) OrganizationUpdate(organizationIdentity string, options *OrganizationUpdateOpts) (*Organization, error)
- func (c *Client) Patch(v interface{}, path string, body interface{}) error
- func (c *Client) PipelineCouplingCreate(appID, pipelineID, stage string) (*PipelineCoupling, error)
- func (c *Client) PipelineInfo(name string) (*Pipeline, error)
- func (c *Client) PlanInfo(addonServiceIdentity string, planIdentity string) (*Plan, error)
- func (c *Client) PlanList(addonServiceIdentity string, lr *ListRange) ([]Plan, error)
- func (c *Client) Post(v interface{}, path string, body interface{}) error
- func (c *Client) Put(v interface{}, path string, body interface{}) error
- func (c *Client) RateLimitInfo() (*RateLimit, error)
- func (c *Client) RegionInfo(regionIdentity string) (*Region, error)
- func (c *Client) RegionList(lr *ListRange) ([]Region, error)
- func (c *Client) ReleaseCreate(appIdentity string, slug string, options *ReleaseCreateOpts) (*Release, error)
- func (c *Client) ReleaseInfo(appIdentity string, releaseIdentity string) (*Release, error)
- func (c *Client) ReleaseList(appIdentity string, lr *ListRange) ([]Release, error)
- func (c *Client) ReleaseRollback(appIdentity string, release string) (*Release, error)
- func (c *Client) SSLEndpointCreate(appIdentity string, certificateChain string, privateKey string, ...) (*SSLEndpoint, error)
- func (c *Client) SSLEndpointDelete(appIdentity string, sslEndpointIdentity string) error
- func (c *Client) SSLEndpointInfo(appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error)
- func (c *Client) SSLEndpointList(appIdentity string, lr *ListRange) ([]SSLEndpoint, error)
- func (c *Client) SSLEndpointUpdate(appIdentity string, sslEndpointIdentity string, options *SSLEndpointUpdateOpts) (*SSLEndpoint, error)
- func (c *Client) SlugCreate(appIdentity string, processTypes map[string]string, options *SlugCreateOpts) (*Slug, error)
- func (c *Client) SlugInfo(appIdentity string, slugIdentity string) (*Slug, error)
- func (c *Client) StackInfo(stackIdentity string) (*Stack, error)
- func (c *Client) StackList(lr *ListRange) ([]Stack, error)
- type Collaborator
- type CollaboratorCreateOpts
- type Domain
- type Dyno
- type DynoCreateOpts
- type DynoStatus
- type Error
- type Formation
- type FormationBatchUpdateOpts
- type FormationUpdateOpts
- type Key
- type ListRange
- type LogDrain
- type LogSession
- type LogSessionCreateOpts
- type OAuthAuthorization
- type OAuthAuthorizationCreateOpts
- type OAuthClient
- type OAuthClientUpdateOpts
- type OAuthToken
- type OAuthTokenCreateClient
- type OAuthTokenCreateGrant
- type OAuthTokenCreateRefreshToken
- type Organization
- type OrganizationApp
- type OrganizationAppCollaborator
- type OrganizationAppCollaboratorCreateOpts
- type OrganizationAppCreateOpts
- type OrganizationMember
- type OrganizationUpdateOpts
- type Pipeline
- type PipelineCoupling
- type PipelineCouplingCreateOpts
- type Plan
- type RateLimit
- type Region
- type Release
- type ReleaseCreateOpts
- type SSLEndpoint
- type SSLEndpointCreateOpts
- type SSLEndpointUpdateOpts
- type ShortApp
- type Slug
- type SlugCreateOpts
- type Stack
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // whether to allow third party web activity tracking AllowTracking bool `json:"allow_tracking"` // whether allowed to utilize beta Heroku features Beta bool `json:"beta"` // when account was created CreatedAt time.Time `json:"created_at"` // unique email address of account Email string `json:"email"` // unique identifier of an account Id string `json:"id"` // when account last authorized with Heroku LastLogin time.Time `json:"last_login"` // full name of the account owner Name *string `json:"name"` // when account was updated UpdatedAt time.Time `json:"updated_at"` // whether account has been verified with billing information Verified bool `json:"verified"` }
An account represents an individual signed up to use the Heroku platform.
type AccountFeature ¶
type AccountFeature struct { // when account feature was created CreatedAt time.Time `json:"created_at"` // description of account feature Description string `json:"description"` // documentation URL of account feature DocURL string `json:"doc_url"` // whether or not account feature has been enabled Enabled bool `json:"enabled"` // unique identifier of account feature Id string `json:"id"` // unique name of account feature Name string `json:"name"` // state of account feature State string `json:"state"` // when account feature was updated UpdatedAt time.Time `json:"updated_at"` }
An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.
type AccountUpdateOpts ¶
type AccountUpdateOpts struct { // whether to allow third party web activity tracking AllowTracking *bool `json:"allow_tracking,omitempty"` // whether allowed to utilize beta Heroku features Beta *bool `json:"beta,omitempty"` // full name of the account owner Name *string `json:"name,omitempty"` }
AccountUpdateOpts holds the optional parameters for AccountUpdate
type Addon ¶
type Addon struct { // config vars associated with this application ConfigVars []string `json:"config_vars"` // when add-on was updated CreatedAt time.Time `json:"created_at"` // unique identifier of add-on Id string `json:"id"` // name of the add-on unique within its app Name string `json:"name"` // message returned from provider Message string `json:"message"` // identity of add-on plan Plan struct { Id string `json:"id"` Name string `json:"name"` Price *AddonPlanPrice `json:"price,omitempty` } `json:"plan"` App App `json:"app"` // id of this add-on with its provider ProviderId string `json:"provider_id"` // when add-on was updated UpdatedAt time.Time `json:"updated_at"` }
Add-ons represent add-ons that have been provisioned for an app.
type AddonAttachment ¶
type AddonCreateOpts ¶
type AddonCreateOpts struct { // custom add-on provisioning options Config *map[string]string `json:"config,omitempty"` Attachment *map[string]string `json:"attachment,omitempty"` }
AddonCreateOpts holds the optional parameters for AddonCreate
type AddonPlanPrice ¶
type AddonPlanPrice struct {
Cents int `json:"cents"`
}
type AddonService ¶
type AddonService struct { // when addon-service was created CreatedAt time.Time `json:"created_at"` // unique identifier of this addon-service Id string `json:"id"` // unique name of this addon-service Name string `json:"name"` // when addon-service was updated UpdatedAt time.Time `json:"updated_at"` }
Add-on services represent add-ons that may be provisioned for apps.
type App ¶
type App struct { // when app was archived ArchivedAt *time.Time `json:"archived_at"` // description from buildpack of app BuildpackProvidedDescription *string `json:"buildpack_provided_description"` // when app was created CreatedAt time.Time `json:"created_at"` // git repo URL of app GitURL string `json:"git_url"` // unique identifier of app Id string `json:"id"` // maintenance status of app Maintenance bool `json:"maintenance"` // unique name of app Name string `json:"name"` // identity of app owner Owner struct { Email string `json:"email"` Id string `json:"id"` } `json:"owner"` // identity of app region Region struct { Id string `json:"id"` Name string `json:"name"` } `json:"region"` // when app was released ReleasedAt *time.Time `json:"released_at"` // git repo size in bytes of app RepoSize *int `json:"repo_size"` // slug size in bytes of app SlugSize *int `json:"slug_size"` // identity of app stack Stack struct { Id string `json:"id"` Name string `json:"name"` } `json:"stack"` // when app was updated UpdatedAt time.Time `json:"updated_at"` // web URL of app WebURL string `json:"web_url"` }
An app represents the program that you would like to deploy and run on Heroku.
type AppCreateOpts ¶
type AppCreateOpts struct { // unique name of app Name *string `json:"name,omitempty"` // identity of app region Region *string `json:"region,omitempty"` // identity of app stack Stack *string `json:"stack,omitempty"` }
AppCreateOpts holds the optional parameters for AppCreate
type AppFeature ¶
type AppFeature struct { // when app feature was created CreatedAt time.Time `json:"created_at"` // description of app feature Description string `json:"description"` // documentation URL of app feature DocURL string `json:"doc_url"` // whether or not app feature has been enabled Enabled bool `json:"enabled"` // unique identifier of app feature Id string `json:"id"` // unique name of app feature Name string `json:"name"` // state of app feature State string `json:"state"` // when app feature was updated UpdatedAt time.Time `json:"updated_at"` }
An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.
type AppTransfer ¶
type AppTransfer struct { // app involved in the transfer App struct { Name string `json:"name"` Id string `json:"id"` } `json:"app"` // when app transfer was created CreatedAt time.Time `json:"created_at"` // unique identifier of app transfer Id string `json:"id"` // identity of the owner of the transfer Owner struct { Email string `json:"email"` Id string `json:"id"` } `json:"owner"` // identity of the recipient of the transfer Recipient struct { Email string `json:"email"` Id string `json:"id"` } `json:"recipient"` // the current state of an app transfer State string `json:"state"` // when app transfer was updated UpdatedAt time.Time `json:"updated_at"` }
An app transfer represents a two party interaction for transferring ownership of an app.
type AppUpdateOpts ¶
type AppUpdateOpts struct { // maintenance status of app Maintenance *bool `json:"maintenance,omitempty"` // unique name of app Name *string `json:"name,omitempty"` // build stack BuildStack *string `json:"build_stack,omitempty"` }
AppUpdateOpts holds the optional parameters for AppUpdate
type AttachmentAddon ¶
type Client ¶
type Client struct { // HTTP is the Client's internal http.Client, handling HTTP requests to the // Heroku API. HTTP *http.Client // The URL of the Heroku API to communicate with. Defaults to // "https://api.heroku.com". URL string // Username is the HTTP basic auth username for API calls made by this Client. Username string // Password is the HTTP basic auth password for API calls made by this Client. Password string // UserAgent to be provided in API requests. Set to DefaultUserAgent if not // specified. UserAgent string // Debug mode can be used to dump the full request and response to stdout. Debug bool // AdditionalHeaders are extra headers to add to each HTTP request sent by // this Client. AdditionalHeaders http.Header // Path to the Unix domain socket or a running heroku-agent. HerokuAgentSocket string }
A Client is a Heroku API client. Its zero value is a usable client that uses default settings for the Heroku API. The Client has an internal HTTP client (HTTP) which defaults to http.DefaultClient.
As with all http.Clients, this Client's Transport has internal state (cached HTTP connections), so Clients should be reused instead of created as needed. Clients are safe for use by multiple goroutines.
func (*Client) APIReq ¶
Sends a Heroku API request and decodes the response into v. As described in NewRequest(), the type of body determines how to encode the request body. As described in DoReq(), the type of v determines how to handle the response body.
func (*Client) AccountChangeEmail ¶
Change Email for account.
password is the current password on the account. email is the unique email address of account.
func (*Client) AccountChangePassword ¶
Change Password for account.
newPassword is the the new password for the account when changing the password. password is the current password on the account.
func (*Client) AccountFeatureInfo ¶
func (c *Client) AccountFeatureInfo(accountFeatureIdentity string) (*AccountFeature, error)
Info for an existing account feature.
accountFeatureIdentity is the unique identifier of the AccountFeature.
func (*Client) AccountFeatureList ¶
func (c *Client) AccountFeatureList(lr *ListRange) ([]AccountFeature, error)
List existing account features.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AccountFeatureUpdate ¶
func (c *Client) AccountFeatureUpdate(accountFeatureIdentity string, enabled bool) (*AccountFeature, error)
Update an existing account feature.
accountFeatureIdentity is the unique identifier of the AccountFeature. enabled is the whether or not account feature has been enabled.
func (*Client) AccountUpdate ¶
func (c *Client) AccountUpdate(password string, options *AccountUpdateOpts) (*Account, error)
Update account.
password is the current password on the account. options is the struct of optional parameters for this action.
func (*Client) AddonAttachmentCreate ¶
func (c *Client) AddonAttachmentCreate(appIdentity, addonName, attachmentName string, attachForce bool) (*AddonAttachment, error)
Create a new attachment.
appIdentity is the unique identifier of the attachment's App. addonName is the name of the addon to attach to. attachment name is the name you want. empty string is default
func (*Client) AddonAttachmentDelete ¶
Delete an existing attachment.
appIdentity is the unique identifier of the Attachment's App. attachmentIdentity is the unique identifier of the attachment.
func (*Client) AddonAttachmentInfo ¶
func (c *Client) AddonAttachmentInfo(appIdentity string, attachmentIdentity string) (*AddonAttachment, error)
Get info on an attachment. Will use the unscoped endpoint if there is a :: in the identity string.
func (*Client) AddonAttachmentList ¶
func (c *Client) AddonAttachmentList(addonIdentity string) ([]AddonAttachment, error)
List all attachments for the provided addon identity
func (*Client) AddonAttachmentListAll ¶
func (c *Client) AddonAttachmentListAll() ([]AddonAttachment, error)
List all attachments attached to the given user's apps
func (*Client) AddonCreate ¶
func (c *Client) AddonCreate(appIdentity string, plan string, options *AddonCreateOpts) (*Addon, error)
Create a new add-on.
appIdentity is the unique identifier of the Addon's App. plan is the unique identifier of this plan or unique name of this plan. options is the struct of optional parameters for this action.
func (*Client) AddonDelete ¶
Delete an existing add-on.
appIdentity is the unique identifier of the Addon's App. addonIdentity is the unique identifier of the Addon.
func (*Client) AddonInfo ¶
Info for an existing add-on.
appIdentity is the unique identifier of the Addon's App. addonIdentity is the unique identifier of the Addon.
func (*Client) AddonList ¶
List existing add-ons.
appIdentity is the unique identifier of the Addon's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AddonListAll ¶
List all addons belonging to the current user
func (*Client) AddonServiceInfo ¶
func (c *Client) AddonServiceInfo(addonServiceIdentity string) (*AddonService, error)
Info for existing addon-service.
addonServiceIdentity is the unique identifier of the AddonService.
func (*Client) AddonServiceList ¶
func (c *Client) AddonServiceList(lr *ListRange) ([]AddonService, error)
List existing addon-services.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AddonUpdate ¶
Change add-on plan. Some add-ons may not support changing plans. In that case, an error will be returned.
appIdentity is the unique identifier of the Addon's App. addonIdentity is the unique identifier of the Addon. plan is the unique identifier of this plan or unique name of this plan.
func (*Client) AppCreate ¶
func (c *Client) AppCreate(options *AppCreateOpts) (*App, error)
Create a new app.
options is the struct of optional parameters for this action.
func (*Client) AppFeatureInfo ¶
func (c *Client) AppFeatureInfo(appIdentity string, appFeatureIdentity string) (*AppFeature, error)
Info for an existing app feature.
appIdentity is the unique identifier of the AppFeature's App. appFeatureIdentity is the unique identifier of the AppFeature.
func (*Client) AppFeatureList ¶
func (c *Client) AppFeatureList(appIdentity string, lr *ListRange) ([]AppFeature, error)
List existing app features.
appIdentity is the unique identifier of the AppFeature's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AppFeatureUpdate ¶
func (c *Client) AppFeatureUpdate(appIdentity string, appFeatureIdentity string, enabled bool) (*AppFeature, error)
Update an existing app feature.
appIdentity is the unique identifier of the AppFeature's App. appFeatureIdentity is the unique identifier of the AppFeature. enabled is the whether or not app feature has been enabled.
func (*Client) AppList ¶
List existing apps.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AppTransferCreate ¶
func (c *Client) AppTransferCreate(app string, recipient string) (*AppTransfer, error)
Create a new app transfer.
app is the unique identifier of app or unique name of app. recipient is the unique email address of account or unique identifier of an account.
func (*Client) AppTransferDelete ¶
Delete an existing app transfer
appTransferIdentity is the unique identifier of the AppTransfer.
func (*Client) AppTransferInfo ¶
func (c *Client) AppTransferInfo(appTransferIdentity string) (*AppTransfer, error)
Info for existing app transfer.
appTransferIdentity is the unique identifier of the AppTransfer.
func (*Client) AppTransferList ¶
func (c *Client) AppTransferList(lr *ListRange) ([]AppTransfer, error)
List existing apps transfers.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) AppTransferUpdate ¶
func (c *Client) AppTransferUpdate(appTransferIdentity string, state string) (*AppTransfer, error)
Update an existing app transfer.
appTransferIdentity is the unique identifier of the AppTransfer. state is the the current state of an app transfer.
func (*Client) AppUpdate ¶
func (c *Client) AppUpdate(appIdentity string, options *AppUpdateOpts) (*App, error)
Update an existing app.
appIdentity is the unique identifier of the App. options is the struct of optional parameters for this action.
func (*Client) CollaboratorCreate ¶
func (c *Client) CollaboratorCreate(appIdentity string, user string, options *CollaboratorCreateOpts) (*Collaborator, error)
Create a new collaborator.
appIdentity is the unique identifier of the Collaborator's App. user is the unique email address of account or unique identifier of an account. options is the struct of optional parameters for this action.
func (*Client) CollaboratorDelete ¶
Delete an existing collaborator.
appIdentity is the unique identifier of the Collaborator's App. collaboratorIdentity is the unique identifier of the Collaborator.
func (*Client) CollaboratorInfo ¶
func (c *Client) CollaboratorInfo(appIdentity string, collaboratorIdentity string) (*Collaborator, error)
Info for existing collaborator.
appIdentity is the unique identifier of the Collaborator's App. collaboratorIdentity is the unique identifier of the Collaborator.
func (*Client) CollaboratorList ¶
func (c *Client) CollaboratorList(appIdentity string, lr *ListRange) ([]Collaborator, error)
List existing collaborators.
appIdentity is the unique identifier of the Collaborator's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) ConfigVarInfo ¶
Get config-vars for app.
appIdentity is the unique identifier of the ConfigVar's App.
func (*Client) ConfigVarUpdate ¶
func (c *Client) ConfigVarUpdate(appIdentity string, options map[string]*string) (map[string]string, error)
Update config-vars for app. You can update existing config-vars by setting them again, and remove by setting it to nil.
appIdentity is the unique identifier of the ConfigVar's App. options is the hash of config changes – update values or delete by seting it to nil.
func (*Client) DoReq ¶
Submits an HTTP request, checks its response, and deserializes the response into v. The type of v determines how to handle the response body:
nil body is discarded io.Writer body is copied directly into v else body is decoded into v as json
func (*Client) DomainCreate ¶
Create a new domain.
appIdentity is the unique identifier of the Domain's App. hostname is the full hostname.
func (*Client) DomainDelete ¶
Delete an existing domain
appIdentity is the unique identifier of the Domain's App. domainIdentity is the unique identifier of the Domain.
func (*Client) DomainInfo ¶
Info for existing domain.
appIdentity is the unique identifier of the Domain's App. domainIdentity is the unique identifier of the Domain.
func (*Client) DomainList ¶
List existing domains.
appIdentity is the unique identifier of the Domain's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) DynoCreate ¶
func (c *Client) DynoCreate(appIdentity string, command string, options *DynoCreateOpts) (*Dyno, error)
Create a new dyno.
appIdentity is the unique identifier of the Dyno's App. command is the command used to start this process. options is the struct of optional parameters for this action.
func (*Client) DynoInfo ¶
Info for existing dyno.
appIdentity is the unique identifier of the Dyno's App. dynoIdentity is the unique identifier of the Dyno.
func (*Client) DynoList ¶
List existing dynos.
appIdentity is the unique identifier of the Dyno's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) DynoRestart ¶
Restart dyno.
appIdentity is the unique identifier of the Dyno's App. dynoIdentity is the unique identifier of the Dyno.
func (*Client) DynoRestartAll ¶
Restart all dynos
appIdentity is the unique identifier of the Dyno's App.
func (*Client) DynoStatus ¶
func (c *Client) DynoStatus(appIdentity string, dynoIdentity string) (*DynoStatus, error)
Info for dyno status.
appIdentity is the unique identifier of the Dyno's App. dynoIdentity is the unique identifier of the Dyno.
func (*Client) FormationBatchUpdate ¶
func (c *Client) FormationBatchUpdate(appIdentity string, updates []FormationBatchUpdateOpts) ([]Formation, error)
Batch update process types
appIdentity is the unique identifier of the Formation's App. updates is the Array with formation updates. Each element must have "process", the id or name of the process type to be updated, and can optionally update its "quantity" or "size".
func (*Client) FormationInfo ¶
Info for a process type
appIdentity is the unique identifier of the Formation's App. formationIdentity is the unique identifier of the Formation.
func (*Client) FormationList ¶
List process type formation
appIdentity is the unique identifier of the Formation's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) FormationUpdate ¶
func (c *Client) FormationUpdate(appIdentity string, formationIdentity string, options *FormationUpdateOpts) (*Formation, error)
Update process type
appIdentity is the unique identifier of the Formation's App. formationIdentity is the unique identifier of the Formation. options is the struct of optional parameters for this action.
func (*Client) GlobalAddonInfo ¶
func (*Client) KeyList ¶
List existing keys.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) LogDrainCreate ¶
Create a new log drain.
appIdentity is the unique identifier of the LogDrain's App. url is the url associated with the log drain.
func (*Client) LogDrainDelete ¶
Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on.
appIdentity is the unique identifier of the LogDrain's App. logDrainIdentity is the unique identifier of the LogDrain.
func (*Client) LogDrainInfo ¶
Info for existing log drain.
appIdentity is the unique identifier of the LogDrain's App. logDrainIdentity is the unique identifier of the LogDrain.
func (*Client) LogDrainList ¶
List existing log drains.
appIdentity is the unique identifier of the LogDrain's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) LogSessionCreate ¶
func (c *Client) LogSessionCreate(appIdentity string, options *LogSessionCreateOpts) (*LogSession, error)
Create a new log session.
appIdentity is the unique identifier of the LogSession's App. options is the struct of optional parameters for this action.
func (*Client) NewRequest ¶
Generates an HTTP request for the Heroku API, but does not perform the request. The request's Accept header field will be set to:
Accept: application/vnd.heroku+json; version=3
The Request-Id header will be set to a random UUID. The User-Agent header will be set to the Client's UserAgent, or DefaultUserAgent if UserAgent is not set.
The type of body determines how to encode the request:
nil no body io.Reader body is sent verbatim else body is encoded as application/json
func (*Client) OAuthAuthorizationCreate ¶
func (c *Client) OAuthAuthorizationCreate(scope []string, options *OAuthAuthorizationCreateOpts) (*OAuthAuthorization, error)
Create a new OAuth authorization.
scope is the The scope of access OAuth authorization allows. options is the struct of optional parameters for this action.
func (*Client) OAuthAuthorizationDelete ¶
Delete OAuth authorization.
oauthAuthorizationIdentity is the unique identifier of the OAuthAuthorization.
func (*Client) OAuthAuthorizationInfo ¶
func (c *Client) OAuthAuthorizationInfo(oauthAuthorizationIdentity string) (*OAuthAuthorization, error)
Info for an OAuth authorization.
oauthAuthorizationIdentity is the unique identifier of the OAuthAuthorization.
func (*Client) OAuthAuthorizationList ¶
func (c *Client) OAuthAuthorizationList(lr *ListRange) ([]OAuthAuthorization, error)
List OAuth authorizations.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OAuthClientCreate ¶
func (c *Client) OAuthClientCreate(name string, redirectUri string) (*OAuthClient, error)
Create a new OAuth client.
name is the OAuth client name. redirectUri is the endpoint for redirection after authorization with OAuth client.
func (*Client) OAuthClientDelete ¶
Delete OAuth client.
oauthClientIdentity is the unique identifier of the OAuthClient.
func (*Client) OAuthClientInfo ¶
func (c *Client) OAuthClientInfo(oauthClientIdentity string) (*OAuthClient, error)
Info for an OAuth client
oauthClientIdentity is the unique identifier of the OAuthClient.
func (*Client) OAuthClientList ¶
func (c *Client) OAuthClientList(lr *ListRange) ([]OAuthClient, error)
List OAuth clients
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OAuthClientUpdate ¶
func (c *Client) OAuthClientUpdate(oauthClientIdentity string, options *OAuthClientUpdateOpts) (*OAuthClient, error)
Update OAuth client
oauthClientIdentity is the unique identifier of the OAuthClient. options is the struct of optional parameters for this action.
func (*Client) OAuthTokenCreate ¶
func (c *Client) OAuthTokenCreate(grant OAuthTokenCreateGrant, client OAuthTokenCreateClient, refreshToken OAuthTokenCreateRefreshToken) (*OAuthToken, error)
Create a new OAuth token.
grant is the grant used on the underlying authorization. client is the OAuth client secret used to obtain token. refreshToken is the refresh token for this authorization.
func (*Client) OrganizationAppCollaboratorCreate ¶
func (c *Client) OrganizationAppCollaboratorCreate(appIdentity string, user string, options *OrganizationAppCollaboratorCreateOpts) (*OrganizationAppCollaborator, error)
Create a new collaborator on an organization app. Use this endpoint instead of the /apps/{app_id_or_name}/collaborator endpoint when you want the collaborator to be granted [privileges] (https://devcenter.heroku.com/articles/org-users-access#roles) according to their role in the organization.
appIdentity is the unique identifier of the OrganizationAppCollaborator's App. user is the unique email address of account or unique identifier of an account. options is the struct of optional parameters for this action.
func (*Client) OrganizationAppCollaboratorDelete ¶
func (c *Client) OrganizationAppCollaboratorDelete(appIdentity string, collaboratorIdentity string) error
Delete an existing collaborator from an organization app.
appIdentity is the unique identifier of the OrganizationAppCollaborator's App. collaboratorIdentity is the unique identifier of the OrganizationAppCollaborator's Collaborator.
func (*Client) OrganizationAppCollaboratorInfo ¶
func (c *Client) OrganizationAppCollaboratorInfo(appIdentity string, collaboratorIdentity string) (*OrganizationAppCollaborator, error)
Info for a collaborator on an organization app.
appIdentity is the unique identifier of the OrganizationAppCollaborator's App. collaboratorIdentity is the unique identifier of the OrganizationAppCollaborator's Collaborator.
func (*Client) OrganizationAppCollaboratorList ¶
func (c *Client) OrganizationAppCollaboratorList(appIdentity string, lr *ListRange) ([]OrganizationAppCollaborator, error)
List collaborators on an organization app.
appIdentity is the unique identifier of the OrganizationAppCollaborator's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OrganizationAppCreate ¶
func (c *Client) OrganizationAppCreate(options *OrganizationAppCreateOpts) (*OrganizationApp, error)
Create a new app in the specified organization, in the default organization if unspecified, or in personal account, if default organization is not set.
options is the struct of optional parameters for this action.
func (*Client) OrganizationAppInfo ¶
func (c *Client) OrganizationAppInfo(appIdentity string) (*OrganizationApp, error)
Info for an organization app.
appIdentity is the unique identifier of the OrganizationApp's App.
func (*Client) OrganizationAppList ¶
func (c *Client) OrganizationAppList(lr *ListRange) ([]OrganizationApp, error)
List apps in the default organization, or in personal account, if default organization is not set.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OrganizationAppListForOrganization ¶
func (c *Client) OrganizationAppListForOrganization(organizationIdentity string, lr *ListRange) ([]OrganizationApp, error)
List organization apps.
organizationIdentity is the unique identifier of the OrganizationApp's Organization. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OrganizationAppTransferToAccount ¶
func (c *Client) OrganizationAppTransferToAccount(appIdentity string, owner string) (*OrganizationApp, error)
Transfer an existing organization app to another Heroku account.
appIdentity is the unique identifier of the OrganizationApp's App. owner is the unique email address of account or unique identifier of an account.
func (*Client) OrganizationAppTransferToOrganization ¶
func (c *Client) OrganizationAppTransferToOrganization(appIdentity string, owner string) (*OrganizationApp, error)
Transfer an existing organization app to another organization.
appIdentity is the unique identifier of the OrganizationApp's App. owner is the unique name of organization.
func (*Client) OrganizationAppUpdateLocked ¶
func (c *Client) OrganizationAppUpdateLocked(appIdentity string, locked bool) (*OrganizationApp, error)
Lock or unlock an organization app.
appIdentity is the unique identifier of the OrganizationApp's App. locked is the are other organization members forbidden from joining this app.
func (*Client) OrganizationList ¶
func (c *Client) OrganizationList(lr *ListRange) ([]Organization, error)
List organizations in which you are a member.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OrganizationMemberCreateOrUpdate ¶
func (c *Client) OrganizationMemberCreateOrUpdate(organizationIdentity string, email string, role string) (*OrganizationMember, error)
Create a new organization member, or update their role.
organizationIdentity is the unique identifier of the OrganizationMember's Organization. email is the email address of the organization member. role is the role in the organization.
func (*Client) OrganizationMemberDelete ¶
func (c *Client) OrganizationMemberDelete(organizationIdentity string, organizationMemberIdentity string) error
Remove a member from the organization.
organizationIdentity is the unique identifier of the OrganizationMember's Organization. organizationMemberIdentity is the unique identifier of the OrganizationMember.
func (*Client) OrganizationMemberList ¶
func (c *Client) OrganizationMemberList(organizationIdentity string, lr *ListRange) ([]OrganizationMember, error)
List members of the organization.
organizationIdentity is the unique identifier of the OrganizationMember's Organization. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) OrganizationUpdate ¶
func (c *Client) OrganizationUpdate(organizationIdentity string, options *OrganizationUpdateOpts) (*Organization, error)
Set or Unset the organization as your default organization.
organizationIdentity is the unique identifier of the Organization. options is the struct of optional parameters for this action.
func (*Client) PipelineCouplingCreate ¶
func (c *Client) PipelineCouplingCreate(appID, pipelineID, stage string) (*PipelineCoupling, error)
func (*Client) PlanInfo ¶
Info for existing plan.
addonServiceIdentity is the unique identifier of the Plan's AddonService. planIdentity is the unique identifier of the Plan.
func (*Client) PlanList ¶
List existing plans.
addonServiceIdentity is the unique identifier of the Plan's AddonService. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) RateLimitInfo ¶
Info for rate limits.
func (*Client) RegionInfo ¶
Info for existing region.
regionIdentity is the unique identifier of the Region.
func (*Client) RegionList ¶
List existing regions.
lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) ReleaseCreate ¶
func (c *Client) ReleaseCreate(appIdentity string, slug string, options *ReleaseCreateOpts) (*Release, error)
Create new release. The API cannot be used to create releases on Bamboo apps.
appIdentity is the unique identifier of the Release's App. slug is the unique identifier of slug. options is the struct of optional parameters for this action.
func (*Client) ReleaseInfo ¶
Info for existing release.
appIdentity is the unique identifier of the Release's App. releaseIdentity is the unique identifier of the Release.
func (*Client) ReleaseList ¶
List existing releases.
appIdentity is the unique identifier of the Release's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) ReleaseRollback ¶
Rollback to an existing release.
appIdentity is the unique identifier of the Release's App. release is the unique identifier of release.
func (*Client) SSLEndpointCreate ¶
func (c *Client) SSLEndpointCreate(appIdentity string, certificateChain string, privateKey string, options *SSLEndpointCreateOpts) (*SSLEndpoint, error)
Create a new SSL endpoint.
appIdentity is the unique identifier of the SSLEndpoint's App. certificateChain is the raw contents of the public certificate chain (eg: .crt or .pem file). privateKey is the contents of the private key (eg .key file). options is the struct of optional parameters for this action.
func (*Client) SSLEndpointDelete ¶
Delete existing SSL endpoint.
appIdentity is the unique identifier of the SSLEndpoint's App. sslEndpointIdentity is the unique identifier of the SSLEndpoint.
func (*Client) SSLEndpointInfo ¶
func (c *Client) SSLEndpointInfo(appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error)
Info for existing SSL endpoint.
appIdentity is the unique identifier of the SSLEndpoint's App. sslEndpointIdentity is the unique identifier of the SSLEndpoint.
func (*Client) SSLEndpointList ¶
func (c *Client) SSLEndpointList(appIdentity string, lr *ListRange) ([]SSLEndpoint, error)
List existing SSL endpoints.
appIdentity is the unique identifier of the SSLEndpoint's App. lr is an optional ListRange that sets the Range options for the paginated list of results.
func (*Client) SSLEndpointUpdate ¶
func (c *Client) SSLEndpointUpdate(appIdentity string, sslEndpointIdentity string, options *SSLEndpointUpdateOpts) (*SSLEndpoint, error)
Update an existing SSL endpoint.
appIdentity is the unique identifier of the SSLEndpoint's App. sslEndpointIdentity is the unique identifier of the SSLEndpoint. options is the struct of optional parameters for this action.
func (*Client) SlugCreate ¶
func (c *Client) SlugCreate(appIdentity string, processTypes map[string]string, options *SlugCreateOpts) (*Slug, error)
Create a new slug. For more information please refer to Deploying Slugs using the Platform API.
appIdentity is the unique identifier of the Slug's App. processTypes is the hash mapping process type names to their respective command. options is the struct of optional parameters for this action.
func (*Client) SlugInfo ¶
Info for existing slug.
appIdentity is the unique identifier of the Slug's App. slugIdentity is the unique identifier of the Slug.
type Collaborator ¶
type Collaborator struct { // when collaborator was created CreatedAt time.Time `json:"created_at"` // unique identifier of collaborator Id string `json:"id"` // when collaborator was updated UpdatedAt time.Time `json:"updated_at"` // identity of collaborated account User struct { Email string `json:"email"` Id string `json:"id"` } `json:"user"` }
A collaborator represents an account that has been given access to an app on Heroku.
type CollaboratorCreateOpts ¶
type CollaboratorCreateOpts struct { // whether to suppress email invitation when creating collaborator Silent *bool `json:"silent,omitempty"` }
CollaboratorCreateOpts holds the optional parameters for CollaboratorCreate
type Domain ¶
type Domain struct { // when domain was created CreatedAt time.Time `json:"created_at"` // full hostname Hostname string `json:"hostname"` // unique identifier of this domain Id string `json:"id"` // when domain was updated UpdatedAt time.Time `json:"updated_at"` }
Domains define what web routes should be routed to an app on Heroku.
type Dyno ¶
type Dyno struct { // a URL to stream output from for attached processes or null for non-attached processes AttachURL *string `json:"attach_url"` // command used to start this process Command string `json:"command"` // when dyno was created CreatedAt time.Time `json:"created_at"` // unique identifier of this dyno Id string `json:"id"` // the name of this process on this dyno Name string `json:"name"` // app release of the dyno Release struct { Id string `json:"id"` Version int `json:"version"` } `json:"release"` // dyno size (default: "1X") Size string `json:"size"` // current status of process (either: crashed, down, idle, starting, or up) State string `json:"state"` // type of process Type string `json:"type"` // when process last changed state UpdatedAt time.Time `json:"updated_at"` }
Dynos encapsulate running processes of an app on Heroku.
type DynoCreateOpts ¶
type DynoCreateOpts struct { // whether to stream output or not Attach *bool `json:"attach,omitempty"` // custom environment to add to the dyno config vars Env *map[string]string `json:"env,omitempty"` // dyno size (default: "1X") Size *string `json:"size,omitempty"` // whether to allocate a TTY or not TTY *bool `json:"tty,omitempty"` }
DynoCreateOpts holds the optional parameters for DynoCreate
type DynoStatus ¶
type Formation ¶
type Formation struct { // command to use to launch this process Command string `json:"command"` // when process type was created CreatedAt time.Time `json:"created_at"` // unique identifier of this process type Id string `json:"id"` // number of processes to maintain Quantity int `json:"quantity"` // dyno size (default: "1X") Size string `json:"size"` // type of process to maintain Type string `json:"type"` // when dyno type was updated UpdatedAt time.Time `json:"updated_at"` }
The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the process_types attribute for the slug currently released on an app.
type FormationUpdateOpts ¶
type FormationUpdateOpts struct { // number of processes to maintain Quantity *int `json:"quantity,omitempty"` // dyno size (default: "1X") Size *string `json:"size,omitempty"` }
FormationUpdateOpts holds the optional parameters for FormationUpdate
type Key ¶
type Key struct { // comment on the key Comment string `json:"comment"` // when key was created CreatedAt time.Time `json:"created_at"` // deprecated. Please refer to 'comment' instead Email string `json:"email"` // a unique identifying string based on contents Fingerprint string `json:"fingerprint"` // unique identifier of this key Id string `json:"id"` // full public_key as uploaded PublicKey string `json:"public_key"` // when key was updated UpdatedAt time.Time `json:"updated_at"` }
Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.
type LogDrain ¶
type LogDrain struct { // addon that created the drain Addon *struct { Id string `json:"id"` } `json:"addon"` // when log drain was created CreatedAt time.Time `json:"created_at"` // unique identifier of this log drain Id string `json:"id"` // token associated with the log drain Token string `json:"token"` // when log drain was updated UpdatedAt time.Time `json:"updated_at"` // url associated with the log drain URL string `json:"url"` }
Log drains provide a way to forward your Heroku logs to an external syslog server for long-term archiving. This external service must be configured to receive syslog packets from Heroku, whereupon its URL can be added to an app using this API. Some addons will add a log drain when they are provisioned to an app. These drains can only be removed by removing the add-on.
type LogSession ¶
type LogSession struct { // when log connection was created CreatedAt time.Time `json:"created_at"` // unique identifier of this log session Id string `json:"id"` // URL for log streaming session LogplexURL string `json:"logplex_url"` // when log session was updated UpdatedAt time.Time `json:"updated_at"` }
A log session is a reference to the http based log stream for an app.
type LogSessionCreateOpts ¶
type LogSessionCreateOpts struct { // dyno to limit results to Dyno *string `json:"dyno,omitempty"` // number of log lines to stream at once Lines *int `json:"lines,omitempty"` // log source to limit results to Source *string `json:"source,omitempty"` // whether to stream ongoing logs Tail *bool `json:"tail,omitempty"` }
LogSessionCreateOpts holds the optional parameters for LogSessionCreate
type OAuthAuthorization ¶
type OAuthAuthorization struct { // access token for this authorization AccessToken *struct { ExpiresIn *int `json:"expires_in"` Id string `json:"id"` Token string `json:"token"` } `json:"access_token"` // identifier of the client that obtained this authorization, if any Client *struct { Id string `json:"id"` Name string `json:"name"` RedirectUri string `json:"redirect_uri"` } `json:"client"` // when OAuth authorization was created CreatedAt time.Time `json:"created_at"` Description *string `json:"description,omitempty"` // this authorization's grant Grant *struct { Code string `json:"code"` ExpiresIn int `json:"expires_in"` Id string `json:"id"` } `json:"grant"` // unique identifier of OAuth authorization Id string `json:"id"` // refresh token for this authorization RefreshToken *struct { ExpiresIn *int `json:"expires_in"` Id string `json:"id"` Token string `json:"token"` } `json:"refresh_token"` // The scope of access OAuth authorization allows Scope []string `json:"scope"` // when OAuth authorization was updated UpdatedAt time.Time `json:"updated_at"` }
OAuth authorizations represent clients that a Heroku user has authorized to automate, customize or extend their usage of the platform. For more information please refer to the Heroku OAuth documentation
type OAuthAuthorizationCreateOpts ¶
type OAuthAuthorizationCreateOpts struct { // identifier of the client that obtained this authorization, if any Client *string `json:"client,omitempty"` // human-friendly description of this OAuth authorization Description *string `json:"description,omitempty"` // seconds until OAuth token expires; may be `null` for tokens with indefinite lifetime ExpiresIn *int `json:"expires_in,omitempty"` }
OAuthAuthorizationCreateOpts holds the optional parameters for OAuthAuthorizationCreate
type OAuthClient ¶
type OAuthClient struct { // when OAuth client was created CreatedAt time.Time `json:"created_at"` // unique identifier of this OAuth client Id string `json:"id"` // whether the client is still operable given a delinquent account IgnoresDelinquent *bool `json:"ignores_delinquent"` // OAuth client name Name string `json:"name"` // endpoint for redirection after authorization with OAuth client RedirectUri string `json:"redirect_uri"` // secret used to obtain OAuth authorizations under this client Secret string `json:"secret"` // when OAuth client was updated UpdatedAt time.Time `json:"updated_at"` }
OAuth clients are applications that Heroku users can authorize to automate, customize or extend their usage of the platform. For more information please refer to the Heroku OAuth documentation.
type OAuthClientUpdateOpts ¶
type OAuthClientUpdateOpts struct { // OAuth client name Name *string `json:"name,omitempty"` // endpoint for redirection after authorization with OAuth client RedirectUri *string `json:"redirect_uri,omitempty"` }
OAuthClientUpdateOpts holds the optional parameters for OAuthClientUpdate
type OAuthToken ¶
type OAuthToken struct { // current access token AccessToken struct { ExpiresIn *int `json:"expires_in"` Id string `json:"id"` Token string `json:"token"` } `json:"access_token"` // authorization for this set of tokens Authorization struct { Id string `json:"id"` } `json:"authorization"` // OAuth client secret used to obtain token Client *struct { Secret string `json:"secret"` } `json:"client"` // when OAuth token was created CreatedAt time.Time `json:"created_at"` // grant used on the underlying authorization Grant struct { Code string `json:"code"` Type string `json:"type"` } `json:"grant"` // unique identifier of OAuth token Id string `json:"id"` // refresh token for this authorization RefreshToken struct { ExpiresIn *int `json:"expires_in"` Id string `json:"id"` Token string `json:"token"` } `json:"refresh_token"` // OAuth session using this token Session struct { Id string `json:"id"` } `json:"session"` // when OAuth token was updated UpdatedAt time.Time `json:"updated_at"` // Reference to the user associated with this token User struct { Id string `json:"id"` } `json:"user"` }
OAuth tokens provide access for authorized clients to act on behalf of a Heroku user to automate, customize or extend their usage of the platform. For more information please refer to the Heroku OAuth documentation
type OAuthTokenCreateClient ¶
type OAuthTokenCreateClient struct { // secret used to obtain OAuth authorizations under this client Secret string `json:"secret"` }
OAuthTokenCreateClient used in OAuthTokenCreate as the OAuth client secret used to obtain token
type OAuthTokenCreateGrant ¶
type OAuthTokenCreateGrant struct { // grant code received from OAuth web application authorization Code string `json:"code"` // type of grant requested, one of `authorization_code` or `refresh_token` Type string `json:"type"` }
OAuthTokenCreateGrant used in OAuthTokenCreate as the grant used on the underlying authorization
type OAuthTokenCreateRefreshToken ¶
type OAuthTokenCreateRefreshToken struct { // contents of the token to be used for authorization Token string `json:"token"` }
OAuthTokenCreateRefreshToken used in OAuthTokenCreate as the refresh token for this authorization
type Organization ¶
type Organization struct { // whether charges incurred by the org are paid by credit card. CreditCardCollections bool `json:"credit_card_collections"` // whether to use this organization when none is specified Default bool `json:"default"` // unique name of organization Name string `json:"name"` // whether the org is provisioned licenses by salesforce. ProvisionedLicenses bool `json:"provisioned_licenses"` // role in the organization Role string `json:"role"` }
Organizations allow you to manage access to a shared group of applications across your development team.
type OrganizationApp ¶
type OrganizationApp struct { // when app was archived ArchivedAt *time.Time `json:"archived_at"` // description from buildpack of app BuildpackProvidedDescription *string `json:"buildpack_provided_description"` // when app was created CreatedAt time.Time `json:"created_at"` // git repo URL of app GitURL string `json:"git_url"` // unique identifier of app Id string `json:"id"` // is the current member a collaborator on this app. Joined bool `json:"joined"` // are other organization members forbidden from joining this app. Locked bool `json:"locked"` // maintenance status of app Maintenance bool `json:"maintenance"` // unique name of app Name string `json:"name"` // organization that owns this app Organization *struct { Name string `json:"name"` } `json:"organization"` // identity of app owner Owner *struct { Email string `json:"email"` Id string `json:"id"` } `json:"owner"` // identity of app region Region struct { Id string `json:"id"` Name string `json:"name"` } `json:"region"` // when app was released ReleasedAt *time.Time `json:"released_at"` // git repo size in bytes of app RepoSize *int `json:"repo_size"` // slug size in bytes of app SlugSize *int `json:"slug_size"` // identity of app stack Stack struct { Id string `json:"id"` Name string `json:"name"` } `json:"stack"` // when app was updated UpdatedAt time.Time `json:"updated_at"` // web URL of app WebURL string `json:"web_url"` }
An organization app encapsulates the organization specific functionality of Heroku apps.
type OrganizationAppCollaborator ¶
type OrganizationAppCollaborator struct { // when collaborator was created CreatedAt time.Time `json:"created_at"` // unique identifier of collaborator Id string `json:"id"` // role in the organization Role string `json:"role"` // when collaborator was updated UpdatedAt time.Time `json:"updated_at"` // identity of collaborated account User struct { Email string `json:"email"` Id string `json:"id"` } `json:"user"` }
An organization collaborator represents an account that has been given access to an organization app on Heroku.
type OrganizationAppCollaboratorCreateOpts ¶
type OrganizationAppCollaboratorCreateOpts struct { // whether to suppress email invitation when creating collaborator Silent *bool `json:"silent,omitempty"` }
OrganizationAppCollaboratorCreateOpts holds the optional parameters for OrganizationAppCollaboratorCreate
type OrganizationAppCreateOpts ¶
type OrganizationAppCreateOpts struct { // are other organization members forbidden from joining this app. Locked *bool `json:"locked,omitempty"` // unique name of app Name *string `json:"name,omitempty"` // organization that owns this app Organization *string `json:"organization,omitempty"` // force creation of the app in the user account even if a default org is set. Personal *bool `json:"personal,omitempty"` // identity of app region Region *string `json:"region,omitempty"` // identity of app stack Stack *string `json:"stack,omitempty"` }
OrganizationAppCreateOpts holds the optional parameters for OrganizationAppCreate
type OrganizationMember ¶
type OrganizationMember struct { // when organization-member was created CreatedAt time.Time `json:"created_at"` // email address of the organization member Email string `json:"email"` // role in the organization Role string `json:"role"` // when organization-member was updated UpdatedAt time.Time `json:"updated_at"` }
An organization member is an individual with access to an organization.
type OrganizationUpdateOpts ¶
type OrganizationUpdateOpts struct { // whether to use this organization when none is specified Default *bool `json:"default,omitempty"` }
OrganizationUpdateOpts holds the optional parameters for OrganizationUpdate
type PipelineCoupling ¶
type PipelineCoupling struct { ID string `json:"id"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` App struct { ID string `json:"id"` Name string `json:"name"` } `json:"app"` Pipeline struct { ID string `json:"id"` Name string `json:"name"` } `json:"pipeline"` Stage string `json:"stage"` PullRequest *string `json:"pull_request"` }
type Plan ¶
type Plan struct { // when plan was created CreatedAt time.Time `json:"created_at"` // whether this plan is the default for its addon service Default bool `json:"default"` // description of plan Description string `json:"description"` // unique identifier of this plan Id string `json:"id"` // unique name of this plan Name string `json:"name"` // price Price struct { Cents int `json:"cents"` Unit string `json:"unit"` } `json:"price"` // release status for plan State string `json:"state"` // when plan was updated UpdatedAt time.Time `json:"updated_at"` }
Plans represent different configurations of add-ons that may be added to apps.
type RateLimit ¶
type RateLimit struct { // allowed requests remaining in current interval Remaining int `json:"remaining"` }
Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.
type Region ¶
type Region struct { // when region was created CreatedAt time.Time `json:"created_at"` // description of region Description string `json:"description"` // unique identifier of region Id string `json:"id"` // unique name of region Name string `json:"name"` // when region was updated UpdatedAt time.Time `json:"updated_at"` }
A region represents a geographic location in which your application may run.
type Release ¶
type Release struct { // when release was created CreatedAt time.Time `json:"created_at"` // description of changes in this release Description string `json:"description"` // unique identifier of release Id string `json:"id"` // when release was updated UpdatedAt time.Time `json:"updated_at"` // slug running in this release Slug *struct { Id string `json:"id"` } `json:"slug"` // user that created the release User struct { Id string `json:"id"` Email string `json:"email"` } `json:"user"` // unique version assigned to the release Version int `json:"version"` }
A release represents a combination of code, config vars and add-ons for an app on Heroku.
type ReleaseCreateOpts ¶
type ReleaseCreateOpts struct { // description of changes in this release Description *string `json:"description,omitempty"` }
ReleaseCreateOpts holds the optional parameters for ReleaseCreate
type SSLEndpoint ¶
type SSLEndpoint struct { // raw contents of the public certificate chain (eg: .crt or .pem file) CertificateChain string `json:"certificate_chain"` // canonical name record, the address to point a domain at Cname string `json:"cname"` // when endpoint was created CreatedAt time.Time `json:"created_at"` // unique identifier of this SSL endpoint Id string `json:"id"` // unique name for SSL endpoint Name string `json:"name"` // when endpoint was updated UpdatedAt time.Time `json:"updated_at"` }
SSL Endpoint is a public address serving custom SSL cert for HTTPS traffic to a Heroku app. Note that an app must have the ssl:endpoint addon installed before it can provision an SSL Endpoint using these APIs.
type SSLEndpointCreateOpts ¶
type SSLEndpointCreateOpts struct { // allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc. Preprocess *bool `json:"preprocess,omitempty"` }
SSLEndpointCreateOpts holds the optional parameters for SSLEndpointCreate
type SSLEndpointUpdateOpts ¶
type SSLEndpointUpdateOpts struct { // raw contents of the public certificate chain (eg: .crt or .pem file) CertificateChain *string `json:"certificate_chain,omitempty"` // allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc. Preprocess *bool `json:"preprocess,omitempty"` // contents of the private key (eg .key file) PrivateKey *string `json:"private_key,omitempty"` // indicates that a rollback should be performed Rollback *bool `json:"rollback,omitempty"` }
SSLEndpointUpdateOpts holds the optional parameters for SSLEndpointUpdate
type Slug ¶
type Slug struct { // pointer to the url where clients can fetch or store the actual release binary Blob struct { Method string `json:"method"` URL string `json:"url"` } `json:"blob"` // description from buildpack of slug BuildpackProvidedDescription *string `json:"buildpack_provided_description"` // identification of the code with your version control system (eg: SHA of the git HEAD) Commit *string `json:"commit"` // when slug was created CreatedAt time.Time `json:"created_at"` // unique identifier of slug Id string `json:"id"` // hash mapping process type names to their respective command ProcessTypes map[string]string `json:"process_types"` // size of slug, in bytes Size *int `json:"size"` // when slug was updated UpdatedAt time.Time `json:"updated_at"` }
A slug is a snapshot of your application code that is ready to run on the platform.
type SlugCreateOpts ¶
type SlugCreateOpts struct { // description from buildpack of slug BuildpackProvidedDescription *string `json:"buildpack_provided_description,omitempty"` // identification of the code with your version control system (eg: SHA of the git HEAD) Commit *string `json:"commit,omitempty"` }
SlugCreateOpts holds the optional parameters for SlugCreate
type Stack ¶
type Stack struct { // when stack was introduced CreatedAt time.Time `json:"created_at"` // unique identifier of stack Id string `json:"id"` // unique name of stack Name string `json:"name"` // availability of this stack: beta, deprecated or public State string `json:"state"` // when stack was last modified UpdatedAt time.Time `json:"updated_at"` }
Stacks are the different application execution environments available in the Heroku platform.
Source Files ¶
- account.go
- account_feature.go
- addon.go
- addon_attachments.go
- addon_service.go
- app.go
- app_feature.go
- app_transfer.go
- collaborator.go
- config_var.go
- doc.go
- domain.go
- dyno.go
- formation.go
- heroku.go
- key.go
- log_drain.go
- log_session.go
- oauth_authorization.go
- oauth_client.go
- oauth_token.go
- organization.go
- organization_app.go
- organization_app_collaborator.go
- organization_member.go
- pipeline.go
- pipeline_coupling.go
- plan.go
- rate_limit.go
- region.go
- release.go
- slug.go
- ssl_endpoint.go
- stack.go