heroku

package
v0.0.0-...-5061503 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Name    string  `json:"name"`
	SslCert sslCert `json:"ssl_cert"`
}

Certificate is the information of a single certificate

type Client

type Client struct {
	Token string
	// contains filtered or unexported fields
}

Client holds the token and methods to make calls to the Heroku API

func NewClient

func NewClient(c *http.Client, token string) *Client

NewClient creates a new client

func (*Client) Delete

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

Delete sends a DELETE request.

func (*Client) Do

func (s *Client) Do(v interface{}, method, path string, body interface{}, lr *ListRange) error

Do sends a request and decodes the response into v.

func (*Client) Get

func (s *Client) Get(v interface{}, path string, lr *ListRange) error

Get sends a GET request and decodes the response into v.

func (*Client) GetSSLCertificates

func (s *Client) GetSSLCertificates(appName string) ([]Certificate, error)

GetSSLCertificates returns the certificates for an app

func (*Client) NewRequest

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

NewRequest generates an HTTP request, but does not perform the request.

func (*Client) Patch

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

Patch sends a Path request and decodes the response into v.

func (*Client) Post

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

Post sends a POST request and decodes the response into v.

func (*Client) Put

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

Put sends a PUT request and decodes the response into v.

func (*Client) RemoveSSLCertificates

func (s *Client) RemoveSSLCertificates(appName string) error

RemoveSSLCertificates removes all certificates added to an app

func (*Client) SetConfigVars

func (s *Client) SetConfigVars(appName string, index int, key, token string) error

SetConfigVars sets the requires config vars for challenge validation

func (*Client) SetSSLCertificate

func (s *Client) SetSSLCertificate(appName string, chain, key []byte) error

SetSSLCertificate adds a certificate to an app

func (*Client) UpdateSSLCertificate

func (s *Client) UpdateSSLCertificate(appName, certName string, chain, key []byte) error

UpdateSSLCertificate updates an existing certificate

type ListRange

type ListRange struct {
	Field      string
	Max        int
	Descending bool
	FirstID    string
	LastID     string
}

ListRange describes a range.

func (*ListRange) SetHeader

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

SetHeader set headers on the given Request.

Jump to

Keyboard shortcuts

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