heroku

package
v0.0.0-...-4410413 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2014 License: MIT, MIT Imports: 14 Imported by: 0

README

heroku-go

An API client interface for Heroku for the Go (golang) programming language.

Build Status GoDoc

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.

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/bgentry/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/bgentry/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: &region}

// 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.

Documentation

More detailed documentation is available on godoc.

Thank You

A special thanks goes out to Keith Rarick for writing much of the base API client as part of hk. I also want to thank the Heroku API team for making their API available in JSON schema and for the early version of heroics, on which this generator is based.

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/bgentry/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/bgentry/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: &region}

// 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

View Source
const (
	Version          = "0.6.0"
	DefaultAPIURL    = "https://api.heroku.com"
	DefaultUserAgent = "heroku-go/" + Version + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")"
)

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 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"`

	// 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 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"`

	// identity of add-on plan
	Plan struct {
		Id   string `json:"id"`
		Name string `json:"name"`
	} `json:"plan"`

	// 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 AddonCreateOpts

type AddonCreateOpts struct {
	// custom add-on provisioning options
	Config *map[string]string `json:"config,omitempty"`
}

AddonCreateOpts holds the optional parameters for AddonCreate

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"`
}

AppUpdateOpts holds the optional parameters for AppUpdate

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
}

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

func (c *Client) APIReq(v interface{}, meth, path string, body interface{}) error

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

func (c *Client) AccountChangeEmail(password string, email string) (*Account, error)

Change Email for account.

accountIdentity is the unique identifier of the Account. password is the current password on the account. email is the unique email address of account.

func (*Client) AccountChangePassword

func (c *Client) AccountChangePassword(newPassword string, password string) (*Account, error)

Change Password for account.

accountIdentity is the unique identifier of the 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) AccountInfo

func (c *Client) AccountInfo() (*Account, error)

Info for account.

accountIdentity is the unique identifier of the Account.

func (*Client) AccountUpdate

func (c *Client) AccountUpdate(password string, options *AccountUpdateOpts) (*Account, error)

Update account.

accountIdentity is the unique identifier of the Account. password is the current password on the account. options is the struct of optional parameters for this action.

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

func (c *Client) AddonDelete(appIdentity string, addonIdentity string) error

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

func (c *Client) AddonInfo(appIdentity string, addonIdentity string) (*Addon, error)

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

func (c *Client) AddonList(appIdentity string, lr *ListRange) ([]Addon, error)

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) 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

func (c *Client) AddonUpdate(appIdentity string, addonIdentity string, plan string) (*Addon, error)

Update an existing add-on.

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) AppDelete

func (c *Client) AppDelete(appIdentity string) error

Delete an existing app.

appIdentity is the unique identifier of the App.

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 app-feature'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 app-feature'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 app-feature's app. appFeatureIdentity is the unique identifier of the AppFeature. enabled is the whether or not app feature has been enabled.

func (*Client) AppInfo

func (c *Client) AppInfo(appIdentity string) (*App, error)

Info for existing app.

appIdentity is the unique identifier of the App.

func (*Client) AppList

func (c *Client) AppList(lr *ListRange) ([]App, error)

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

func (c *Client) AppTransferDelete(appTransferIdentity string) error

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

func (c *Client) CollaboratorDelete(appIdentity string, collaboratorIdentity string) error

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

func (c *Client) ConfigVarInfo(appIdentity string) (map[string]string, error)

Get config-vars for app.

appIdentity is the unique identifier of the config-var's app. configVarIdentity is the unique identifier of the ConfigVar.

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 config-var's app. options is the hash of config changes – update values or delete by seting it to nil.

func (*Client) Delete

func (c *Client) Delete(path string) error

func (*Client) DoReq

func (c *Client) DoReq(req *http.Request, v interface{}) error

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

func (c *Client) DomainCreate(appIdentity string, hostname string) (*Domain, error)

Create a new domain.

appIdentity is the unique identifier of the domain's app. hostname is the full hostname.

func (*Client) DomainDelete

func (c *Client) DomainDelete(appIdentity string, domainIdentity string) error

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

func (c *Client) DomainInfo(appIdentity string, domainIdentity string) (*Domain, error)

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

func (c *Client) DomainList(appIdentity string, lr *ListRange) ([]Domain, error)

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

func (c *Client) DynoInfo(appIdentity string, dynoIdentity string) (*Dyno, error)

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

func (c *Client) DynoList(appIdentity string, lr *ListRange) ([]Dyno, error)

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

func (c *Client) DynoRestart(appIdentity string, dynoIdentity string) error

Restart dyno.

appIdentity is the unique identifier of the dyno's app. dynoIdentity is the unique identifier of the Dyno.

func (*Client) DynoRestartAll

func (c *Client) DynoRestartAll(appIdentity string) error

Restart all dynos

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. formationIdentity is the unique identifier of the Formation. 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

func (c *Client) FormationInfo(appIdentity string, formationIdentity string) (*Formation, error)

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

func (c *Client) FormationList(appIdentity string, lr *ListRange) ([]Formation, error)

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) Get

func (c *Client) Get(v interface{}, path string) error

func (*Client) KeyCreate

func (c *Client) KeyCreate(publicKey string) (*Key, error)

Create a new key.

publicKey is the full public_key as uploaded.

func (*Client) KeyDelete

func (c *Client) KeyDelete(keyIdentity string) error

Delete an existing key

keyIdentity is the unique identifier of the Key.

func (*Client) KeyInfo

func (c *Client) KeyInfo(keyIdentity string) (*Key, error)

Info for existing key.

