Documentation
¶
Index ¶
- Constants
- Variables
- func CheckResponse(r *Response) error
- type AccountLoginOptions
- type AccountRegisterOptions
- type App
- type AppConfig
- type AppLog
- type AppLogsOptions
- type AppResource
- type Auth
- type BuildLog
- type BuildLogs
- type Client
- 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) AppsList(opts *ListAppsOptions) ([]*App, 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)
- type CreateAppOptions
- type CreateDeploymentOptions
- type Deployment
- type DeploymentStatus
- type EnvItem
- type FileInfo
- type ListAppsOptions
- type LogsOptions
- type Option
- type ProgressReader
- type Response
- type User
Constants ¶
View Source
const ( DeploymentStatusReady = "ready" DeploymentStatusPending = "pending" DeploymentStatusBuilding = "building" DeploymentStatusStarting = "starting" DeploymentStatusRunning = "running" 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"`
Platform string `json:"platform"`
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 Client ¶
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) AppsUploadFiles ¶
func (*Client) DeployemntCreate ¶
func (c *Client) DeployemntCreate(app string, opts *CreateDeploymentOptions) (*Deployment, []*FileInfo, error)
func (*Client) DeploymentBuildLogs ¶
func (*Client) DeploymentCancel ¶
type CreateAppOptions ¶
type CreateDeploymentOptions ¶
type Deployment ¶
type DeploymentStatus ¶
type DeploymentStatus string
type ListAppsOptions ¶
type ListAppsOptions struct {
}
type LogsOptions ¶
type LogsOptions struct {
From int64 `json:"from"`
}
type ProgressReader ¶
Click to show internal directories.
Click to hide internal directories.