Documentation ¶
Index ¶
- Constants
- Variables
- func CheckResponse(r *Response) error
- type AccountLoginOptions
- type AccountRegisterOptions
- type App
- type AppConfig
- type AppLog
- type AppLogsOptions
- type AppResource
- type AppStatus
- type Auth
- type BuildLog
- type BuildLogs
- type CliSession
- type Client
- func (c *Client) AccountCheckCliSession(code string) (*Auth, error)
- func (c *Client) AccountCreateCliSession() (*CliSession, error)
- func (c *Client) AccountLogin(opts *AccountLoginOptions) (*Auth, error)
- func (c *Client) AccountRegister(opts *AccountRegisterOptions) (*Auth, error)
- func (c *Client) AppLogs(app string, opts *AppLogsOptions) ([]*AppLog, error)
- func (c *Client) AppsCreate(opts *CreateAppOptions) (*App, error)
- func (c *Client) AppsGet(opts *GetAppOptions) (*App, error)
- func (c *Client) AppsList(opts *ListAppsOptions) ([]*App, error)
- func (c *Client) AppsRemove(opts *RemoveAppOptions) error
- func (c *Client) AppsRestart(opts *RestartAppOptions) error
- func (c *Client) AppsShutdown(opts *ShutdownAppOptions) error
- func (c *Client) AppsStart(opts *StartAppOptions) error
- func (c *Client) AppsUploadFiles(app string, tarfile io.Reader, reporter *ProgressReader) error
- func (c *Client) DeployemntCreate(app string, opts *CreateDeploymentOptions) (*Deployment, []*FileInfo, error)
- func (c *Client) DeploymentBuildLogs(app string, deploymentId int64, opts *LogsOptions) (*BuildLogs, error)
- func (c *Client) DeploymentCancel(app string, deploymentId int64) error
- func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)
- func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error)
- func (c *Client) PlansList() ([]*Plan, error)
- func (c *Client) PlatformList() ([]*Platform, error)
- type CreateAppOptions
- type CreateDeploymentOptions
- type Deployment
- type DeploymentStatus
- type EnvItem
- type FileInfo
- type GetAppOptions
- type ListAppsOptions
- type LogsOptions
- type Option
- type Plan
- type Platform
- type ProgressReader
- type RemoveAppOptions
- type Response
- type RestartAppOptions
- type ShutdownAppOptions
- type StartAppOptions
- type User
Constants ¶
View Source
const ( AppStatusPending AppStatus = "pending" AppStatusRunning = "running" AppStatusPreparing = "preparing" AppStatusAssigned = "assigned" AppStatusRejected = "rejected" AppStatusAccepted = "accepted" AppStatusReady = "ready" AppStatusStarting = "starting" AppStatusComplete = "complete" AppStatusShutdown = "shutdown" AppStatusRemoved = "removed" )
View Source
const ( DeploymentStatusReady DeploymentStatus = "ready" DeploymentStatusPending = "pending" DeploymentStatusBuilding = "building" DeploymentStatusStarting = "starting" DeploymentStatusFinished = "finished" DeploymentStatusShutdown = "shutdown" DeploymentStatusCancel = "cancel" DeploymentStatusFailed = "failed" )
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func CheckResponse ¶
Types ¶
type AccountLoginOptions ¶
type AccountRegisterOptions ¶
type App ¶
type App struct { ID int64 `json:"id"` Name string `json:"name"` Label string `json:"label"` Platform string `json:"platform"` Image string `json:"image"` Status AppStatus `json:"status"` Port int `json:"port"` Region string `json:"region"` DomainEnabled bool `json:"domain_enabled"` Env []EnvItem `json:"env"` Resource *AppResource `json:"resource"` CreatedAt *time.Time `json:"created_at"` }
type AppLogsOptions ¶
type AppLogsOptions struct {
Since int64 `json:"since"`
}
type AppResource ¶
type BuildLogs ¶
type BuildLogs struct { Deployment *Deployment `json:"deployment"` Logs []*BuildLog `json:"logs"` }
type CliSession ¶ added in v0.2.4
type Client ¶
func (*Client) AccountCheckCliSession ¶ added in v0.2.4
func (*Client) AccountCreateCliSession ¶ added in v0.2.4
func (c *Client) AccountCreateCliSession() (*CliSession, error)
func (*Client) AccountLogin ¶
func (c *Client) AccountLogin(opts *AccountLoginOptions) (*Auth, error)
func (*Client) AccountRegister ¶
func (c *Client) AccountRegister(opts *AccountRegisterOptions) (*Auth, error)
func (*Client) AppLogs ¶
func (c *Client) AppLogs(app string, opts *AppLogsOptions) ([]*AppLog, error)
func (*Client) AppsCreate ¶
func (c *Client) AppsCreate(opts *CreateAppOptions) (*App, error)
func (*Client) AppsGet ¶ added in v0.2.0
func (c *Client) AppsGet(opts *GetAppOptions) (*App, error)
func (*Client) AppsRemove ¶ added in v0.2.0
func (c *Client) AppsRemove(opts *RemoveAppOptions) error
func (*Client) AppsRestart ¶ added in v0.2.0
func (c *Client) AppsRestart(opts *RestartAppOptions) error
func (*Client) AppsShutdown ¶ added in v0.2.0
func (c *Client) AppsShutdown(opts *ShutdownAppOptions) error
func (*Client) AppsStart ¶ added in v0.2.0
func (c *Client) AppsStart(opts *StartAppOptions) error
func (*Client) AppsUploadFiles ¶
func (*Client) DeployemntCreate ¶
func (c *Client) DeployemntCreate(app string, opts *CreateDeploymentOptions) (*Deployment, []*FileInfo, error)
func (*Client) DeploymentBuildLogs ¶
func (*Client) DeploymentCancel ¶
func (*Client) NewRequest ¶
func (*Client) PlatformList ¶ added in v0.2.4
type CreateAppOptions ¶
type CreateDeploymentOptions ¶
type Deployment ¶
type DeploymentStatus ¶
type DeploymentStatus string
type GetAppOptions ¶ added in v0.2.0
type GetAppOptions struct {
Name string `json:"name"`
}
type ListAppsOptions ¶
type ListAppsOptions struct { }
type LogsOptions ¶
type LogsOptions struct {
From int64 `json:"from"`
}
type Option ¶
type Option func(*Client)
func WithBaseURL ¶
func WithHttpClient ¶
func WithUserAgent ¶ added in v0.2.7
type ProgressReader ¶
type RemoveAppOptions ¶ added in v0.2.0
type RemoveAppOptions struct {
Name string `json:"name"`
}
type Response ¶
type Response struct { *http.Response Files []*FileInfo `json:"files"` Err string `json:"error"` Message string `json:"message"` }
func (*Response) IsUploadChangesErr ¶
type RestartAppOptions ¶ added in v0.2.0
type RestartAppOptions struct {
Name string `json:"name"`
}
type ShutdownAppOptions ¶ added in v0.2.0
type ShutdownAppOptions struct {
Name string `json:"name"`
}
type StartAppOptions ¶ added in v0.2.0
type StartAppOptions struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.