keyIdentity is the unique identifier of the Key.

func (*Client) KeyList

func (c *Client) KeyList(lr *ListRange) ([]Key, error)

List existing keys.

lr is an optional ListRange that sets the Range options for the paginated list of results.

func (*Client) LogDrainCreate

func (c *Client) LogDrainCreate(appIdentity string, url string) (*LogDrain, error)

Create a new log drain.

appIdentity is the unique identifier of the log-drain's app. url is the url associated with the log drain.

func (*Client) LogDrainDelete

func (c *Client) LogDrainDelete(appIdentity string, logDrainIdentity string) error

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 log-drain's app. logDrainIdentity is the unique identifier of the LogDrain.

func (*Client) LogDrainInfo

func (c *Client) LogDrainInfo(appIdentity string, logDrainIdentity string) (*LogDrain, error)

Info for existing log drain.

appIdentity is the unique identifier of the log-drain's app. logDrainIdentity is the unique identifier of the LogDrain.

func (*Client) LogDrainList

func (c *Client) LogDrainList(appIdentity string, lr *ListRange) ([]LogDrain, error)

List existing log drains.

appIdentity is the unique identifier of the log-drain'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 log-session's app. options is the struct of optional parameters for this action.

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error)

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

func (c *Client) OAuthAuthorizationDelete(oauthAuthorizationIdentity string) error

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

func (c *Client) OAuthClientDelete(oauthClientIdentity string) error

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) Patch

func (c *Client) Patch(v interface{}, path string, body interface{}) error

func (*Client) PlanInfo

func (c *Client) PlanInfo(addonServiceIdentity string, planIdentity string) (*Plan, error)

Info for existing plan.

addonServiceIdentity is the unique identifier of the plan's addon-service. planIdentity is the unique identifier of the Plan.

func (*Client) PlanList

func (c *Client) PlanList(addonServiceIdentity string, lr *ListRange) ([]Plan, error)

List existing plans.

addonServiceIdentity is the unique identifier of the plan's addon-service. lr is an optional ListRange that sets the Range options for the paginated list of results.

func (*Client) Post

func (c *Client) Post(v interface{}, path string, body interface{}) error

func (*Client) Put

func (c *Client) Put(v interface{}, path string, body interface{}) error

func (*Client) RateLimitInfo

func (c *Client) RateLimitInfo() (*RateLimit, error)

Info for rate limits.

rateLimitIdentity is the unique identifier of the RateLimit.

func (*Client) RegionInfo

func (c *Client) RegionInfo(regionIdentity string) (*Region, error)

Info for existing region.

regionIdentity is the unique identifier of the Region.

func (*Client) RegionList

func (c *Client) RegionList(lr *ListRange) ([]Region, error)

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

func (c *Client) ReleaseInfo(appIdentity string, releaseIdentity string) (*Release, error)

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

func (c *Client) ReleaseList(appIdentity string, lr *ListRange) ([]Release, error)

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

func (c *Client) ReleaseRollback(appIdentity string, release string) (*Release, error)

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) (*SSLEndpoint, error)

Create a new SSL endpoint.

appIdentity is the unique identifier of the ssl-endpoint'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).

func (*Client) SSLEndpointDelete

func (c *Client) SSLEndpointDelete(appIdentity string, sslEndpointIdentity string) error

Delete existing SSL endpoint.

appIdentity is the unique identifier of the ssl-endpoint'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 ssl-endpoint'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 ssl-endpoint'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 ssl-endpoint'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

func (c *Client) SlugInfo(appIdentity string, slugIdentity string) (*Slug, error)

Info for existing slug.

appIdentity is the unique identifier of the slug's app. slugIdentity is the unique identifier of the Slug.

func (*Client) StackInfo

func (c *Client) StackInfo(stackIdentity string) (*Stack, error)

Stack info.

stackIdentity is the unique identifier of the Stack.

func (*Client) StackList

func (c *Client) StackList(lr *ListRange) ([]Stack, error)

List available stacks.

lr is an optional ListRange that sets the Range options for the paginated list of results.

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: "1")
	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: "1")
	Size *string `json:"size,omitempty"`
}

DynoCreateOpts holds the optional parameters for DynoCreate

type Error

type Error struct {
	Id  string
	URL string
	// contains filtered or unexported fields
}

An Error represents a Heroku API error.

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: "1")
	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 FormationBatchUpdateOpts

type FormationBatchUpdateOpts struct {
	// unique identifier of this process type
	Process string `json:"process"`

	// number of processes to maintain
	Quantity *int `json:"quantity,omitempty"`

	// dyno size (default: "1")
	Size *string `json:"size,omitempty"`
}

type FormationUpdateOpts

type FormationUpdateOpts struct {
	// number of processes to maintain
	Quantity *int `json:"quantity,omitempty"`
	// dyno size (default: "1")
	Size *string `json:"size,omitempty"`
}

FormationUpdateOpts holds the optional parameters for FormationUpdate

type Key

type Key struct {
	// when key was created
	CreatedAt time.Time `json:"created_at"`

	// email address provided in key contents
	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 ListRange

type ListRange struct {
	Field      string
	Max        int
	Descending bool
	FirstId    string
	LastId     string
}

func (*ListRange) SetHeader

func (lr *ListRange) SetHeader(req *http.Request)

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"`

	// 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 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 SSLEndpointUpdateOpts

type SSLEndpointUpdateOpts struct {
	// raw contents of the public certificate chain (eg: .crt or .pem file)
	CertificateChain *string `json:"certificate_chain,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"`

	// 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.

Jump to

Keyboard shortcuts

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