Versions in this module Expand all Collapse all v0 v0.1.5 Jun 21, 2021 Changes in this version + type AppLog struct + Message string + Stream string + Timestamp int64 + type AppLogsOptions struct + Since int64 type Client + func (c *Client) AppLogs(app string, opts *AppLogsOptions) ([]*AppLog, error) + func (c *Client) DeploymentBuildLogs(app string, deploymentId int64, opts *LogsOptions) (*BuildLogs, error) + type LogsOptions struct + From int64 v0.1.4 Jun 21, 2021 Changes in this version type AccountLoginOptions + Password string type AccountRegisterOptions + Password string + type ProgressReader struct + Reporter ProgressReporterFunc + func (r *ProgressReader) Read(p []byte) (n int, err error) + type ProgressReporterFunc func(int64, int64) type Response + func (r *Response) IsUploadChangesErr() bool v0.1.3 Jun 20, 2021 v0.1.2 Jun 19, 2021 v0.1.1 Jun 19, 2021 v0.1.0 Jun 19, 2021 Changes in this version + const DeploymentStatusBuilding + const DeploymentStatusCancel + const DeploymentStatusFailed + const DeploymentStatusPending + const DeploymentStatusReady + const DeploymentStatusRunning + const DeploymentStatusShutdown + const DeploymentStatusStarting + var ErrNotFound = errors.New("not found") + func CheckResponse(r *Response) error + type AccountLoginOptions struct + Email string + Passowrd string + type AccountRegisterOptions struct + Email string + Name string + Passowrd string + Phone string + type App struct + CreatedAt *time.Time + DomainEnabled bool + Env []EnvItem + ID int64 + Name string + Platform string + Port int + Region string + Resource *AppResource + type AppResource struct + CPU float32 + Memory float32 + Storage float32 + type Auth struct + Token string + User User + type BuildLog struct + CreatedAt time.Time + ID int64 + Level string + Message string + type BuildLogs struct + Deployment *Deployment + Logs []*BuildLog + type Client struct + BaseURL *url.URL + func NewClient(token string, options ...Option) *Client + func (c *Client) AccountLogin(opts *AccountLoginOptions) (*Auth, error) + func (c *Client) AccountRegister(opts *AccountRegisterOptions) (*Auth, 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) error + func (c *Client) DeployemntCreate(app string, opts *CreateDeploymentOptions) (*Deployment, []*FileInfo, error) + func (c *Client) DeploymentCancel(app string, deploymentId int64) error + func (c *Client) DeploymentListBuildLogs(app string, deploymentId int64, opts *ListLogsOptions) (*BuildLogs, error) + func (c *Client) DeploymentListLogs(app string, deploymentId int64, opts *ListLogsOptions) ([]*DeploymentLog, 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 struct + Name string + PlanID int64 + Platform string + Region string + type CreateDeploymentOptions struct + Config *config.Config + Files []*FileInfo + type Deployment struct + CreatedAt *time.Time + ID int64 + Image string + Platform string + Port int + Status DeploymentStatus + type DeploymentLog struct + Message string + Stream string + Timestamp time.Time + type DeploymentStatus string + type EnvItem struct + Key string + Value string + type FileInfo struct + Checksum string + Dir bool + Mode fs.FileMode + Path string + Size int64 + type ListAppsOptions struct + type ListLogsOptions struct + From int64 + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithDevMode(dev bool) Option + func WithHttpClient(client *http.Client) Option + type Response struct + Files []*FileInfo + Message string + func (r *Response) Error() string + func (r *Response) IsFilesError() bool + type User struct + Email string