Documentation ¶
Index ¶
- Variables
- func GreenBold(str string) string
- func RedBold(str string) string
- type Addon
- type AddonAvailable
- type Addons
- type AddonsAvailableResponse
- type AddonsResponse
- type Backups
- type CliImplementation
- func (c *CliImplementation) GetJSON(url string, iface interface{}) (err error)
- func (c *CliImplementation) GrabFile(b []byte, url string, fname string) (err error)
- func (c *CliImplementation) GrabRedirectFile(url string, fname string) (err error)
- func (c *CliImplementation) PostJSON(b []byte, url string, iface interface{}) (err error)
- func (c *CliImplementation) Postit(b []byte, url string) (result string, err error)
- type CliInterface
- type Compiler
- type Compilers
- type CompilersResponse
- type Dns
- type IP
- type IPResponse
- type Image
- type Instance
- type Instances
- func (instances *Instances) List(name string)
- func (instances *Instances) Log(domain string)
- func (instances *Instances) New(name string)
- func (instances *Instances) Pause(domain string)
- func (instances *Instances) Resume(domain string)
- func (instances *Instances) ScaleDown(name string, domain string)
- func (instances *Instances) ScaleUp(name string)
- type InstancesResponse
- type Ips
- type Language
- type Languages
- type LanguagesResponse
- type Manifest
- type ManifestProcess
- type ManifestVolume
- type Networks
- type OldInstance
- type OldVolume
- type Project
- type ProjectLogResponse
- type Projects
- func (projects *Projects) Delete(name string)
- func (projects *Projects) Download(name string, path string) error
- func (projects *Projects) DownloadCommunity(name string, user string, path string) error
- func (projects *Projects) List()
- func (projects *Projects) Log(name string)
- func (projects *Projects) Manifest(name string) error
- func (projects *Projects) New(name string, language string, compiler string, source string, script string)
- func (projects *Projects) NewFromImage(name string, imagePath string)
- func (projects *Projects) Upload(name string, binary string)
- type ProjectsResponse
- type Resource
- type Resources
- type Search
- type SearchItem
- type SearchResponse
- type Status
- type Tls
- type Usage
- type User
- type Users
- type UsersResponse
- type Volume
- type Volumes
- func (volumes *Volumes) Attach(name string, domain string)
- func (volumes *Volumes) Detach(name string, domain string)
- func (volumes *Volumes) Download(id int, dst string) error
- func (volumes *Volumes) List(volume *OldVolume)
- func (volumes *Volumes) ListByDomain(domain string)
- func (volumes *Volumes) ListByName(name string)
- type VolumesResponse
Constants ¶
This section is empty.
Variables ¶
var ( // APIVersion is the version of this Cli APIVersion = "v0.1" // APIBase is the base url that Cli requests goto APIBase = "https://deferpanic.com/" + APIVersion )
Functions ¶
Types ¶
type AddonAvailable ¶
type Addons ¶
type Addons struct{}
type AddonsAvailableResponse ¶
type AddonsAvailableResponse struct { Title string Error string AddonsAvailable []AddonAvailable }
type AddonsResponse ¶
type CliImplementation ¶
type CliImplementation struct {
Token string
}
CliImplementation is the base struct for making requests to the deferpanic api
var Cli *CliImplementation
func NewCliImplementation ¶
func NewCliImplementation(token string) *CliImplementation
NewCliImplementation instantiates and returns a new deferpanic API cli
func (*CliImplementation) GetJSON ¶
func (c *CliImplementation) GetJSON(url string, iface interface{}) (err error)
GetJSON does a get request and returns json
func (*CliImplementation) GrabFile ¶
func (c *CliImplementation) GrabFile(b []byte, url string, fname string) (err error)
GrabFile downloads to location TODO - refactor me
func (*CliImplementation) GrabRedirectFile ¶
func (c *CliImplementation) GrabRedirectFile(url string, fname string) (err error)
type CliInterface ¶
CliInterface is the interface for making requests to the deferpanic api
type CompilersResponse ¶
type IPResponse ¶
type Image ¶
type Image struct { Name string `json:"Name"` Source string `json:"Source"` Addon string `json:"Addon"` Script string `json:"Script"` Compiler string `json:"Compiler"` Language string `json:"Language"` Count int `json:"Count"` Force bool `json:"Force"` MakeBin bool `json:"MakeBin"` SystemVolumes bool `json:"SystemVolumes"` Buildable bool `json:"Buildable"` Filename string `json:"Filename"` }
Image is the base struct for management of images
type Instances ¶
type Instances struct{}
func (*Instances) List ¶
List returns the set of running instances for project name if name is empty it returns all running instances for user
type InstancesResponse ¶
type Ips ¶
type Ips struct{}
type LanguagesResponse ¶
type Manifest ¶
type Manifest struct {
Processes []ManifestProcess
}
func LoadManifest ¶
Temporary stuff for `virgo` refactoring only
type ManifestProcess ¶
type ManifestVolume ¶
type OldInstance ¶
type OldInstance struct { Name string `json:"Name"` Domain string `json:"Domain"` Force bool `json:"Force"` }
DEPRECATED OldInstance is the base struct for management of instances
type OldVolume ¶
type OldVolume struct { Id int `json:"ID"` Name string `json:"Name"` Owner string `json:"Owner"` Domain string `json:"Domain"` MountPoint string `json:"MountPoint"` Filename string `json:"Filename"` }
OldVolume is the base struct for management of volumes DEPRECATED
type ProjectLogResponse ¶
type Projects ¶
type Projects struct{}
func (*Projects) DownloadCommunity ¶
DownloadCommunity downloads a community kernel by project name and user name the project that holds this kernel must be public
func (*Projects) Manifest ¶
Manifest is a json representation for your project useful for running things locally
func (*Projects) New ¶
func (projects *Projects) New(name string, language string, compiler string, source string, script string)
New creates a new project
func (*Projects) NewFromImage ¶
NewFromImage creates a new project from an image
type ProjectsResponse ¶
type Resource ¶
type Resource struct { Name string `json:"Name"` Owner string `json:"Owner"` Builtin string `json:"Builtin"` }
Resource is the base struct for management of resources
type Resources ¶
type Resources struct{}
func (*Resources) Available ¶
func (resources *Resources) Available()
Available lists the resources available
func (*Resources) ListByName ¶
ListByName lists the resources provisioned to project_name
type Search ¶
type Search struct{}
func (*Search) FindWithStars ¶
Find lists public projects w/a name or a description that match description && have at least star cnt
func (*Search) Format ¶
func (search *Search) Format(sr SearchResponse)
type SearchItem ¶
type SearchResponse ¶
type SearchResponse struct { Title string Error string SearchItems []SearchItem }
type UsersResponse ¶
type Volumes ¶
type Volumes struct{}
func (*Volumes) ListByDomain ¶
ListByDomain lists volumes attached to a given domain
func (*Volumes) ListByName ¶
ListByName lists volumes that are within a project by name