func GetServerStatus() (ServerStatus, error) { var status ServerStatus result, _, err := apiclient.Get(apiclient.Url("/appstax/hosting/server")) if err == nil { err = json.Unmarshal(result, &status) } return status, err }
func GetServerLog(lines int64) (string, error) { linesArg := strconv.FormatInt(lines, 10) result, _, err := apiclient.Get(apiclient.Url("/appstax/hosting/server/logs?nlines=%s", linesArg)) return string(result), err }
func SendServerAction(action string) error { data := map[string]string{"action": action} _, _, err := apiclient.Put(apiclient.Url("/appstax/hosting/server"), data) return err }
func DeleteServer() error { _, _, err := apiclient.Delete(apiclient.Url("/appstax/hosting/server")) return err }
func CreateServer(accessCode string) error { data := map[string]string{"accessCode": accessCode} _, _, err := apiclient.Post(apiclient.Url("/appstax/hosting/server"), data) return err }
func UploadServer(archivePath string, progressWriter io.Writer) error { _, _, err := apiclient.PostFile(apiclient.Url("/appstax/hosting/server/code"), archivePath, progressWriter) return err }