Documentation
¶
Index ¶
- Variables
- func BoolPointer(val bool) *bool
- func GetAccessToken(email, password, otp string) (string, error)
- func IntPointer(val int) *int
- func IsClientError(err error) bool
- func IsNotAuthenticatedError(err error) bool
- func IsNotFoundError(err error) bool
- func IsServerError(err error) bool
- func SetBaseURL(url string)
- func StringPointer(val string) *string
- type AllocateIPAddressInput
- type AllocationEvent
- type AllocationStatus
- type ApiError
- type App
- type AppCertificate
- type AppChange
- type AppConfig
- type AutoscaleRegionConfigInput
- type AutoscalingConfig
- type AutoscalingRegionConfig
- type Build
- type BuildArgInput
- type CLISessionAuth
- type Check
- type CheckState
- type Client
- func (c *Client) AddCertificate(appName string, hostname string) (*AppCertificate, error)
- func (c *Client) AllocateIPAddress(appName string, addrType string) (*IPAddress, error)
- func (c *Client) AppAutoscalingConfig(appID string) (*AutoscalingConfig, error)
- func (c *Client) AppVMSize(appID string) (VMSize, error)
- func (c *Client) CheckAppCertificate(appName string, hostname string) (*AppCertificate, error)
- func (c *Client) ConfigureRegions(input ConfigureRegionsInput) ([]Region, error)
- func (c *Client) CreateApp(name string, orgId string) (*App, error)
- func (c *Client) CreateSignedUrls(appId string, filename string) (getUrl string, putUrl string, err error)
- func (client *Client) DeleteApp(appName string) error
- func (c *Client) DeleteCertificate(appName string, hostname string) (*DeleteCertificatePayload, error)
- func (client *Client) DeployImage(input DeployImageInput) (*Release, error)
- func (c *Client) FindIPAddress(appName string, address string) (*IPAddress, error)
- func (c *Client) GetAllocationStatus(appName string, allocID string, logLimit int) (*AllocationStatus, error)
- func (c *Client) GetApp(appName string) (*App, error)
- func (c *Client) GetAppCertificate(appName string, hostname string) (*AppCertificate, error)
- func (c *Client) GetAppCertificates(appName string) ([]AppCertificate, error)
- func (c *Client) GetAppChanges(appName string) ([]AppChange, error)
- func (c *Client) GetAppLogs(appName string, nextToken string, region string, instanceId string) ([]LogEntry, string, error)
- func (c *Client) GetAppReleases(appName string, limit int) ([]Release, error)
- func (c *Client) GetAppSecrets(appName string) ([]Secret, error)
- func (c *Client) GetAppServices(appName string) ([]Service, error)
- func (c *Client) GetAppStatus(appName string, showCompleted bool) (*App, error)
- func (c *Client) GetApps() ([]App, error)
- func (c *Client) GetBuild(buildId string) (*Build, error)
- func (client *Client) GetConfig(appName string) (*AppConfig, error)
- func (c *Client) GetCurrentUser() (*User, error)
- func (c *Client) GetDeploymentStatus(appName string, deploymentID string) (*DeploymentStatus, error)
- func (c *Client) GetIPAddresses(appName string) ([]IPAddress, error)
- func (client *Client) GetOrganizations() ([]Organization, error)
- func (c *Client) ListAppRegions(appName string) ([]Region, error)
- func (c *Client) ListBuilds(appName string) ([]Build, error)
- func (client *Client) MoveApp(appName string, orgID string) (*App, error)
- func (c *Client) NewRequest(q string) *graphql.Request
- func (client *Client) OptimizeImage(appId string, image string) (string, error)
- func (client *Client) ParseConfig(appName string, definition Definition) (*AppConfig, error)
- func (c *Client) PlatformRegions() ([]Region, error)
- func (c *Client) PlatformVMSizes() ([]VMSize, error)
- func (c *Client) ReleaseIPAddress(id string) error
- func (c *Client) Run(req *graphql.Request) (Query, error)
- func (c *Client) RunWithContext(ctx context.Context, req *graphql.Request) (Query, error)
- func (c *Client) ScaleApp(appID string, regions []ScaleRegionInput) ([]ScaleRegionChange, error)
- func (c *Client) SetAppVMSize(appID string, sizeName string) (VMSize, error)
- func (c *Client) SetSecrets(appName string, secrets map[string]string) (*Release, error)
- func (c *Client) StartBuild(input StartBuildInput) (*Build, error)
- func (c *Client) UnsetSecrets(appName string, keys []string) (*Release, error)
- func (c *Client) UpdateAutoscaleConfig(input UpdateAutoscaleConfigInput) (*AutoscalingConfig, error)
- type ConfigureRegionsInput
- type CreateAppInput
- type Definition
- type DeleteCertificatePayload
- type DeployImageInput
- type DeploymentStatus
- type HTTPHeader
- type IPAddress
- type LogEntry
- type LoggingTransport
- type Organization
- type PortHandler
- type Query
- type Region
- type RegionPlacement
- type Release
- type ReleaseIPAddressInput
- type ScaleAppInput
- type ScaleRegionChange
- type ScaleRegionInput
- type Secret
- type Service
- type SetSecretsInput
- type SetSecretsInputSecret
- type SetVMSizeInput
- type SignedUrls
- type StartBuildInput
- type UnsetSecretsInput
- type UpdateAutoscaleConfigInput
- type User
- type VMSize
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("Not Found")
View Source
var ErrUnknown = errors.New("An unknown server error occured, please try again")
Functions ¶
func BoolPointer ¶ added in v0.0.98
func GetAccessToken ¶
func IntPointer ¶ added in v0.0.98
func IsClientError ¶
func IsNotAuthenticatedError ¶
func IsNotFoundError ¶
func IsServerError ¶
func SetBaseURL ¶
func SetBaseURL(url string)
func StringPointer ¶ added in v0.0.110
Types ¶
type AllocateIPAddressInput ¶
type AllocationEvent ¶
type AllocationStatus ¶
type AllocationStatus struct {
ID string
IDShort string
Version int
Region string
Status string
DesiredStatus string
Healthy bool
Canary bool
Failed bool
Restarts int
CreatedAt time.Time
UpdatedAt time.Time
Checks []CheckState
Events []AllocationEvent
LatestVersion bool
PassingCheckCount int
WarningCheckCount int
CriticalCheckCount int
Transitioning bool
RecentLogs []LogEntry
}
type ApiError ¶
func ErrorFromResp ¶
type App ¶
type App struct {
ID string
Name string
Status string
Deployed bool
Hostname string
AppURL string
Version int
Release *Release
Organization Organization
Secrets []Secret
CurrentRelease *Release
Releases struct {
Nodes []Release
}
IPAddresses struct {
Nodes []IPAddress
}
IPAddress *IPAddress
Builds struct {
Nodes []Build
}
Changes struct {
Nodes []AppChange
}
Certificates struct {
Nodes []AppCertificate
}
Certificate AppCertificate
Services []Service
Config AppConfig
ParseConfig AppConfig
Allocations []*AllocationStatus
Allocation *AllocationStatus
DeploymentStatus *DeploymentStatus
Autoscaling *AutoscalingConfig
VMSize VMSize
Regions *[]Region
}
type AppCertificate ¶
type AppCertificate struct {
ID string
AcmeDNSConfigured bool
AcmeALPNConfigured bool
Configured bool
CertificateAuthority string
CreatedAt time.Time
DNSProvider string
DNSValidationInstructions string
DNSValidationHostname string
DNSValidationTarget string
Hostname string
Source string
ClientStatus string
Issued struct {
Nodes []struct {
ExpiresAt time.Time
Type string
}
}
}
type AppConfig ¶
type AppConfig struct {
Definition Definition
Services []Service
Valid bool
Errors []string
}
type AutoscaleRegionConfigInput ¶ added in v0.0.98
type AutoscalingConfig ¶ added in v0.0.98
type AutoscalingConfig struct {
BalanceRegions bool
Enabled bool
MaxCount int
MinCount int
Regions []AutoscalingRegionConfig
}
type AutoscalingRegionConfig ¶ added in v0.0.98
type BuildArgInput ¶ added in v0.0.111
type CLISessionAuth ¶
type CLISessionAuth struct {
ID string `json:"id"`
AuthURL string `json:"auth_url"`
AccessToken string `json:"access_token"`
}
func GetAccessTokenForCLISession ¶
func GetAccessTokenForCLISession(id string) (CLISessionAuth, error)
func StartCLISessionWebAuth ¶
func StartCLISessionWebAuth(machineName string, signup bool) (CLISessionAuth, error)
type Check ¶
type Check struct {
Type string `json:"type"`
Interval *uint64 `json:"interval"`
Timeout *uint64 `json:"timeout"`
HTTPMethod *string `json:"httpMethod"`
HTTPPath *string `json:"httpPath"`
HTTPProtocol *string `json:"httpProtocol"`
HTTPSkipTLSVerify *bool `json:"httpTlsSkipVerify"`
HTTPHeaders []HTTPHeader `json:"httpHeaders"`
}
type CheckState ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddCertificate ¶
func (c *Client) AddCertificate(appName string, hostname string) (*AppCertificate, error)
func (*Client) AllocateIPAddress ¶
func (*Client) AppAutoscalingConfig ¶ added in v0.0.98
func (c *Client) AppAutoscalingConfig(appID string) (*AutoscalingConfig, error)
func (*Client) CheckAppCertificate ¶
func (c *Client) CheckAppCertificate(appName string, hostname string) (*AppCertificate, error)
func (*Client) ConfigureRegions ¶ added in v0.0.121
func (c *Client) ConfigureRegions(input ConfigureRegionsInput) ([]Region, error)
func (*Client) CreateSignedUrls ¶
func (*Client) DeleteCertificate ¶
func (c *Client) DeleteCertificate(appName string, hostname string) (*DeleteCertificatePayload, error)
func (*Client) DeployImage ¶
func (client *Client) DeployImage(input DeployImageInput) (*Release, error)
func (*Client) FindIPAddress ¶
func (*Client) GetAllocationStatus ¶ added in v0.0.109
func (*Client) GetAppCertificate ¶
func (c *Client) GetAppCertificate(appName string, hostname string) (*AppCertificate, error)
func (*Client) GetAppCertificates ¶
func (c *Client) GetAppCertificates(appName string) ([]AppCertificate, error)
func (*Client) GetAppLogs ¶
func (*Client) GetAppReleases ¶
func (*Client) GetAppStatus ¶
func (*Client) GetCurrentUser ¶
func (*Client) GetDeploymentStatus ¶
func (c *Client) GetDeploymentStatus(appName string, deploymentID string) (*DeploymentStatus, error)
func (*Client) GetIPAddresses ¶
func (*Client) GetOrganizations ¶
func (client *Client) GetOrganizations() ([]Organization, error)
func (*Client) ListAppRegions ¶ added in v0.0.121
func (*Client) OptimizeImage ¶
func (*Client) ParseConfig ¶
func (client *Client) ParseConfig(appName string, definition Definition) (*AppConfig, error)
func (*Client) PlatformRegions ¶ added in v0.0.95
func (*Client) PlatformVMSizes ¶ added in v0.0.98
func (*Client) ReleaseIPAddress ¶
func (*Client) RunWithContext ¶
func (*Client) ScaleApp ¶ added in v0.0.94
func (c *Client) ScaleApp(appID string, regions []ScaleRegionInput) ([]ScaleRegionChange, error)
func (*Client) SetAppVMSize ¶ added in v0.0.98
func (*Client) SetSecrets ¶
func (*Client) StartBuild ¶ added in v0.0.111
func (c *Client) StartBuild(input StartBuildInput) (*Build, error)
func (*Client) UnsetSecrets ¶
func (*Client) UpdateAutoscaleConfig ¶ added in v0.0.98
func (c *Client) UpdateAutoscaleConfig(input UpdateAutoscaleConfigInput) (*AutoscalingConfig, error)
type ConfigureRegionsInput ¶ added in v0.0.121
type CreateAppInput ¶
type Definition ¶
type Definition map[string]interface{}
type DeleteCertificatePayload ¶
type DeleteCertificatePayload struct {
App App
Certificate AppCertificate
}
type DeployImageInput ¶
type DeployImageInput struct {
AppID string `json:"appId"`
Image string `json:"image"`
Services *[]Service `json:"services"`
Definition *Definition `json:"definition"`
Strategy *string `json:"strategy"`
}
type DeploymentStatus ¶
type HTTPHeader ¶
type LoggingTransport ¶
type LoggingTransport struct {
// contains filtered or unexported fields
}
type Organization ¶
type PortHandler ¶
type Query ¶
type Query struct {
Apps struct {
Nodes []App
}
App App
CurrentUser User
Organizations struct {
Nodes []Organization
}
Build Build
Platform struct {
Regions []Region
VMSizes []VMSize
}
// mutations
CreateApp struct {
App App
}
SetSecrets struct {
Release Release
}
UnsetSecrets struct {
Release Release
}
DeployImage struct {
Release Release
}
OptimizeImage struct {
Status string
}
CreateSignedUrl SignedUrls
StartBuild struct {
Build Build
}
AddCertificate struct {
Certificate AppCertificate
}
DeleteCertificate DeleteCertificatePayload
AllocateIPAddress struct {
App App
IPAddress IPAddress
}
ReleaseIPAddress struct {
App App
}
ScaleApp struct {
App App
Placement []RegionPlacement
Delta []ScaleRegionChange
}
UpdateAutoscaleConfig struct {
App App
}
SetVMSize struct {
App App
VMSize *VMSize
}
ConfigureRegions struct {
App App
Regions []Region
}
}
type RegionPlacement ¶ added in v0.0.94
type ReleaseIPAddressInput ¶
type ReleaseIPAddressInput struct {
IPAddressID string `json:"ipAddressId"`
}
type ScaleAppInput ¶ added in v0.0.94
type ScaleAppInput struct {
AppID string `json:"appId"`
Regions []ScaleRegionInput `json:"regions"`
}
type ScaleRegionChange ¶ added in v0.0.94
type ScaleRegionInput ¶ added in v0.0.94
type SetSecretsInput ¶
type SetSecretsInput struct {
AppID string `json:"appId"`
Secrets []SetSecretsInputSecret `json:"secrets"`
}
type SetSecretsInputSecret ¶
type SetVMSizeInput ¶ added in v0.0.98
type SignedUrls ¶
type StartBuildInput ¶ added in v0.0.111
type StartBuildInput struct {
AppID string `json:"appId"`
SourceURL string `json:"sourceUrl"`
SourceType string `json:"sourceType"`
BuildType *string `json:"buildType"`
BuildArgs []BuildArgInput `json:"buildArgs"`
}
type UnsetSecretsInput ¶
type UpdateAutoscaleConfigInput ¶ added in v0.0.98
type UpdateAutoscaleConfigInput struct {
AppID string `json:"appId"`
Enabled *bool `json:"enabled"`
MinCount *int `json:"minCount"`
MaxCount *int `json:"maxCount"`
BalanceRegions *bool `json:"balanceRegions"`
ResetRegions *bool `json:"resetRegions"`
Regions []AutoscaleRegionConfigInput `json:"regions"`
}
Source Files
¶
- api.go
- auth.go
- casting.go
- client.go
- error.go
- http.go
- resource_activity.go
- resource_apps.go
- resource_builds.go
- resource_certificates.go
- resource_config.go
- resource_deploy.go
- resource_ip_addresses.go
- resource_logs.go
- resource_monitoring.go
- resource_organizations.go
- resource_platform.go
- resource_regions.go
- resource_releases.go
- resource_scale.go
- resource_secrets.go
- resource_services.go
- resource_user.go
- types.go
Click to show internal directories.
Click to hide internal directories.