core

package
v0.0.0-...-4c5a95e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDynoState

func GetDynoState(appName string, dynoName string) (string, error)

func ParseItem

func ParseItem(item interface{}) string

func RestartDyno

func RestartDyno(appName string, dynoName string) error

func StreamLogs

func StreamLogs(appName string, logsBuffer chan string, signal chan bool) error

func UpdateFormationQuantity

func UpdateFormationQuantity(appName string, formationType string, quantity int) (string, error)

func UpdateFormationSize

func UpdateFormationSize(appName string, formationType string, size string) (string, error)

Types

type Addon

type Addon struct {
	ID         string        `json:"id"`
	CreatedAt  string        `json:"created_at"`
	UpdatedAt  string        `json:"updated_at"`
	ConfigVars []interface{} `json:"config_vars"`
	Name       string        `json:"name"`
	ProviderID string        `json:"provider_id"`
	State      string        `json:"state"`
	WebURL     string        `json:"web_url"`
	Actions    []struct {
		ID            string `json:"id"`
		Label         string `json:"label"`
		Action        string `json:"action"`
		URL           string `json:"url"`
		RequiresOwner bool   `json:"requires_owner"`
	} `json:"actions"`
	AddonService struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"addon_service"`
	BillingEntity struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"billing_entity"`
	App struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"app"`
	BilledPrice struct {
		Cents    float64 `json:"cents"`
		Contract bool    `json:"contract"`
		Unit     string  `json:"unit"`
	} `json:"billed_price"`
	Plan struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"plan"`
}

func GetAddonInfo

func GetAddonInfo(addonName string) (Addon, error)

func GetAddons

func GetAddons() ([]Addon, error)

type App

type App struct {
	Acm                          bool   `json:"acm"`
	ArchivedAt                   string `json:"archived_at"`
	BuildpackProvidedDescription string `json:"buildpack_provided_description"`
	BuildStack                   struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"build_stack"`
	CreatedAt       string `json:"created_at"`
	GitURL          string `json:"git_url"`
	ID              string `json:"id"`
	InternalRouting bool   `json:"internal_routing"`
	Maintenance     bool   `json:"maintenance"`
	Name            string `json:"name"`
	Owner           struct {
		Email string `json:"email"`
		ID    string `json:"id"`
	} `json:"owner"`
	Organization struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"organization"`
	Team struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"team"`
	Region struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"region"`
	ReleasedAt string `json:"released_at"`
	RepoSize   int    `json:"repo_size"`
	SlugSize   int    `json:"slug_size"`
	Space      struct {
		ID     string `json:"id"`
		Name   string `json:"name"`
		Shield bool   `json:"shield"`
	} `json:"space"`
	Stack struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"stack"`
	UpdatedAt string `json:"updated_at"`
	WebURL    string `json:"web_url"`
}

func GetAppInfo

func GetAppInfo(appName string) (App, error)

func GetApps

func GetApps() ([]App, error)

type Dyno

type Dyno struct {
	Id        string `json:"id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updatedAt"`
	Command   string `json:"command"`
	Name      string `json:"name"`
	Size      string `json:"size"`
	State     string `json:"state"`
	Type      string `json:"type"`
}

func GetAppDynos

func GetAppDynos(appName string) ([]Dyno, error)

func GetDynoInfo

func GetDynoInfo(appName string, dynoName string) (Dyno, error)

type Formation

type Formation struct {
	Id        string  `json:"id"`
	CreatedAt string  `json:"created_at"`
	UpdatedAt string  `json:"updatedAt"`
	Command   string  `json:"command"`
	Size      string  `json:"size"`
	Quantity  float64 `json:"quantity"`
	Type      string  `json:"type"`
	App       struct {
		Name string `json:"name"`
		Id   string `json:"id"`
	} `json:"app"`
}

func GetAppFormation

func GetAppFormation(appName string) ([]Formation, error)

func GetFormationInfo

func GetFormationInfo(appName string, formationType string) (Formation, error)

Jump to

Keyboard shortcuts

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