heroku

package
v0.0.6-0...-accf9ce Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTP *http.Client
}

Client allows for http calls to Heroku

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do passes HTTP requests to the underlying client and executes them

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string) (*http.Request, error)

NewRequest creates an HTTP request that should be passed to *Client.Do

type PublicUrl

type PublicUrl struct {
	ExpiresAt string `json:"expires_at"`
	Url       string
}

func GetPublicUrl

func GetPublicUrl(t Transfer, herokuAppName string) PublicUrl

GetPublicUrl takes a Transfer and app name and returns the URL of a publicly accessible signed URL for the most recent backup.

type Transfer

type Transfer struct {
	FinishedAt string `json:"finished_at"`
	FromName   string `json:"from_name"`
	FromType   string `json:"from_type"`
	Num        int
	Succeeded  bool
	ToType     string `json:"to_type"`
	CreatedAt  string `json:"created_at"`
}

func GetTransfers

func GetTransfers(appName string) Transfer

GetTransfers takes a Heroku app name and returns the most recent successful backup

type TransfersList

type TransfersList []Transfer

func (TransfersList) Len

func (t TransfersList) Len() int

func (TransfersList) Less

func (t TransfersList) Less(i, j int) bool

func (TransfersList) Swap

func (t TransfersList) Swap(i, j int)

Jump to

Keyboard shortcuts

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