Documentation
¶
Overview ¶
Package scalingo is a generated GoMock package.
Index ¶
- Constants
- Variables
- func HasFailedString(status DeploymentStatus) bool
- func IsFinishedString(status DeploymentStatus) bool
- func IsOTPRequired(err error) bool
- func MockAuth(ctrl *gomock.Controller) *httpmock.MockClient
- type ACMEErrorVariables
- type API
- type Addon
- type AddonLogsURLRes
- type AddonProvider
- type AddonProvidersService
- type AddonProvisionParams
- type AddonProvisionParamsWrapper
- type AddonRes
- type AddonStatus
- type AddonToken
- type AddonTokenRes
- type AddonUpgradeParams
- type AddonUpgradeParamsWrapper
- type AddonsRes
- type AddonsService
- type Alert
- type AlertAddParams
- type AlertRes
- type AlertUpdateParams
- type AlertsRes
- type AlertsService
- type App
- type AppLinks
- type AppResponse
- type AppStatsRes
- type AppStatus
- type AppsCreateOpts
- type AppsPsRes
- type AppsRestartParams
- type AppsScaleParams
- type AppsService
- type AuthStruct
- type AuthenticationData
- type Autoscaler
- type AutoscalerAddParams
- type AutoscalerRes
- type AutoscalerUpdateParams
- type AutoscalersRes
- type AutoscalersService
- type Backup
- type BackupRes
- type BackupStatus
- type BackupsRes
- type BackupsService
- type BearerTokenRes
- type Client
- func (c *Client) AddonDestroy(app, addonID string) error
- func (c *Client) AddonLogsURL(app, addonID string) (string, error)
- func (c *Client) AddonProviderPlansList(addon string) ([]*Plan, error)
- func (c *Client) AddonProvidersList() ([]*AddonProvider, error)
- func (c *Client) AddonProvision(app string, params AddonProvisionParams) (AddonRes, error)
- func (c *Client) AddonShow(app, addonID string) (Addon, error)
- func (c *Client) AddonToken(app, addonID string) (string, error)
- func (c *Client) AddonUpgrade(app, addonID string, params AddonUpgradeParams) (AddonRes, error)
- func (c *Client) AddonsList(app string) ([]*Addon, error)
- func (c *Client) AlertAdd(app string, params AlertAddParams) (*Alert, error)
- func (c *Client) AlertRemove(app, id string) error
- func (c *Client) AlertShow(app, id string) (*Alert, error)
- func (c *Client) AlertUpdate(app, id string, params AlertUpdateParams) (*Alert, error)
- func (c *Client) AlertsList(app string) ([]*Alert, error)
- func (c *Client) AppsCreate(opts AppsCreateOpts) (*App, error)
- func (c *Client) AppsDestroy(name string, currentName string) error
- func (c *Client) AppsForceHTTPS(name string, enable bool) (*App, error)
- func (c *Client) AppsList() ([]*App, error)
- func (c *Client) AppsPs(app string) ([]ContainerType, error)
- func (c *Client) AppsRename(name string, newName string) (*App, error)
- func (c *Client) AppsRestart(app string, scope *AppsRestartParams) (*http.Response, error)
- func (c *Client) AppsScale(app string, params *AppsScaleParams) (*http.Response, error)
- func (c *Client) AppsSetStack(app string, stackID string) (*App, error)
- func (c *Client) AppsShow(appName string) (*App, error)
- func (c *Client) AppsStats(app string) (*AppStatsRes, error)
- func (c *Client) AppsStickySession(name string, enable bool) (*App, error)
- func (c *Client) AppsTransfer(name string, email string) (*App, error)
- func (c *Client) AuthAPI() http.Client
- func (c *Client) AutoscalerAdd(app string, params AutoscalerAddParams) (*Autoscaler, error)
- func (c *Client) AutoscalerRemove(app, id string) error
- func (c *Client) AutoscalerShow(app, id string) (*Autoscaler, error)
- func (c *Client) AutoscalerUpdate(app, id string, params AutoscalerUpdateParams) (*Autoscaler, error)
- func (c *Client) AutoscalersList(app string) ([]Autoscaler, error)
- func (c *Client) BackupCreate(app, addonID string) (*Backup, error)
- func (c *Client) BackupDownloadURL(app, addonID, backupID string) (string, error)
- func (c *Client) BackupList(app string, addonID string) ([]Backup, error)
- func (c *Client) BackupShow(app, addonID, backup string) (*Backup, error)
- func (c *Client) CollaboratorAdd(app string, email string) (Collaborator, error)
- func (c *Client) CollaboratorRemove(app string, id string) error
- func (c *Client) CollaboratorsList(app string) ([]Collaborator, error)
- func (c *Client) CreateRegionMigration(appID string, params RegionMigrationParams) (RegionMigration, error)
- func (c *Client) DBAPI(app, addon string) http.Client
- func (c *Client) DatabaseShow(app, addonID string) (Database, error)
- func (c *Client) Deployment(app string, deploy string) (*Deployment, error)
- func (c *Client) DeploymentCacheReset(app string) error
- func (c *Client) DeploymentList(app string) ([]*Deployment, error)
- func (c *Client) DeploymentLogs(deployURL string) (*http.Response, error)
- func (c *Client) DeploymentStream(deployURL string) (*websocket.Conn, error)
- func (c *Client) DeploymentsCreate(app string, params *DeploymentsCreateParams) (*Deployment, error)
- func (c *Client) DomainSetCanonical(app, id string) (Domain, error)
- func (c *Client) DomainUnsetCanonical(app string) (Domain, error)
- func (c *Client) DomainsAdd(app string, d Domain) (Domain, error)
- func (c *Client) DomainsList(app string) ([]Domain, error)
- func (c *Client) DomainsRemove(app, id string) error
- func (c *Client) DomainsShow(app, id string) (Domain, error)
- func (c *Client) DomainsUpdate(app, id, cert, key string) (Domain, error)
- func (c *Client) EventCategoriesList() ([]EventCategory, error)
- func (c *Client) EventTypesList() ([]EventType, error)
- func (c *Client) EventsList(app string, opts PaginationOpts) (Events, PaginationMeta, error)
- func (c *Client) GetAccessToken() (string, error)
- func (c *Client) GithubLinkAdd(app string, params GithubLinkParams) (*GithubLink, error)
- func (c *Client) GithubLinkDelete(app, id string) error
- func (c *Client) GithubLinkManualDeploy(app, id, branch string) error
- func (c *Client) GithubLinkShow(app string) (*GithubLink, error)
- func (c *Client) GithubLinkUpdate(app, id string, params GithubLinkParams) (*GithubLink, error)
- func (c *Client) KeysAdd(name string, content string) (*Key, error)
- func (c *Client) KeysDelete(id string) error
- func (c *Client) KeysList() ([]Key, error)
- func (c *Client) ListRegionMigrations(appID string) ([]RegionMigration, error)
- func (c *Client) LogDrainAdd(app string, params LogDrainAddParams) (*LogDrainRes, error)
- func (c *Client) LogDrainAddonAdd(app string, addonID string, params LogDrainAddParams) (*LogDrainRes, error)
- func (c *Client) LogDrainAddonRemove(app, addonID string, URL string) error
- func (c *Client) LogDrainRemove(app, URL string) error
- func (c *Client) LogDrainsAddonList(app string, addonID string) (LogDrainsRes, error)
- func (c *Client) LogDrainsList(app string) ([]LogDrain, error)
- func (c *Client) Login(email, password string) (*LoginResponse, error)
- func (c *Client) Logs(logsURL string, n int, filter string) (*http.Response, error)
- func (c *Client) LogsArchives(app string, page int) (*LogsArchivesResponse, error)
- func (c *Client) LogsArchivesByCursor(app string, cursor string) (*LogsArchivesResponse, error)
- func (c *Client) LogsURL(app string) (*http.Response, error)
- func (c *Client) NotificationPlatformByName(name string) ([]*NotificationPlatform, error)
- func (c *Client) NotificationPlatformsList() ([]*NotificationPlatform, error)
- func (c *Client) NotifierByID(app, ID string) (*Notifier, error)
- func (c *Client) NotifierDestroy(app, ID string) error
- func (c *Client) NotifierProvision(app string, params NotifierParams) (*Notifier, error)
- func (c *Client) NotifierUpdate(app, ID string, params NotifierParams) (*Notifier, error)
- func (c *Client) NotifiersList(app string) (Notifiers, error)
- func (c *Client) OperationsShow(app string, opID string) (*Operation, error)
- func (c *Client) OperationsShowFromURL(url string) (*Operation, error)
- func (c *Client) PeriodicBackupsConfig(app, addonID string, params PeriodicBackupsConfigParams) (Database, error)
- func (c *Client) RegionsList() ([]Region, error)
- func (c *Client) Run(opts RunOpts) (*RunRes, error)
- func (c *Client) RunRegionMigrationStep(appID, migrationID string, step RegionMigrationStep) error
- func (c *Client) SCMIntegrationsCreate(scmType SCMType, url string, accessToken string) (*SCMIntegration, error)
- func (c *Client) SCMIntegrationsDelete(id string) error
- func (c *Client) SCMIntegrationsImportKeys(id string) ([]Key, error)
- func (c *Client) SCMIntegrationsList() ([]SCMIntegration, error)
- func (c *Client) SCMIntegrationsShow(id string) (*SCMIntegration, error)
- func (c *Client) SCMRepoLinkCreate(app string, params SCMRepoLinkCreateParams) (*SCMRepoLink, error)
- func (c *Client) SCMRepoLinkDelete(app string) error
- func (c *Client) SCMRepoLinkDeployments(app string) ([]*Deployment, error)
- func (c *Client) SCMRepoLinkManualDeploy(app, branch string) error
- func (c *Client) SCMRepoLinkManualReviewApp(app, pullRequestId string) error
- func (c *Client) SCMRepoLinkReviewApps(app string) ([]*ReviewApp, error)
- func (c *Client) SCMRepoLinkShow(app string) (*SCMRepoLink, error)
- func (c *Client) SCMRepoLinkUpdate(app string, params SCMRepoLinkUpdateParams) (*SCMRepoLink, error)
- func (c *Client) ScalingoAPI() http.Client
- func (c *Client) Self() (*User, error)
- func (c *Client) ShowRegionMigration(appID, migrationID string) (RegionMigration, error)
- func (c *Client) SignUp(email, password string) error
- func (c *Client) SourcesCreate() (*Source, error)
- func (c *Client) StacksList() ([]Stack, error)
- func (c *Client) TokenCreate(params TokenCreateParams) (Token, error)
- func (c *Client) TokenCreateWithLogin(params TokenCreateParams, login LoginParams) (Token, error)
- func (c *Client) TokenExchange(token string) (string, error)
- func (c *Client) TokenShow(id int) (Token, error)
- func (c *Client) TokensList() (Tokens, error)
- func (c *Client) UpdateUser(params UpdateUserParams) (*User, error)
- func (c *Client) UserEventsList(opts PaginationOpts) (Events, PaginationMeta, error)
- func (c *Client) UserStopFreeTrial() error
- func (c *Client) VariableMultipleSet(app string, variables Variables) (Variables, int, error)
- func (c *Client) VariableSet(app string, name string, value string) (*Variable, int, error)
- func (c *Client) VariableUnset(app string, id string) error
- func (c *Client) VariablesList(app string) (Variables, error)
- func (c *Client) VariablesListWithoutAlias(app string) (Variables, error)
- type ClientConfig
- type Collaborator
- type CollaboratorRes
- type CollaboratorStatus
- type CollaboratorsRes
- type CollaboratorsService
- type Container
- type ContainerStat
- type ContainerType
- type Database
- type DatabaseRes
- type DatabaseStatus
- type Deployment
- type DeploymentLinks
- type DeploymentList
- type DeploymentStatus
- type DeploymentsCreateParams
- type DeploymentsCreateRes
- type DeploymentsService
- type DetailedEvent
- type DetailedNotifier
- type Domain
- type DomainRes
- type DomainsRes
- type DomainsService
- type DownloadURLRes
- type Event
- type EventAcceptCollaboratorType
- type EventAcceptCollaboratorTypeData
- type EventAddCreditType
- type EventAddCreditTypeData
- type EventAddPaymentMethodType
- type EventAddPaymentMethodTypeData
- type EventAddVoucherType
- type EventAddVoucherTypeData
- type EventAddon
- type EventAddonUpdatedType
- type EventAddonUpdatedTypeData
- type EventAlertType
- type EventAlertTypeData
- type EventAuthorizeGithubType
- type EventAuthorizeGithubTypeData
- type EventCategory
- type EventCollaborator
- type EventCrashType
- type EventCrashTypeData
- type EventDeleteAddonLogDrainType
- type EventDeleteAddonLogDrainTypeData
- type EventDeleteAddonType
- type EventDeleteAddonTypeData
- type EventDeleteAlertType
- type EventDeleteAlertTypeData
- type EventDeleteAppType
- type EventDeleteAutoscalerType
- type EventDeleteAutoscalerTypeData
- type EventDeleteCollaboratorType
- type EventDeleteCollaboratorTypeData
- type EventDeleteDomainType
- type EventDeleteDomainTypeData
- type EventDeleteIntegrationType
- type EventDeleteIntegrationTypeData
- type EventDeleteKeyType
- type EventDeleteKeyTypeData
- type EventDeleteLogDrainType
- type EventDeleteLogDrainTypeData
- type EventDeleteVariableType
- type EventDeleteVariableTypeData
- type EventDeploymentType
- type EventDeploymentTypeData
- type EventEditAppType
- type EventEditAppTypeData
- type EventEditDomainType
- type EventEditDomainTypeData
- type EventEditVariableType
- type EventEditVariableTypeData
- type EventEditVariablesType
- type EventEditVariablesTypeData
- type EventLinkGithubType
- type EventLinkGithubTypeData
- type EventLinkSCMType
- type EventLinkSCMTypeData
- type EventNewAddonLogDrainType
- type EventNewAddonLogDrainTypeData
- type EventNewAddonType
- type EventNewAddonTypeData
- type EventNewAlertType
- type EventNewAlertTypeData
- type EventNewAppType
- type EventNewAppTypeData
- type EventNewAutoscalerType
- type EventNewAutoscalerTypeData
- type EventNewCollaboratorType
- type EventNewCollaboratorTypeData
- type EventNewDomainType
- type EventNewDomainTypeData
- type EventNewIntegrationType
- type EventNewIntegrationTypeData
- type EventNewKeyType
- type EventNewKeyTypeData
- type EventNewLogDrainType
- type EventNewLogDrainTypeData
- type EventNewUserType
- type EventNewUserTypeData
- type EventNewVariableType
- type EventNewVariableTypeData
- type EventPaymentAttemptType
- type EventPaymentAttemptTypeData
- type EventRenameAppType
- type EventRenameAppTypeData
- type EventRestartType
- type EventRestartTypeData
- type EventResumeAddonType
- type EventResumeAddonTypeData
- type EventRevokeGithubType
- type EventRunType
- type EventRunTypeData
- type EventScaleType
- type EventScaleTypeData
- type EventStartRegionMigrationType
- type EventStartRegionMigrationTypeData
- type EventStopAppType
- type EventStopAppTypeData
- type EventSuspendAddonType
- type EventSuspendAddonTypeData
- type EventTransferAppType
- type EventTransferAppTypeData
- type EventType
- type EventTypeName
- type EventUnlinkGithubType
- type EventUnlinkGithubTypeData
- type EventUnlinkSCMType
- type EventUnlinkSCMTypeData
- type EventUpgradeAddonType
- type EventUpgradeAddonTypeData
- type EventUpgradeDatabaseType
- type EventUpgradeDatabaseTypeData
- type EventUser
- type EventVariable
- type EventVariables
- type Events
- type EventsRes
- type EventsService
- type GithubLink
- type GithubLinkLinker
- type GithubLinkParams
- type GithubLinkResponse
- type GithubLinkService
- type GithubLinksResponse
- type Instance
- type InstanceStatus
- type InstanceType
- type Key
- type KeyRes
- type KeysRes
- type KeysService
- type LetsEncryptStatus
- type ListParams
- type LogDrain
- type LogDrainAddParams
- type LogDrainRes
- type LogDrainsRes
- type LogDrainsService
- type LoginError
- type LoginParams
- type LoginResponse
- type LoginService
- type LogsArchiveItem
- type LogsArchivesResponse
- type LogsArchivesService
- type LogsService
- type MockSubresourceService
- type MockSubresourceServiceMockRecorder
- type NotificationPlatform
- type NotificationPlatformsService
- type Notifier
- func (not *Notifier) GetID() string
- func (not *Notifier) GetName() string
- func (not *Notifier) GetNotifier() *Notifier
- func (not *Notifier) GetSelectedEventIDs() []string
- func (not *Notifier) GetSendAllAlerts() bool
- func (not *Notifier) GetSendAllEvents() bool
- func (not *Notifier) GetType() NotifierType
- func (not *Notifier) IsActive() bool
- func (pnot *Notifier) Specialize() DetailedNotifier
- func (not *Notifier) TypeDataMap() map[string]interface{}
- func (not *Notifier) TypeDataPtr() interface{}
- func (not *Notifier) When() string
- type NotifierEmailType
- type NotifierEmailTypeData
- type NotifierOutput
- type NotifierParams
- type NotifierSlackType
- type NotifierSlackTypeData
- type NotifierType
- type NotifierTypeDataParams
- type NotifierWebhookType
- type NotifierWebhookTypeData
- type Notifiers
- type NotifiersService
- type Operation
- type OperationResponse
- type OperationStatus
- type OperationType
- type OperationsService
- type PaginationMeta
- type PaginationOpts
- type PeriodicBackupsConfigParams
- type Plan
- type PlansParams
- type PlatformRes
- type PlatformsRes
- type PullRequest
- type Region
- type RegionMigration
- type RegionMigrationParams
- type RegionMigrationStatus
- type RegionMigrationStep
- type RegionMigrationsService
- type RegionsService
- type ReviewApp
- type RunOpts
- type RunRes
- type RunsService
- type SCMIntegration
- type SCMIntegrationParams
- type SCMIntegrationParamsReq
- type SCMIntegrationRes
- type SCMIntegrationsRes
- type SCMIntegrationsService
- type SCMRepoLink
- type SCMRepoLinkCreateParams
- type SCMRepoLinkDeploymentsResponse
- type SCMRepoLinkLinker
- type SCMRepoLinkReviewAppsResponse
- type SCMRepoLinkService
- type SCMRepoLinkUpdateParams
- type SCMType
- type ScmRepoLinkResponse
- type SelfResponse
- type SignUpService
- type Source
- type SourcesCreateResponse
- type SourcesService
- type Stack
- type StacksService
- type StaticTokenGenerator
- type Step
- type StepStatus
- type Steps
- type Token
- type TokenCreateParams
- type TokenRes
- type Tokens
- type TokensRes
- type TokensService
- type UpdateUserParams
- type UpdateUserResponse
- type User
- type UsersService
- type Variable
- type VariableSetParams
- type Variables
- type VariablesRes
- type VariablesService
Constants ¶
const ( AppStatusNew = AppStatus("new") AppStatusRunning = AppStatus("running") AppStatusStopped = AppStatus("stopped") AppStatusScaling = AppStatus("scaling") AppStatusRestarting = AppStatus("restarting") )
const ( MetricMemory = "memory" MetricSwap = "swap" MetricCPU = "cpu" MetricRouter5XX = "5XX" MetricRouterAll = "all" MetricRouterServersAmount = "servers_amount" MetricRouterRPMPerContainer = "rpm_per_container" MetricRouterP95ResponseTime = "p95_response_time" )
These constants contain the string repsentation for all metric available on Scalingo
const ( RegionMigrationStatusCreated RegionMigrationStatus = "created" RegionMigrationStatusPreflightSuccess RegionMigrationStatus = "preflight-success" RegionMigrationStatusPreflightError RegionMigrationStatus = "preflight-error" RegionMigrationStatusRunning RegionMigrationStatus = "running" RegionMigrationStatusPrepared RegionMigrationStatus = "prepared" RegionMigrationStatusDataMigrated RegionMigrationStatus = "data-migrated" RegionMigrationStatusAborting RegionMigrationStatus = "aborting" RegionMigrationStatusAborted RegionMigrationStatus = "aborted" RegionMigrationStatusError RegionMigrationStatus = "error" RegionMigrationStatusDone RegionMigrationStatus = "done" RegionMigrationStepAbort RegionMigrationStep = "abort" RegionMigrationStepPreflight RegionMigrationStep = "preflight" RegionMigrationStepPrepare RegionMigrationStep = "prepare" RegionMigrationStepData RegionMigrationStep = "data" RegionMigrationStepFinalize RegionMigrationStep = "finalize" StepStatusRunning StepStatus = "running" StepStatusDone StepStatus = "done" StepStatusError StepStatus = "error" )
Variables ¶
var ErrOTPRequired = errors.New("OTP Required")
var (
ErrRegionNotFound = errgo.New("Region not found")
)
var SCMTypeDisplay = map[SCMType]string{ SCMGithubType: "GitHub", SCMGitlabType: "GitLab", SCMGithubEnterpriseType: "GitHub Enterprise", SCMGitlabSelfHostedType: "GitLab self-hosted", }
var Version = "4.7.2"
Functions ¶
func HasFailedString ¶
func HasFailedString(status DeploymentStatus) bool
func IsFinishedString ¶
func IsFinishedString(status DeploymentStatus) bool
func IsOTPRequired ¶
IsOTPRequired tests if the authentication backend return an OTP Required error
func MockAuth ¶
func MockAuth(ctrl *gomock.Controller) *httpmock.MockClient
Types ¶
type ACMEErrorVariables ¶
type API ¶
type API interface { AddonsService AddonProvidersService AppsService AlertsService AutoscalersService BackupsService CollaboratorsService DeploymentsService DomainsService VariablesService EventsService KeysService LoginService LogDrainsService LogsArchivesService LogsService NotificationPlatformsService NotifiersService OperationsService RegionsService RegionMigrationsService RunsService SignUpService SourcesService TokensService UsersService http.TokenGenerator ScalingoAPI() http.Client AuthAPI() http.Client DBAPI(app, addon string) http.Client }
type Addon ¶
type Addon struct { ID string `json:"id"` AppID string `json:"app_id"` ResourceID string `json:"resource_id"` Status AddonStatus `json:"status"` Plan *Plan `json:"plan"` AddonProvider *AddonProvider `json:"addon_provider"` }
type AddonLogsURLRes ¶
type AddonLogsURLRes struct {
URL string `json:"url"`
}
type AddonProvider ¶
type AddonProvidersService ¶
type AddonProvidersService interface { AddonProvidersList() ([]*AddonProvider, error) AddonProviderPlansList(addon string) ([]*Plan, error) }
type AddonProvisionParams ¶
type AddonProvisionParams struct { AddonProviderID string `json:"addon_provider_id"` PlanID string `json:"plan_id"` Options map[string]string `json:"options"` }
AddonProvisionParams gathers all arguments which can be sent to provision an addon
type AddonProvisionParamsWrapper ¶
type AddonProvisionParamsWrapper struct {
Addon AddonProvisionParams `json:"addon"`
}
type AddonStatus ¶
type AddonStatus string
const ( AddonStatusRunning AddonStatus = "running" AddonStatusProvisioning AddonStatus = "provisioning" AddonStatusSuspended AddonStatus = "suspended" )
type AddonToken ¶
type AddonToken struct {
Token string `json:"token"`
}
type AddonTokenRes ¶
type AddonTokenRes struct {
Addon AddonToken `json:"addon"`
}
type AddonUpgradeParams ¶
type AddonUpgradeParams struct {
PlanID string `json:"plan_id"`
}
type AddonUpgradeParamsWrapper ¶
type AddonUpgradeParamsWrapper struct {
Addon AddonUpgradeParams `json:"addon"`
}
type AddonsService ¶
type AddonsService interface { AddonsList(app string) ([]*Addon, error) AddonProvision(app string, params AddonProvisionParams) (AddonRes, error) AddonDestroy(app, addonID string) error AddonUpgrade(app, addonID string, params AddonUpgradeParams) (AddonRes, error) AddonToken(app, addonID string) (string, error) AddonLogsURL(app, addonID string) (string, error) }
type Alert ¶
type Alert struct { ID string `json:"id"` AppID string `json:"app_id"` ContainerType string `json:"container_type"` Metric string `json:"metric"` Limit float64 `json:"limit"` Disabled bool `json:"disabled"` SendWhenBelow bool `json:"send_when_below"` DurationBeforeTrigger time.Duration `json:"duration_before_trigger"` RemindEvery string `json:"remind_every"` }
type AlertAddParams ¶
type AlertUpdateParams ¶
type AlertUpdateParams struct { ContainerType *string `json:"container_type,omitempty"` Metric *string `json:"metric,omitempty"` Limit *float64 `json:"limit,omitempty"` Disabled *bool `json:"disabled,omitempty"` DurationBeforeTrigger *time.Duration `json:"duration_before_trigger,omitempty"` RemindEvery *time.Duration `json:"remind_every,omitempty"` SendWhenBelow *bool `json:"send_when_below,omitempty"` Notifiers *[]string `json:"notifiers,omitempty"` }
type AlertsService ¶
type App ¶
type App struct { Id string `json:"id"` Name string `json:"name"` Owner struct { ID string `json:"id"` Username string `json:"username"` Email string `json:"email"` } `json:"owner"` GitUrl string `json:"git_url"` Url string `json:"url"` BaseURL string `json:"base_url"` Status AppStatus `json:"status"` LastDeployedAt *time.Time `json:"last_deployed_at"` LastDeployedBy string `json:"last_deployed_by"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"update_at"` Links *AppLinks `json:"links"` StackID string `json:"stack_id"` StickySession bool `json:"sticky_session"` ForceHTTPS bool `json:"force_https"` RouterLogs bool `json:"router_logs"` }
type AppResponse ¶
type AppResponse struct {
App *App `json:"app"`
}
type AppStatsRes ¶
type AppStatsRes struct {
Stats []*ContainerStat `json:"stats"`
}
type AppsCreateOpts ¶
type AppsPsRes ¶
type AppsPsRes struct {
Containers []ContainerType `json:"containers"`
}
type AppsRestartParams ¶
type AppsRestartParams struct {
Scope []string `json:"scope"`
}
type AppsScaleParams ¶
type AppsScaleParams struct {
Containers []ContainerType `json:"containers"`
}
type AppsService ¶
type AppsService interface { AppsList() ([]*App, error) AppsShow(appName string) (*App, error) AppsDestroy(name string, currentName string) error AppsRename(name string, newName string) (*App, error) AppsTransfer(name string, email string) (*App, error) AppsSetStack(name string, stackID string) (*App, error) AppsRestart(app string, scope *AppsRestartParams) (*http.Response, error) AppsCreate(opts AppsCreateOpts) (*App, error) AppsStats(app string) (*AppStatsRes, error) AppsPs(app string) ([]ContainerType, error) AppsScale(app string, params *AppsScaleParams) (*http.Response, error) AppsForceHTTPS(name string, enable bool) (*App, error) AppsStickySession(name string, enable bool) (*App, error) }
type AuthStruct ¶
type AuthStruct struct { Type string `json:"type"` Data AuthenticationData `json:"data"` }
type AuthenticationData ¶
type AuthenticationData struct {
Token string `json:"token"`
}
type Autoscaler ¶
type AutoscalerAddParams ¶
type AutoscalerRes ¶
type AutoscalerRes struct {
Autoscaler Autoscaler `json:"autoscaler"`
}
type AutoscalerUpdateParams ¶
type AutoscalersRes ¶
type AutoscalersRes struct {
Autoscalers []Autoscaler `json:"autoscalers"`
}
type AutoscalersService ¶
type AutoscalersService interface { AutoscalersList(app string) ([]Autoscaler, error) AutoscalerAdd(app string, params AutoscalerAddParams) (*Autoscaler, error) AutoscalerRemove(app string, id string) error }
type BackupStatus ¶
type BackupStatus string
const ( BackupStatusScheduled BackupStatus = "scheduled" BackupStatusRunning BackupStatus = "running" BackupStatusDone BackupStatus = "done" BackupStatusError BackupStatus = "error" )
type BackupsRes ¶
type BackupsRes struct {
Backups []Backup `json:"database_backups"`
}
type BackupsService ¶
type BearerTokenRes ¶
type BearerTokenRes struct {
Token string `json:"token"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg ClientConfig) (*Client, error)
func (*Client) AddonDestroy ¶
func (*Client) AddonProviderPlansList ¶
func (*Client) AddonProvidersList ¶
func (c *Client) AddonProvidersList() ([]*AddonProvider, error)
func (*Client) AddonProvision ¶
func (c *Client) AddonProvision(app string, params AddonProvisionParams) (AddonRes, error)
func (*Client) AddonUpgrade ¶
func (c *Client) AddonUpgrade(app, addonID string, params AddonUpgradeParams) (AddonRes, error)
func (*Client) AlertAdd ¶
func (c *Client) AlertAdd(app string, params AlertAddParams) (*Alert, error)
func (*Client) AlertRemove ¶
func (*Client) AlertUpdate ¶
func (c *Client) AlertUpdate(app, id string, params AlertUpdateParams) (*Alert, error)
func (*Client) AppsCreate ¶
func (c *Client) AppsCreate(opts AppsCreateOpts) (*App, error)
func (*Client) AppsForceHTTPS ¶
func (*Client) AppsRestart ¶
func (*Client) AppsSetStack ¶
func (*Client) AppsStickySession ¶
func (*Client) AppsTransfer ¶
func (*Client) AutoscalerAdd ¶
func (c *Client) AutoscalerAdd(app string, params AutoscalerAddParams) (*Autoscaler, error)
func (*Client) AutoscalerRemove ¶
func (*Client) AutoscalerShow ¶
func (c *Client) AutoscalerShow(app, id string) (*Autoscaler, error)
func (*Client) AutoscalerUpdate ¶
func (c *Client) AutoscalerUpdate(app, id string, params AutoscalerUpdateParams) (*Autoscaler, error)
func (*Client) AutoscalersList ¶
func (c *Client) AutoscalersList(app string) ([]Autoscaler, error)
func (*Client) BackupDownloadURL ¶
func (*Client) BackupList ¶
func (*Client) BackupShow ¶
func (*Client) CollaboratorAdd ¶
func (c *Client) CollaboratorAdd(app string, email string) (Collaborator, error)
func (*Client) CollaboratorRemove ¶
func (*Client) CollaboratorsList ¶
func (c *Client) CollaboratorsList(app string) ([]Collaborator, error)
func (*Client) CreateRegionMigration ¶
func (c *Client) CreateRegionMigration(appID string, params RegionMigrationParams) (RegionMigration, error)
func (*Client) Deployment ¶
func (c *Client) Deployment(app string, deploy string) (*Deployment, error)
func (*Client) DeploymentCacheReset ¶
func (*Client) DeploymentList ¶
func (c *Client) DeploymentList(app string) ([]*Deployment, error)
func (*Client) DeploymentLogs ¶
func (*Client) DeploymentStream ¶
func (*Client) DeploymentsCreate ¶
func (c *Client) DeploymentsCreate(app string, params *DeploymentsCreateParams) (*Deployment, error)
func (*Client) DomainSetCanonical ¶
func (*Client) DomainUnsetCanonical ¶
func (*Client) DomainsRemove ¶
func (*Client) DomainsUpdate ¶
func (*Client) EventCategoriesList ¶
func (c *Client) EventCategoriesList() ([]EventCategory, error)
func (*Client) EventTypesList ¶
func (*Client) EventsList ¶
func (c *Client) EventsList(app string, opts PaginationOpts) (Events, PaginationMeta, error)
func (*Client) GetAccessToken ¶
func (*Client) GithubLinkAdd ¶
func (c *Client) GithubLinkAdd(app string, params GithubLinkParams) (*GithubLink, error)
func (*Client) GithubLinkDelete ¶
func (*Client) GithubLinkManualDeploy ¶
func (*Client) GithubLinkShow ¶
func (c *Client) GithubLinkShow(app string) (*GithubLink, error)
func (*Client) GithubLinkUpdate ¶
func (c *Client) GithubLinkUpdate(app, id string, params GithubLinkParams) (*GithubLink, error)
func (*Client) KeysDelete ¶
func (*Client) ListRegionMigrations ¶
func (c *Client) ListRegionMigrations(appID string) ([]RegionMigration, error)
func (*Client) LogDrainAdd ¶
func (c *Client) LogDrainAdd(app string, params LogDrainAddParams) (*LogDrainRes, error)
func (*Client) LogDrainAddonAdd ¶
func (c *Client) LogDrainAddonAdd(app string, addonID string, params LogDrainAddParams) (*LogDrainRes, error)
func (*Client) LogDrainAddonRemove ¶
func (*Client) LogDrainRemove ¶
func (*Client) LogDrainsAddonList ¶
func (c *Client) LogDrainsAddonList(app string, addonID string) (LogDrainsRes, error)
func (*Client) LogsArchives ¶
func (c *Client) LogsArchives(app string, page int) (*LogsArchivesResponse, error)
func (*Client) LogsArchivesByCursor ¶
func (c *Client) LogsArchivesByCursor(app string, cursor string) (*LogsArchivesResponse, error)
func (*Client) NotificationPlatformByName ¶
func (c *Client) NotificationPlatformByName(name string) ([]*NotificationPlatform, error)
func (*Client) NotificationPlatformsList ¶
func (c *Client) NotificationPlatformsList() ([]*NotificationPlatform, error)
func (*Client) NotifierDestroy ¶
func (*Client) NotifierProvision ¶
func (c *Client) NotifierProvision(app string, params NotifierParams) (*Notifier, error)
func (*Client) NotifierUpdate ¶
func (c *Client) NotifierUpdate(app, ID string, params NotifierParams) (*Notifier, error)
func (*Client) OperationsShow ¶
func (*Client) OperationsShowFromURL ¶
func (*Client) PeriodicBackupsConfig ¶
func (c *Client) PeriodicBackupsConfig(app, addonID string, params PeriodicBackupsConfigParams) (Database, error)
func (*Client) RegionsList ¶
func (*Client) RunRegionMigrationStep ¶
func (c *Client) RunRegionMigrationStep(appID, migrationID string, step RegionMigrationStep) error
func (*Client) SCMIntegrationsCreate ¶
func (*Client) SCMIntegrationsDelete ¶
func (*Client) SCMIntegrationsImportKeys ¶
func (*Client) SCMIntegrationsList ¶
func (c *Client) SCMIntegrationsList() ([]SCMIntegration, error)
func (*Client) SCMIntegrationsShow ¶
func (c *Client) SCMIntegrationsShow(id string) (*SCMIntegration, error)
func (*Client) SCMRepoLinkCreate ¶
func (c *Client) SCMRepoLinkCreate(app string, params SCMRepoLinkCreateParams) (*SCMRepoLink, error)
func (*Client) SCMRepoLinkDelete ¶
func (*Client) SCMRepoLinkDeployments ¶
func (c *Client) SCMRepoLinkDeployments(app string) ([]*Deployment, error)
func (*Client) SCMRepoLinkManualDeploy ¶
func (*Client) SCMRepoLinkManualReviewApp ¶
func (*Client) SCMRepoLinkReviewApps ¶
func (*Client) SCMRepoLinkShow ¶
func (c *Client) SCMRepoLinkShow(app string) (*SCMRepoLink, error)
func (*Client) SCMRepoLinkUpdate ¶
func (c *Client) SCMRepoLinkUpdate(app string, params SCMRepoLinkUpdateParams) (*SCMRepoLink, error)
func (*Client) ScalingoAPI ¶
func (*Client) ShowRegionMigration ¶
func (c *Client) ShowRegionMigration(appID, migrationID string) (RegionMigration, error)
func (*Client) SourcesCreate ¶
func (*Client) StacksList ¶
func (*Client) TokenCreate ¶
func (c *Client) TokenCreate(params TokenCreateParams) (Token, error)
func (*Client) TokenCreateWithLogin ¶
func (c *Client) TokenCreateWithLogin(params TokenCreateParams, login LoginParams) (Token, error)
func (*Client) TokensList ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(params UpdateUserParams) (*User, error)
func (*Client) UserEventsList ¶
func (c *Client) UserEventsList(opts PaginationOpts) (Events, PaginationMeta, error)
func (*Client) UserStopFreeTrial ¶
func (*Client) VariableMultipleSet ¶
func (*Client) VariableSet ¶
type ClientConfig ¶
type ClientConfig struct { Timeout time.Duration TLSConfig *tls.Config APIEndpoint string AuthEndpoint string DatabaseAPIEndpoint string APIToken string Region string UserAgent string // StaticTokenGenerator is present for retrocompatibility with legacy tokens // DEPRECATED, Use standard APIToken field for normal operations StaticTokenGenerator *StaticTokenGenerator }
type Collaborator ¶
type CollaboratorRes ¶
type CollaboratorRes struct {
Collaborator Collaborator `json:"collaborator"`
}
type CollaboratorStatus ¶
type CollaboratorStatus string
const ( CollaboratorStatusPending CollaboratorStatus = "pending" CollaboratorStatusAccepted CollaboratorStatus = "accepted" CollaboratorStatusDeleted CollaboratorStatus = "user account deleted" )
type CollaboratorsRes ¶
type CollaboratorsRes struct {
Collaborators []Collaborator `json:"collaborators"`
}
type CollaboratorsService ¶
type CollaboratorsService interface { CollaboratorsList(app string) ([]Collaborator, error) CollaboratorAdd(app string, email string) (Collaborator, error) CollaboratorRemove(app string, id string) error }
type Container ¶
type Container struct { ID string `json:"id"` AppID string `json:"app_id"` CreatedAt *time.Time `json:"created_at"` DeletedAt *time.Time `json:"deleted_at"` Command string `json:"command"` Type string `json:"type"` TypeIndex int `json:"type_index"` State string `json:"state"` Size string `json:"size"` App *App `json:"app"` }
type ContainerStat ¶
type ContainerStat struct { ID string `json:"id"` CpuUsage int `json:"cpu_usage"` MemoryUsage int64 `json:"memory_usage"` SwapUsage int64 `json:"swap_usage"` MemoryLimit int64 `json:"memory_limit"` SwapLimit int64 `json:"swap_limit"` HighestMemoryUsage int64 `json:"highest_memory_usage"` HighestSwapUsage int64 `json:"highest_swap_usage"` }
type ContainerType ¶
type Database ¶
type Database struct { ID string `json:"id"` CreatedAt time.Time `json:"created_at"` ResourceID string `json:"resource_id"` AppName string `json:"app_name"` EncryptionAtRest bool `json:"encryption_at_rest"` Features []map[string]string `json:"features"` Plan string `json:"plan"` Status DatabaseStatus `json:"status"` TypeID string `json:"type_id"` TypeName string `json:"type_name"` VersionID string `json:"version_id"` MongoReplSetName string `json:"mongo_repl_set_name"` Instances []Instance `json:"instances"` NextVersionID string `json:"next_version_id"` ReadableVersion string `json:"readable_version"` Hostname string `json:"hostname"` CurrentOperationID string `json:"current_operation_id"` Cluster bool `json:"cluster"` PeriodicBackupsEnabled bool `json:"periodic_backups_enabled"` PeriodicBackupsScheduledAt []int `json:"periodic_backups_scheduled_at"` // Hours of the day of the periodic backups (UTC) }
type DatabaseRes ¶
type DatabaseRes struct {
Database Database `json:"database"`
}
type DatabaseStatus ¶
type DatabaseStatus string
const ( DatabaseStatusRunning DatabaseStatus = "running" DatabaseStatusMigrating DatabaseStatus = "migrating" DatabaseStatusUpgrading DatabaseStatus = "upgrading" DatabaseStatusStopped DatabaseStatus = "stopped" )
type Deployment ¶
type Deployment struct { ID string `json:"id"` AppID string `json:"app_id"` CreatedAt *time.Time `json:"created_at"` Status DeploymentStatus `json:"status"` GitRef string `json:"git_ref"` Image string `json:"image"` Registry string `json:"registry"` Duration int `json:"duration"` PostdeployHook string `json:"postdeploy_hook"` User *User `json:"pusher"` Links *DeploymentLinks `json:"links"` }
func (*Deployment) HasFailed ¶
func (d *Deployment) HasFailed() bool
func (*Deployment) IsFinished ¶
func (d *Deployment) IsFinished() bool
type DeploymentLinks ¶
type DeploymentLinks struct {
Output string `json:"output"`
}
type DeploymentList ¶
type DeploymentList struct {
Deployments []*Deployment `json:"deployments"`
}
type DeploymentStatus ¶
type DeploymentStatus string
const ( StatusSuccess DeploymentStatus = "success" StatusQueued DeploymentStatus = "queued" StatusBuilding DeploymentStatus = "building" StatusStarting DeploymentStatus = "starting" StatusPushing DeploymentStatus = "pushing" StatusAborted DeploymentStatus = "aborted" StatusBuildError DeploymentStatus = "build-error" StatusCrashedError DeploymentStatus = "crashed-error" StatusTimeoutError DeploymentStatus = "timeout-error" StatusHookError DeploymentStatus = "hook-error" )
type DeploymentsCreateParams ¶
type DeploymentsCreateRes ¶
type DeploymentsCreateRes struct {
Deployment *Deployment `json:"deployment"`
}
type DeploymentsService ¶
type DeploymentsService interface { DeploymentList(app string) ([]*Deployment, error) Deployment(app string, deploy string) (*Deployment, error) DeploymentLogs(deployURL string) (*http.Response, error) DeploymentStream(deployURL string) (*websocket.Conn, error) DeploymentsCreate(app string, params *DeploymentsCreateParams) (*Deployment, error) }
type DetailedEvent ¶
type DetailedNotifier ¶
type DetailedNotifier interface { GetNotifier() *Notifier GetID() string GetName() string GetType() NotifierType GetSendAllEvents() bool GetSendAllAlerts() bool GetSelectedEventIDs() []string IsActive() bool When() string TypeDataPtr() interface{} TypeDataMap() map[string]interface{} }
func NewDetailedNotifier ¶
func NewDetailedNotifier(notifierType string, params NotifierParams) DetailedNotifier
type Domain ¶
type Domain struct { ID string `json:"id"` AppID string `json:"app_id"` Name string `json:"name"` TLSCert string `json:"tlscert,omitempty"` TLSKey string `json:"tlskey,omitempty"` SSL bool `json:"ssl"` Validity time.Time `json:"validity"` Canonical bool `json:"canonical"` LetsEncrypt bool `json:"letsencrypt"` LetsEncryptStatus LetsEncryptStatus `json:"letsencrypt_status"` AcmeDNSFqdn string `json:"acme_dns_fqdn"` AcmeDNSValue string `json:"acme_dns_value"` AcmeDNSError ACMEErrorVariables `json:"acme_dns_error"` }
type DomainsRes ¶
type DomainsRes struct {
Domains []Domain `json:"domains"`
}
type DomainsService ¶
type DomainsService interface { DomainsList(app string) ([]Domain, error) DomainsAdd(app string, d Domain) (Domain, error) DomainsRemove(app string, id string) error DomainsUpdate(app, id, cert, key string) (Domain, error) DomainSetCanonical(app, id string) (Domain, error) DomainUnsetCanonical(app string) (Domain, error) }
type DownloadURLRes ¶
type DownloadURLRes struct {
DownloadURL string `json:"download_url"`
}
type Event ¶
type Event struct { ID string `json:"id"` AppID string `json:"app_id"` CreatedAt time.Time `json:"created_at"` User EventUser `json:"user"` Type EventTypeName `json:"type"` AppName string `json:"app_name"` RawTypeData json.RawMessage `json:"type_data"` TypeData map[string]interface{} `json:"-"` }
func (*Event) PrintableType ¶
func (*Event) Specialize ¶
func (pev *Event) Specialize() DetailedEvent
func (*Event) TypeDataPtr ¶
func (ev *Event) TypeDataPtr() interface{}
type EventAcceptCollaboratorType ¶
type EventAcceptCollaboratorType struct { Event TypeData EventAcceptCollaboratorTypeData `json:"type_data"` }
func (*EventAcceptCollaboratorType) String ¶
func (ev *EventAcceptCollaboratorType) String() string
func (*EventAcceptCollaboratorType) TypeDataPtr ¶
func (e *EventAcceptCollaboratorType) TypeDataPtr() interface{}
type EventAcceptCollaboratorTypeData ¶
type EventAcceptCollaboratorTypeData struct {
Collaborator EventCollaborator `json:"collaborator"`
}
Inviter is filled there
type EventAddCreditType ¶
type EventAddCreditType struct { Event TypeData EventAddCreditTypeData `json:"type_data"` }
func (*EventAddCreditType) String ¶
func (ev *EventAddCreditType) String() string
func (*EventAddCreditType) TypeDataPtr ¶
func (e *EventAddCreditType) TypeDataPtr() interface{}
type EventAddCreditTypeData ¶
type EventAddPaymentMethodType ¶
type EventAddPaymentMethodType struct { Event TypeData EventAddPaymentMethodTypeData `json:"type_data"` }
func (*EventAddPaymentMethodType) String ¶
func (ev *EventAddPaymentMethodType) String() string
func (*EventAddPaymentMethodType) TypeDataPtr ¶
func (e *EventAddPaymentMethodType) TypeDataPtr() interface{}
type EventAddVoucherType ¶
type EventAddVoucherType struct { Event TypeData EventAddVoucherTypeData `json:"type_data"` }
func (*EventAddVoucherType) String ¶
func (ev *EventAddVoucherType) String() string
func (*EventAddVoucherType) TypeDataPtr ¶
func (e *EventAddVoucherType) TypeDataPtr() interface{}
type EventAddVoucherTypeData ¶
type EventAddVoucherTypeData struct {
Code string `json:"code"`
}
type EventAddon ¶
type EventAddonUpdatedType ¶
type EventAddonUpdatedType struct { Event TypeData EventAddonUpdatedTypeData `json:"type_data"` }
func (*EventAddonUpdatedType) String ¶
func (ev *EventAddonUpdatedType) String() string
func (*EventAddonUpdatedType) TypeDataPtr ¶
func (e *EventAddonUpdatedType) TypeDataPtr() interface{}
type EventAddonUpdatedTypeData ¶
type EventAddonUpdatedTypeData struct { AddonID string `json:"addon_id"` AddonPlanName string `json:"addon_plan_name"` AddonResourceID string `json:"addon_resource_id"` AddonProviderID string `json:"addon_provider_id"` AddonProviderName string `json:"addon_provider_name"` // Status has only two items when is updated, the old value and the new value, in this order Status []AddonStatus `json:"status"` // AttributesChanged contain names of changed attributes AttributesChanged []string `json:"attributes_changed"` }
type EventAlertType ¶
type EventAlertType struct { Event TypeData EventAlertTypeData `json:"type_data"` }
func (*EventAlertType) String ¶
func (ev *EventAlertType) String() string
func (*EventAlertType) TypeDataPtr ¶
func (e *EventAlertType) TypeDataPtr() interface{}
type EventAlertTypeData ¶
type EventAlertTypeData struct { SenderName string `json:"sender_name"` Metric string `json:"metric"` Limit float64 `json:"limit"` LimitText string `json:"limit_text"` Value float64 `json:"value"` ValueText string `json:"value_text"` Activated bool `json:"activated"` SendWhenBelow bool `json:"send_when_below"` RawLimit float64 `json:"raw_limit"` RawValue float64 `json:"raw_value"` }
type EventAuthorizeGithubType ¶
type EventAuthorizeGithubType struct { Event TypeData EventAuthorizeGithubTypeData `json:"type_data"` }
func (*EventAuthorizeGithubType) String ¶
func (ev *EventAuthorizeGithubType) String() string
func (*EventAuthorizeGithubType) TypeDataPtr ¶
func (e *EventAuthorizeGithubType) TypeDataPtr() interface{}
type EventCategory ¶
type EventCollaborator ¶
type EventCrashType ¶
type EventCrashType struct { Event TypeData EventCrashTypeData `json:"type_data"` }
func (*EventCrashType) String ¶
func (ev *EventCrashType) String() string
func (*EventCrashType) TypeDataPtr ¶
func (e *EventCrashType) TypeDataPtr() interface{}
type EventCrashTypeData ¶
type EventDeleteAddonLogDrainType ¶
type EventDeleteAddonLogDrainType struct { Event TypeData EventDeleteAddonLogDrainTypeData `json:"type_data"` }
func (*EventDeleteAddonLogDrainType) String ¶
func (ev *EventDeleteAddonLogDrainType) String() string
func (*EventDeleteAddonLogDrainType) TypeDataPtr ¶
func (e *EventDeleteAddonLogDrainType) TypeDataPtr() interface{}
type EventDeleteAddonLogDrainTypeData ¶
type EventDeleteAddonLogDrainTypeData struct { URL string `json:"url"` AddonUUID string `json:"addon_uuid"` AddonName string `json:"addon_name"` }
Delete addon log drain
type EventDeleteAddonType ¶
type EventDeleteAddonType struct { Event TypeData EventDeleteAddonTypeData `json:"type_data"` }
func (*EventDeleteAddonType) String ¶
func (ev *EventDeleteAddonType) String() string
func (*EventDeleteAddonType) TypeDataPtr ¶
func (e *EventDeleteAddonType) TypeDataPtr() interface{}
type EventDeleteAddonTypeData ¶
type EventDeleteAddonTypeData struct {
EventAddon
}
type EventDeleteAlertType ¶
type EventDeleteAlertType struct { Event TypeData EventDeleteAlertTypeData `json:"type_data"` }
func (*EventDeleteAlertType) String ¶
func (ev *EventDeleteAlertType) String() string
func (*EventDeleteAlertType) TypeDataPtr ¶
func (e *EventDeleteAlertType) TypeDataPtr() interface{}
type EventDeleteAppType ¶
type EventDeleteAppType struct {
Event
}
func (*EventDeleteAppType) String ¶
func (ev *EventDeleteAppType) String() string
type EventDeleteAutoscalerType ¶
type EventDeleteAutoscalerType struct { Event TypeData EventDeleteAutoscalerTypeData `json:"type_data"` }
func (*EventDeleteAutoscalerType) String ¶
func (ev *EventDeleteAutoscalerType) String() string
func (*EventDeleteAutoscalerType) TypeDataPtr ¶
func (e *EventDeleteAutoscalerType) TypeDataPtr() interface{}
type EventDeleteCollaboratorType ¶
type EventDeleteCollaboratorType struct { Event TypeData EventDeleteCollaboratorTypeData `json:"type_data"` }
func (*EventDeleteCollaboratorType) String ¶
func (ev *EventDeleteCollaboratorType) String() string
func (*EventDeleteCollaboratorType) TypeDataPtr ¶
func (e *EventDeleteCollaboratorType) TypeDataPtr() interface{}
type EventDeleteCollaboratorTypeData ¶
type EventDeleteCollaboratorTypeData struct {
Collaborator EventCollaborator `json:"collaborator"`
}
type EventDeleteDomainType ¶
type EventDeleteDomainType struct { Event TypeData EventDeleteDomainTypeData `json:"type_data"` }
func (*EventDeleteDomainType) String ¶
func (ev *EventDeleteDomainType) String() string
func (*EventDeleteDomainType) TypeDataPtr ¶
func (e *EventDeleteDomainType) TypeDataPtr() interface{}
type EventDeleteDomainTypeData ¶
type EventDeleteDomainTypeData struct {
Hostname string `json:"hostname"`
}
type EventDeleteIntegrationType ¶
type EventDeleteIntegrationType struct { Event TypeData EventDeleteIntegrationTypeData `json:"type_data"` }
func (*EventDeleteIntegrationType) String ¶
func (ev *EventDeleteIntegrationType) String() string
func (*EventDeleteIntegrationType) TypeDataPtr ¶
func (e *EventDeleteIntegrationType) TypeDataPtr() interface{}
type EventDeleteKeyType ¶
type EventDeleteKeyType struct { Event TypeData EventDeleteKeyTypeData `json:"type_data"` }
func (*EventDeleteKeyType) String ¶
func (ev *EventDeleteKeyType) String() string
func (*EventDeleteKeyType) TypeDataPtr ¶
func (e *EventDeleteKeyType) TypeDataPtr() interface{}
type EventDeleteKeyTypeData ¶
type EventDeleteKeyTypeData struct {
Name string `json:"name"`
}
type EventDeleteLogDrainType ¶
type EventDeleteLogDrainType struct { Event TypeData EventDeleteLogDrainTypeData `json:"type_data"` }
func (*EventDeleteLogDrainType) String ¶
func (ev *EventDeleteLogDrainType) String() string
func (*EventDeleteLogDrainType) TypeDataPtr ¶
func (e *EventDeleteLogDrainType) TypeDataPtr() interface{}
type EventDeleteLogDrainTypeData ¶
type EventDeleteLogDrainTypeData struct {
URL string `json:"url"`
}
Delete log drain
type EventDeleteVariableType ¶
type EventDeleteVariableType struct { Event TypeData EventDeleteVariableTypeData `json:"type_data"` }
func (*EventDeleteVariableType) String ¶
func (ev *EventDeleteVariableType) String() string
func (*EventDeleteVariableType) TypeDataPtr ¶
func (e *EventDeleteVariableType) TypeDataPtr() interface{}
type EventDeleteVariableTypeData ¶
type EventDeleteVariableTypeData struct {
EventVariable
}
type EventDeploymentType ¶
type EventDeploymentType struct { Event TypeData EventDeploymentTypeData `json:"type_data"` }
func (*EventDeploymentType) String ¶
func (ev *EventDeploymentType) String() string
func (*EventDeploymentType) TypeDataPtr ¶
func (e *EventDeploymentType) TypeDataPtr() interface{}
type EventDeploymentTypeData ¶
type EventEditAppType ¶
type EventEditAppType struct { Event TypeData EventEditAppTypeData `json:"type_data"` }
func (*EventEditAppType) String ¶
func (ev *EventEditAppType) String() string
func (*EventEditAppType) TypeDataPtr ¶
func (e *EventEditAppType) TypeDataPtr() interface{}
type EventEditAppTypeData ¶
type EventEditAppTypeData struct {
ForceHTTPS *bool `json:"force_https"`
}
type EventEditDomainType ¶
type EventEditDomainType struct { Event TypeData EventEditDomainTypeData `json:"type_data"` }
func (*EventEditDomainType) String ¶
func (ev *EventEditDomainType) String() string
func (*EventEditDomainType) TypeDataPtr ¶
func (e *EventEditDomainType) TypeDataPtr() interface{}
type EventEditDomainTypeData ¶
type EventEditVariableType ¶
type EventEditVariableType struct { Event TypeData EventEditVariableTypeData `json:"type_data"` }
func (*EventEditVariableType) String ¶
func (ev *EventEditVariableType) String() string
func (*EventEditVariableType) TypeDataPtr ¶
func (e *EventEditVariableType) TypeDataPtr() interface{}
func (*EventEditVariableType) Who ¶
func (ev *EventEditVariableType) Who() string
type EventEditVariableTypeData ¶
type EventEditVariableTypeData struct { EventVariable OldValue string `json:"old_value"` AddonName string `json:"addon_name"` }
type EventEditVariablesType ¶
type EventEditVariablesType struct { Event TypeData EventEditVariablesTypeData `json:"type_data"` }
func (*EventEditVariablesType) String ¶
func (ev *EventEditVariablesType) String() string
func (*EventEditVariablesType) TypeDataPtr ¶
func (e *EventEditVariablesType) TypeDataPtr() interface{}
type EventEditVariablesTypeData ¶
type EventEditVariablesTypeData struct { NewVars EventVariables `json:"new_vars"` UpdatedVars EventVariables `json:"updated_vars"` DeletedVars EventVariables `json:"deleted_vars"` }
type EventLinkGithubType ¶
type EventLinkGithubType struct { Event TypeData EventLinkGithubTypeData `json:"type_data"` }
func (*EventLinkGithubType) String ¶
func (ev *EventLinkGithubType) String() string
func (*EventLinkGithubType) TypeDataPtr ¶
func (e *EventLinkGithubType) TypeDataPtr() interface{}
type EventLinkGithubTypeData ¶
type EventLinkSCMType ¶
type EventLinkSCMType struct { Event TypeData EventLinkSCMTypeData `json:"type_data"` }
func (*EventLinkSCMType) String ¶
func (ev *EventLinkSCMType) String() string
func (*EventLinkSCMType) TypeDataPtr ¶
func (e *EventLinkSCMType) TypeDataPtr() interface{}
type EventLinkSCMTypeData ¶
type EventNewAddonLogDrainType ¶
type EventNewAddonLogDrainType struct { Event TypeData EventNewAddonLogDrainTypeData `json:"type_data"` }
func (*EventNewAddonLogDrainType) String ¶
func (ev *EventNewAddonLogDrainType) String() string
func (*EventNewAddonLogDrainType) TypeDataPtr ¶
func (e *EventNewAddonLogDrainType) TypeDataPtr() interface{}
type EventNewAddonLogDrainTypeData ¶
type EventNewAddonLogDrainTypeData struct { URL string `json:"url"` AddonUUID string `json:"addon_uuid"` AddonName string `json:"addon_name"` }
New addon log drain
type EventNewAddonType ¶
type EventNewAddonType struct { Event TypeData EventNewAddonTypeData `json:"type_data"` }
func (*EventNewAddonType) String ¶
func (ev *EventNewAddonType) String() string
func (*EventNewAddonType) TypeDataPtr ¶
func (e *EventNewAddonType) TypeDataPtr() interface{}
type EventNewAddonTypeData ¶
type EventNewAddonTypeData struct {
EventAddon
}
type EventNewAlertType ¶
type EventNewAlertType struct { Event TypeData EventNewAlertTypeData `json:"type_data"` }
func (*EventNewAlertType) String ¶
func (ev *EventNewAlertType) String() string
func (*EventNewAlertType) TypeDataPtr ¶
func (e *EventNewAlertType) TypeDataPtr() interface{}
type EventNewAlertTypeData ¶
type EventNewAppType ¶
type EventNewAppType struct { Event TypeData EventNewAppTypeData `json:"type_data"` }
func (*EventNewAppType) String ¶
func (ev *EventNewAppType) String() string
func (*EventNewAppType) TypeDataPtr ¶
func (e *EventNewAppType) TypeDataPtr() interface{}
type EventNewAppTypeData ¶
type EventNewAppTypeData struct {
GitSource string `json:"git_source"`
}
type EventNewAutoscalerType ¶
type EventNewAutoscalerType struct { Event TypeData EventNewAutoscalerTypeData `json:"type_data"` }
func (*EventNewAutoscalerType) String ¶
func (ev *EventNewAutoscalerType) String() string
func (*EventNewAutoscalerType) TypeDataPtr ¶
func (e *EventNewAutoscalerType) TypeDataPtr() interface{}
type EventNewCollaboratorType ¶
type EventNewCollaboratorType struct { Event TypeData EventNewCollaboratorTypeData `json:"type_data"` }
func (*EventNewCollaboratorType) String ¶
func (ev *EventNewCollaboratorType) String() string
func (*EventNewCollaboratorType) TypeDataPtr ¶
func (e *EventNewCollaboratorType) TypeDataPtr() interface{}
type EventNewCollaboratorTypeData ¶
type EventNewCollaboratorTypeData struct {
Collaborator EventCollaborator `json:"collaborator"`
}
type EventNewDomainType ¶
type EventNewDomainType struct { Event TypeData EventNewDomainTypeData `json:"type_data"` }
func (*EventNewDomainType) String ¶
func (ev *EventNewDomainType) String() string
func (*EventNewDomainType) TypeDataPtr ¶
func (e *EventNewDomainType) TypeDataPtr() interface{}
type EventNewDomainTypeData ¶
type EventNewIntegrationType ¶
type EventNewIntegrationType struct { Event TypeData EventNewIntegrationTypeData `json:"type_data"` }
func (*EventNewIntegrationType) String ¶
func (ev *EventNewIntegrationType) String() string
func (*EventNewIntegrationType) TypeDataPtr ¶
func (e *EventNewIntegrationType) TypeDataPtr() interface{}
type EventNewKeyType ¶
type EventNewKeyType struct { Event TypeData EventNewKeyTypeData `json:"type_data"` }
func (*EventNewKeyType) String ¶
func (ev *EventNewKeyType) String() string
func (*EventNewKeyType) TypeDataPtr ¶
func (e *EventNewKeyType) TypeDataPtr() interface{}
type EventNewKeyTypeData ¶
type EventNewLogDrainType ¶
type EventNewLogDrainType struct { Event TypeData EventNewLogDrainTypeData `json:"type_data"` }
func (*EventNewLogDrainType) String ¶
func (ev *EventNewLogDrainType) String() string
func (*EventNewLogDrainType) TypeDataPtr ¶
func (e *EventNewLogDrainType) TypeDataPtr() interface{}
type EventNewLogDrainTypeData ¶
type EventNewLogDrainTypeData struct {
URL string `json:"url"`
}
New log drain
type EventNewUserType ¶
type EventNewUserType struct { Event TypeData EventNewUserTypeData `json:"type_data"` }
func (*EventNewUserType) String ¶
func (ev *EventNewUserType) String() string
func (*EventNewUserType) TypeDataPtr ¶
func (e *EventNewUserType) TypeDataPtr() interface{}
type EventNewUserTypeData ¶
type EventNewUserTypeData struct { }
type EventNewVariableType ¶
type EventNewVariableType struct { Event TypeData EventNewVariableTypeData `json:"type_data"` }
func (*EventNewVariableType) String ¶
func (ev *EventNewVariableType) String() string
func (*EventNewVariableType) TypeDataPtr ¶
func (e *EventNewVariableType) TypeDataPtr() interface{}
func (*EventNewVariableType) Who ¶
func (ev *EventNewVariableType) Who() string
type EventNewVariableTypeData ¶
type EventNewVariableTypeData struct { AddonName string `json:"addon_name"` EventVariable }
type EventPaymentAttemptType ¶
type EventPaymentAttemptType struct { Event TypeData EventPaymentAttemptTypeData `json:"type_data"` }
func (*EventPaymentAttemptType) String ¶
func (ev *EventPaymentAttemptType) String() string
func (*EventPaymentAttemptType) TypeDataPtr ¶
func (e *EventPaymentAttemptType) TypeDataPtr() interface{}
type EventRenameAppType ¶
type EventRenameAppType struct { Event TypeData EventRenameAppTypeData `json:"type_data"` }
func (*EventRenameAppType) String ¶
func (ev *EventRenameAppType) String() string
func (*EventRenameAppType) TypeDataPtr ¶
func (e *EventRenameAppType) TypeDataPtr() interface{}
type EventRenameAppTypeData ¶
type EventRestartType ¶
type EventRestartType struct { Event TypeData EventRestartTypeData `json:"type_data"` }
func (*EventRestartType) String ¶
func (ev *EventRestartType) String() string
func (*EventRestartType) TypeDataPtr ¶
func (e *EventRestartType) TypeDataPtr() interface{}
func (*EventRestartType) Who ¶
func (ev *EventRestartType) Who() string
type EventRestartTypeData ¶
type EventResumeAddonType ¶
type EventResumeAddonType struct { Event TypeData EventResumeAddonTypeData `json:"type_data"` }
func (*EventResumeAddonType) String ¶
func (ev *EventResumeAddonType) String() string
func (*EventResumeAddonType) TypeDataPtr ¶
func (e *EventResumeAddonType) TypeDataPtr() interface{}
type EventResumeAddonTypeData ¶
type EventResumeAddonTypeData struct {
EventAddon
}
type EventRevokeGithubType ¶
type EventRevokeGithubType struct {
Event
}
func (*EventRevokeGithubType) String ¶
func (ev *EventRevokeGithubType) String() string
func (*EventRevokeGithubType) TypeDataPtr ¶
func (e *EventRevokeGithubType) TypeDataPtr() interface{}
type EventRunType ¶
type EventRunType struct { Event TypeData EventRunTypeData `json:"type_data"` }
func (*EventRunType) String ¶
func (ev *EventRunType) String() string
func (*EventRunType) TypeDataPtr ¶
func (e *EventRunType) TypeDataPtr() interface{}
type EventRunTypeData ¶
type EventScaleType ¶
type EventScaleType struct { Event TypeData EventScaleTypeData `json:"type_data"` }
func (*EventScaleType) String ¶
func (ev *EventScaleType) String() string
func (*EventScaleType) TypeDataPtr ¶
func (e *EventScaleType) TypeDataPtr() interface{}
type EventScaleTypeData ¶
type EventStartRegionMigrationType ¶
type EventStartRegionMigrationType struct { Event TypeData EventStartRegionMigrationTypeData `json:"type_data"` }
func (*EventStartRegionMigrationType) String ¶
func (ev *EventStartRegionMigrationType) String() string
func (*EventStartRegionMigrationType) TypeDataPtr ¶
func (e *EventStartRegionMigrationType) TypeDataPtr() interface{}
type EventStopAppType ¶
type EventStopAppType struct { Event TypeData EventStopAppTypeData `json:"type_data"` }
func (*EventStopAppType) String ¶
func (ev *EventStopAppType) String() string
func (*EventStopAppType) TypeDataPtr ¶
func (e *EventStopAppType) TypeDataPtr() interface{}
type EventStopAppTypeData ¶
type EventStopAppTypeData struct {
Reason string `json:"reason"`
}
type EventSuspendAddonType ¶
type EventSuspendAddonType struct { Event TypeData EventSuspendAddonTypeData `json:"type_data"` }
func (*EventSuspendAddonType) String ¶
func (ev *EventSuspendAddonType) String() string
func (*EventSuspendAddonType) TypeDataPtr ¶
func (e *EventSuspendAddonType) TypeDataPtr() interface{}
type EventSuspendAddonTypeData ¶
type EventSuspendAddonTypeData struct { EventAddon Reason string `json:"reason"` }
type EventTransferAppType ¶
type EventTransferAppType struct { Event TypeData EventTransferAppTypeData `json:"type_data"` }
func (*EventTransferAppType) String ¶
func (ev *EventTransferAppType) String() string
func (*EventTransferAppType) TypeDataPtr ¶
func (e *EventTransferAppType) TypeDataPtr() interface{}
type EventTypeName ¶
type EventTypeName string
const ( EventNewUser EventTypeName = "new_user" EventNewApp EventTypeName = "new_app" EventEditApp EventTypeName = "edit_app" EventDeleteApp EventTypeName = "delete_app" EventRenameApp EventTypeName = "rename_app" EventTransferApp EventTypeName = "transfer_app" EventRestart EventTypeName = "restart" EventScale EventTypeName = "scale" EventStopApp EventTypeName = "stop_app" EventCrash EventTypeName = "crash" EventDeployment EventTypeName = "deployment" EventLinkSCM EventTypeName = "link_scm" EventUnlinkSCM EventTypeName = "unlink_scm" EventNewIntegration EventTypeName = "new_integration" EventDeleteIntegration EventTypeName = "delete_integration" EventAuthorizeGithub EventTypeName = "authorize_github" EventRevokeGithub EventTypeName = "revoke_github" EventRun EventTypeName = "run" EventNewDomain EventTypeName = "new_domain" EventEditDomain EventTypeName = "edit_domain" EventDeleteDomain EventTypeName = "delete_domain" EventNewAddon EventTypeName = "new_addon" EventUpgradeAddon EventTypeName = "upgrade_addon" EventUpgradeDatabase EventTypeName = "upgrade_database" EventDeleteAddon EventTypeName = "delete_addon" EventResumeAddon EventTypeName = "resume_addon" EventSuspendAddon EventTypeName = "suspend_addon" EventNewCollaborator EventTypeName = "new_collaborator" EventAcceptCollaborator EventTypeName = "accept_collaborator" EventDeleteCollaborator EventTypeName = "delete_collaborator" EventNewVariable EventTypeName = "new_variable" EventEditVariable EventTypeName = "edit_variable" EventEditVariables EventTypeName = "edit_variables" EventDeleteVariable EventTypeName = "delete_variable" EventAddCredit EventTypeName = "add_credit" EventAddPaymentMethod EventTypeName = "add_payment_method" EventAddVoucher EventTypeName = "add_voucher" EventNewKey EventTypeName = "new_key" EventDeleteKey EventTypeName = "delete_key" EventPaymentAttempt EventTypeName = "payment_attempt" EventNewAlert EventTypeName = "new_alert" EventAlert EventTypeName = "alert" EventDeleteAlert EventTypeName = "delete_alert" EventNewAutoscaler EventTypeName = "new_autoscaler" EventDeleteAutoscaler EventTypeName = "delete_autoscaler" EventAddonUpdated EventTypeName = "addon_updated" EventStartRegionMigration EventTypeName = "start_region_migration" EventNewLogDrain EventTypeName = "new_log_drain" EventDeleteLogDrain EventTypeName = "delete_log_drain" EventNewAddonLogDrain EventTypeName = "new_addon_log_drain" EventDeleteAddonLogDrain EventTypeName = "delete_addon_log_drain" // EventLinkGithub and EventUnlinkGithub events are kept for // retro-compatibility. They are replaced by SCM events. EventLinkGithub EventTypeName = "link_github" EventUnlinkGithub EventTypeName = "unlink_github" )
type EventUnlinkGithubType ¶
type EventUnlinkGithubType struct { Event TypeData EventUnlinkGithubTypeData `json:"type_data"` }
func (*EventUnlinkGithubType) String ¶
func (ev *EventUnlinkGithubType) String() string
func (*EventUnlinkGithubType) TypeDataPtr ¶
func (e *EventUnlinkGithubType) TypeDataPtr() interface{}
type EventUnlinkSCMType ¶
type EventUnlinkSCMType struct { Event TypeData EventUnlinkSCMTypeData `json:"type_data"` }
func (*EventUnlinkSCMType) String ¶
func (ev *EventUnlinkSCMType) String() string
func (*EventUnlinkSCMType) TypeDataPtr ¶
func (e *EventUnlinkSCMType) TypeDataPtr() interface{}
type EventUnlinkSCMTypeData ¶
type EventUpgradeAddonType ¶
type EventUpgradeAddonType struct { Event TypeData EventUpgradeAddonTypeData `json:"type_data"` }
func (*EventUpgradeAddonType) String ¶
func (ev *EventUpgradeAddonType) String() string
func (*EventUpgradeAddonType) TypeDataPtr ¶
func (e *EventUpgradeAddonType) TypeDataPtr() interface{}
type EventUpgradeAddonTypeData ¶
type EventUpgradeAddonTypeData struct { EventAddon OldPlanName string `json:"old_plan_name"` NewPlanName string `json:"new_plan_name"` }
type EventUpgradeDatabaseType ¶
type EventUpgradeDatabaseType struct { Event TypeData EventUpgradeDatabaseTypeData `json:"type_data"` }
func (*EventUpgradeDatabaseType) String ¶
func (ev *EventUpgradeDatabaseType) String() string
func (*EventUpgradeDatabaseType) TypeDataPtr ¶
func (e *EventUpgradeDatabaseType) TypeDataPtr() interface{}
func (*EventUpgradeDatabaseType) Who ¶
func (ev *EventUpgradeDatabaseType) Who() string
type EventVariable ¶
type EventVariables ¶
type EventVariables []EventVariable
func (EventVariables) Names ¶
func (evs EventVariables) Names() string
type Events ¶
type Events []DetailedEvent
type EventsRes ¶
type EventsRes struct { Events []*Event `json:"events"` Meta struct { PaginationMeta PaginationMeta `json:"pagination"` } }
type EventsService ¶
type EventsService interface { EventTypesList() ([]EventType, error) EventCategoriesList() ([]EventCategory, error) EventsList(app string, opts PaginationOpts) (Events, PaginationMeta, error) UserEventsList(opts PaginationOpts) (Events, PaginationMeta, error) }
type GithubLink ¶
type GithubLink struct { ID string `json:"id"` Linker GithubLinkLinker `json:"linker"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` GithubSource string `json:"github_source"` GithubBranch string `json:"github_branch"` AutoDeployEnabled bool `json:"auto_deploy_enabled"` GithubIntegrationUUID string `json:"github_integration_uuid"` DeployReviewAppsEnabled bool `json:"deploy_review_apps_enabled"` DestroyOnCloseEnabled bool `json:"delete_on_close_enabled"` DestroyOnStaleEnabled bool `json:"delete_stale_enabled"` HoursBeforeDeleteOnClose uint `json:"hours_before_delete_on_close"` HoursBeforeDeleteStale uint `json:"hours_before_delete_stale"` LastAutoDeployAt time.Time `json:"last_auto_deploy_at"` }
type GithubLinkLinker ¶
type GithubLinkParams ¶
type GithubLinkParams struct { GithubSource *string `json:"github_source,omitempty"` GithubBranch *string `json:"github_branch,omitempty"` AutoDeployEnabled *bool `json:"auto_deploy_enabled,omitempty"` DeployReviewAppsEnabled *bool `json:"deploy_review_apps_enabled,omitempty"` DestroyOnCloseEnabled *bool `json:"delete_on_close_enabled,omitempty"` HoursBeforeDeleteOnClose *uint `json:"hours_before_delete_on_close,omitempty"` DestroyStaleEnabled *bool `json:"delete_stale_enabled,omitempty"` HoursBeforeDeleteStale *uint `json:"hours_before_delete_stale,omitempty"` }
type GithubLinkResponse ¶
type GithubLinkResponse struct {
GithubLink *GithubLink `json:"github_repo_link"`
}
type GithubLinkService ¶
type GithubLinkService interface { GithubLinkShow(app string) (*GithubLink, error) GithubLinkAdd(app string, params GithubLinkParams) (*GithubLink, error) GithubLinkUpdate(app, id string, params GithubLinkParams) (*GithubLink, error) GithubLinkDelete(app string, id string) error GithubLinkManualDeploy(app, id, branch string) error }
type GithubLinksResponse ¶
type GithubLinksResponse struct {
GithubLinks []*GithubLink `json:"github_repo_links"`
}
type Instance ¶
type Instance struct { ID string `json:"id"` Hostname string `json:"hostname"` Port int `json:"port"` Status InstanceStatus `json:"status"` Type InstanceType `json:"type"` Features []string `json:"features"` PrivateIP string `json:"private_ip"` }
type InstanceStatus ¶
type InstanceStatus string
const ( InstanceStatusBooting InstanceStatus = "booting" InstanceStatusRunning InstanceStatus = "running" InstanceStatusRestarting InstanceStatus = "restarting" InstanceStatusMigrating InstanceStatus = "migrating" InstanceStatusUpgrading InstanceStatus = "upgrading" InstanceStatusStopped InstanceStatus = "stopped" InstanceStatusRemoving InstanceStatus = "removing" )
type InstanceType ¶
type InstanceType string
const ( // InstanceTypeDBNode instances represent database instances holding data InstanceTypeDBNode InstanceType = "db-node" // InstanceTypeUtility instances are those running service used for running a // service which is neither holding data nor routing requests utilities as // stated by its Name InstanceTypeUtility InstanceType = "utility" // InstanceTypeHAProxy are instances running a HAProxy reverse proxy in order // to route requests to the InstanceTypeDBNodes InstanceTypeHAProxy InstanceType = "haproxy" )
type KeysService ¶
type LetsEncryptStatus ¶
type LetsEncryptStatus string
const ( LetsEncryptStatusPendingDNS LetsEncryptStatus = "pending_dns" LetsEncryptStatusNew LetsEncryptStatus = "new" LetsEncryptStatusCreated LetsEncryptStatus = "created" LetsEncryptStatusDNSRequired LetsEncryptStatus = "dns_required" LetsEncryptStatusError LetsEncryptStatus = "error" )
type ListParams ¶
type ListParams struct {
AddonProviders []*AddonProvider `json:"addon_providers"`
}
type LogDrainAddParams ¶
type LogDrainRes ¶
type LogDrainRes struct {
Drain LogDrain `json:"drain"`
}
type LogDrainsRes ¶
type LogDrainsRes struct {
Drains []LogDrain `json:"drains"`
}
type LogDrainsService ¶
type LogDrainsService interface { LogDrainsList(app string) ([]LogDrain, error) LogDrainAdd(app string, params LogDrainAddParams) (*LogDrainRes, error) LogDrainRemove(app, URL string) error LogDrainAddonRemove(app, addonID string, URL string) error LogDrainsAddonList(app string, addonID string) (LogDrainsRes, error) LogDrainAddonAdd(app string, addonID string, params LogDrainAddParams) (*LogDrainRes, error) }
type LoginError ¶
func (*LoginError) Error ¶
func (err *LoginError) Error() string
type LoginParams ¶
type LoginResponse ¶
type LoginResponse struct {
User *User `json:"user"`
}
type LoginService ¶
type LoginService interface {
Login(email, password string) (*LoginResponse, error)
}
type LogsArchiveItem ¶
type LogsArchivesResponse ¶
type LogsArchivesResponse struct { NextCursor string `json:"next_cursor"` HasMore bool `json:"has_more"` Archives []LogsArchiveItem `json:"archives"` }
type LogsArchivesService ¶
type LogsArchivesService interface { LogsArchivesByCursor(app string, cursor string) (*LogsArchivesResponse, error) LogsArchives(app string, page int) (*LogsArchivesResponse, error) }
type LogsService ¶
type MockSubresourceService ¶
type MockSubresourceService struct {
// contains filtered or unexported fields
}
MockSubresourceService is a mock of SubresourceService interface
func NewMockSubresourceService ¶
func NewMockSubresourceService(ctrl *gomock.Controller) *MockSubresourceService
NewMockSubresourceService creates a new mock instance
func (*MockSubresourceService) EXPECT ¶
func (m *MockSubresourceService) EXPECT() *MockSubresourceServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockSubresourceServiceMockRecorder ¶
type MockSubresourceServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockSubresourceServiceMockRecorder is the mock recorder for MockSubresourceService
type NotificationPlatform ¶
type NotificationPlatformsService ¶
type NotificationPlatformsService interface { NotificationPlatformsList() ([]*NotificationPlatform, error) NotificationPlatformByName(name string) ([]*NotificationPlatform, error) }
type Notifier ¶
type Notifier struct { ID string `json:"id"` AppID string `json:"app_id"` Active *bool `json:"active,omitempty"` Name string `json:"name,omitempty"` Type NotifierType `json:"type"` SendAllEvents *bool `json:"send_all_events,omitempty"` SendAllAlerts *bool `json:"send_all_alerts,omitempty"` SelectedEventIDs []string `json:"selected_event_ids,omitempty"` TypeData map[string]interface{} `json:"-"` RawTypeData json.RawMessage `json:"type_data"` PlatformID string `json:"platform_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Struct used to represent a notifier.
func (*Notifier) GetNotifier ¶
DetailedNotifier implementation
func (*Notifier) GetSelectedEventIDs ¶
func (*Notifier) GetSendAllAlerts ¶
func (*Notifier) GetSendAllEvents ¶
func (*Notifier) GetType ¶
func (not *Notifier) GetType() NotifierType
func (*Notifier) Specialize ¶
func (pnot *Notifier) Specialize() DetailedNotifier
func (*Notifier) TypeDataMap ¶
func (*Notifier) TypeDataPtr ¶
func (not *Notifier) TypeDataPtr() interface{}
type NotifierEmailType ¶
type NotifierEmailType struct { Notifier TypeData NotifierEmailTypeData `json:"type_data,omitempty"` }
func (*NotifierEmailType) TypeDataMap ¶
func (not *NotifierEmailType) TypeDataMap() map[string]interface{}
func (*NotifierEmailType) TypeDataPtr ¶
func (e *NotifierEmailType) TypeDataPtr() interface{}
type NotifierEmailTypeData ¶
type NotifierOutput ¶
type NotifierOutput struct { *Notifier TypeData NotifierTypeDataParams `json:"type_data,omitempty"` RawTypeData omit `json:",omitempty"` // Will always be empty and not serialized }
Struct used to serialize a notifier
type NotifierParams ¶
type NotifierParams struct { Active *bool Name string SendAllEvents *bool SendAllAlerts *bool SelectedEventIDs []string PlatformID string // Options PhoneNumber string // SMS notifier Emails []string // Email notifier UserIDs []string // Email notifier WebhookURL string // Webhook and Slack notifier }
NotifierParams will be given as a parameter in notifiers function's
type NotifierSlackType ¶
type NotifierSlackType struct { Notifier TypeData NotifierSlackTypeData `json:"type_data,omitempty"` }
Slack
func (*NotifierSlackType) TypeDataMap ¶
func (not *NotifierSlackType) TypeDataMap() map[string]interface{}
func (*NotifierSlackType) TypeDataPtr ¶
func (e *NotifierSlackType) TypeDataPtr() interface{}
type NotifierSlackTypeData ¶
type NotifierSlackTypeData struct {
WebhookURL string `json:"webhook_url,omitempty"`
}
type NotifierType ¶
type NotifierType string
const ( NotifierWebhook NotifierType = "webhook" NotifierSlack NotifierType = "slack" NotifierEmail NotifierType = "email" )
type NotifierTypeDataParams ¶
type NotifierWebhookType ¶
type NotifierWebhookType struct { Notifier TypeData NotifierWebhookTypeData `json:"type_data,omitempty"` }
Webhook
func (*NotifierWebhookType) TypeDataMap ¶
func (not *NotifierWebhookType) TypeDataMap() map[string]interface{}
func (*NotifierWebhookType) TypeDataPtr ¶
func (e *NotifierWebhookType) TypeDataPtr() interface{}
type NotifierWebhookTypeData ¶
type NotifierWebhookTypeData struct {
WebhookURL string `json:"webhook_url,omitempty"`
}
type Notifiers ¶
type Notifiers []DetailedNotifier
type NotifiersService ¶
type NotifiersService interface { NotifiersList(app string) (Notifiers, error) NotifierProvision(app string, params NotifierParams) (*Notifier, error) NotifierByID(app, ID string) (*Notifier, error) NotifierUpdate(app, ID string, params NotifierParams) (*Notifier, error) NotifierDestroy(app, ID string) error }
type Operation ¶
type Operation struct { ID string `json:"id"` AppID string `json:"app_id"` CreatedAt time.Time `json:"created_at"` FinishedAt time.Time `json:"finished_at"` Status OperationStatus `json:"status"` Type OperationType `json:"type"` Error string `json:"error"` }
func (*Operation) ElapsedDuration ¶
type OperationResponse ¶
type OperationResponse struct {
Op Operation `json:"operation"`
}
type OperationStatus ¶
type OperationStatus string
const ( OperationStatusPending OperationStatus = "pending" OperationStatusDone OperationStatus = "done" OperationStatusRunning OperationStatus = "running" OperationStatusError OperationStatus = "error" )
type OperationType ¶
type OperationType string
const ( OperationTypeScale OperationType = "scale" OperationTypeStart OperationType = "start" )
type OperationsService ¶
type PaginationMeta ¶
type PaginationOpts ¶
func (PaginationOpts) ToMap ¶
func (opts PaginationOpts) ToMap() map[string]string
type PlansParams ¶
type PlansParams struct {
Plans []*Plan `json:"plans"`
}
type PlatformRes ¶
type PlatformRes struct {
NotificationPlatform *NotificationPlatform `json:"notification_platform"`
}
type PlatformsRes ¶
type PlatformsRes struct {
NotificationPlatforms []*NotificationPlatform `json:"notification_platforms"`
}
type PullRequest ¶
type PullRequest struct { Number int `json:"number"` BranchName string `json:"branch_name"` Title string `json:"title"` Url string `json:"url"` HtmlUrl string `json:"html_url"` Ref string `json:"ref"` BaseRef string `json:"base_ref"` CreatedAt time.Time `json:"created_at"` ClosedAt time.Time `json:"closed_at"` }
type RegionMigration ¶
type RegionMigration struct { ID string `json:"id"` SrcAppName string `json:"src_app_name"` DstAppName string `json:"dst_app_name"` AppID string `json:"app_id"` NewAppID string `json:"new_app_id"` Source string `json:"source"` Destination string `json:"destination"` Status RegionMigrationStatus `json:"status"` StartedAt time.Time `json:"started_at"` FinishedAt time.Time `json:"finished_at"` Steps Steps `json:"steps"` }
type RegionMigrationParams ¶
type RegionMigrationStatus ¶
type RegionMigrationStatus string
type RegionMigrationStep ¶
type RegionMigrationStep string
type RegionMigrationsService ¶
type RegionMigrationsService interface { CreateRegionMigration(appID string, params RegionMigrationParams) (RegionMigration, error) RunRegionMigrationStep(appID, migrationID string, step RegionMigrationStep) error ShowRegionMigration(appID, migrationID string) (RegionMigration, error) ListRegionMigrations(appID string) ([]RegionMigration, error) }
type RegionsService ¶
type ReviewApp ¶
type ReviewApp struct { ID string `json:"id"` RepoLinkID string `json:"repo_link_id"` AppID string `json:"app_id"` AppName string `json:"app_name"` ParentAppID string `json:"parent_app_id"` ParentAppName string `json:"parent_app_name"` CreatedAt time.Time `json:"created_at"` StaleDeletionDate time.Time `json:"stale_deletion_date"` OnCloseDeletionDate time.Time `json:"on_close_deletion_date"` PullRequest *PullRequest `json:"pull_request"` LastDeployment *Deployment `json:"last_deployment"` }
type RunsService ¶
type SCMIntegration ¶
type SCMIntegration struct { ID string `json:"id"` SCMType SCMType `json:"scm_type"` URL string `json:"url,omitempty"` AccessToken string `json:"access_token"` Uid string `json:"uid"` Username string `json:"username"` Email string `json:"email"` AvatarURL string `json:"avatar_url"` ProfileURL string `json:"profile_url"` }
type SCMIntegrationParams ¶
type SCMIntegrationParamsReq ¶
type SCMIntegrationParamsReq struct {
SCMIntegrationParams SCMIntegrationParams `json:"scm_integration"`
}
type SCMIntegrationRes ¶
type SCMIntegrationRes struct {
SCMIntegration SCMIntegration `json:"scm_integration"`
}
type SCMIntegrationsRes ¶
type SCMIntegrationsRes struct {
SCMIntegrations []SCMIntegration `json:"scm_integrations"`
}
type SCMIntegrationsService ¶
type SCMIntegrationsService interface { SCMIntegrationsList() ([]SCMIntegration, error) SCMIntegrationsShow(id string) (*SCMIntegration, error) SCMIntegrationsCreate(scmType SCMType, url string, accessToken string) (*SCMIntegration, error) SCMIntegrationsDelete(id string) error SCMIntegrationsImportKeys(id string) ([]Key, error) }
type SCMRepoLink ¶
type SCMRepoLink struct { ID string `json:"id"` AppID string `json:"app_id"` Linker SCMRepoLinkLinker `json:"linker"` Owner string `json:"owner"` Repo string `json:"repo"` Branch string `json:"branch"` SCMType SCMType `json:"scm_type"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` AutoDeployEnabled bool `json:"auto_deploy_enabled"` AuthIntegrationUUID string `json:"auth_integration_uuid"` DeployReviewAppsEnabled bool `json:"deploy_review_apps_enabled"` DeleteOnCloseEnabled bool `json:"delete_on_close_enabled"` DeleteStaleEnabled bool `json:"delete_stale_enabled"` HoursBeforeDeleteOnClose uint `json:"hours_before_delete_on_close"` HoursBeforeDeleteStale uint `json:"hours_before_delete_stale"` LastAutoDeployAt time.Time `json:"last_auto_deploy_at"` }
type SCMRepoLinkCreateParams ¶
type SCMRepoLinkCreateParams struct { Source *string `json:"source,omitempty"` Branch *string `json:"branch,omitempty"` AuthIntegrationUUID *string `json:"auth_integration_uuid,omitempty"` AutoDeployEnabled *bool `json:"auto_deploy_enabled,omitempty"` DeployReviewAppsEnabled *bool `json:"deploy_review_apps_enabled,omitempty"` DestroyOnCloseEnabled *bool `json:"delete_on_close_enabled,omitempty"` HoursBeforeDeleteOnClose *uint `json:"hours_before_delete_on_close,omitempty"` DestroyStaleEnabled *bool `json:"delete_stale_enabled,omitempty"` HoursBeforeDeleteStale *uint `json:"hours_before_delete_stale,omitempty"` }
type SCMRepoLinkDeploymentsResponse ¶
type SCMRepoLinkDeploymentsResponse struct {
Deployments []*Deployment `json:"deployments"`
}
type SCMRepoLinkLinker ¶
type SCMRepoLinkReviewAppsResponse ¶
type SCMRepoLinkReviewAppsResponse struct {
ReviewApps []*ReviewApp `json:"review_apps"`
}
type SCMRepoLinkService ¶
type SCMRepoLinkService interface { SCMRepoLinkShow(app string) (*SCMRepoLink, error) SCMRepoLinkCreate(app string, params SCMRepoLinkCreateParams) (*SCMRepoLink, error) SCMRepoLinkUpdate(app string, params SCMRepoLinkUpdateParams) (*SCMRepoLink, error) SCMRepoLinkDelete(app string) error SCMRepoLinkManualDeploy(app, branch string) error SCMRepoLinkManualReviewApp(app, pullRequestId string) error SCMRepoLinkDeployments(app string) ([]*Deployment, error) SCMRepoLinkReviewApps(app string) ([]*ReviewApp, error) }
type SCMRepoLinkUpdateParams ¶
type SCMRepoLinkUpdateParams struct { Branch *string `json:"branch,omitempty"` AutoDeployEnabled *bool `json:"auto_deploy_enabled,omitempty"` DeployReviewAppsEnabled *bool `json:"deploy_review_apps_enabled,omitempty"` DestroyOnCloseEnabled *bool `json:"delete_on_close_enabled,omitempty"` HoursBeforeDeleteOnClose *uint `json:"hours_before_delete_on_close,omitempty"` DestroyStaleEnabled *bool `json:"delete_stale_enabled,omitempty"` HoursBeforeDeleteStale *uint `json:"hours_before_delete_stale,omitempty"` }
type SCMType ¶
type SCMType string
const ( SCMGithubType SCMType = "github" // GitHub SCMGithubEnterpriseType SCMType = "github-enterprise" // GitHub Enterprise (private instance) SCMGitlabType SCMType = "gitlab" // GitLab.com SCMGitlabSelfHostedType SCMType = "gitlab-self-hosted" // GitLab self-hosted (private instance) )
Type of SCM integrations
type ScmRepoLinkResponse ¶
type ScmRepoLinkResponse struct {
SCMRepoLink *SCMRepoLink `json:"scm_repo_link"`
}
type SelfResponse ¶
type SelfResponse struct {
User *User `json:"user"`
}
type SignUpService ¶
type SourcesCreateResponse ¶
type SourcesCreateResponse struct {
Source *Source `json:"source"`
}
type SourcesService ¶
type StacksService ¶
type StaticTokenGenerator ¶
type StaticTokenGenerator struct {
// contains filtered or unexported fields
}
StaticTokenGenerator is an implementation of TokenGenerator which always return the same token. This token is provided to the constructor. The TokenGenerator is used by the Client to authenticate to the Scalingo API.
Usage:
t := GetStaticTokenGenerator("my-token") client := NewClient(ClientConfig{ TokenGenerator: t, })
Any subsequent calls to the Scalingo API will use this token to authenticate.
func NewStaticTokenGenerator ¶
func NewStaticTokenGenerator(token string) *StaticTokenGenerator
NewStaticTokenGenerator returns a new StaticTokenGenerator. The only argument is the token that will always be returned by this generator.
func (*StaticTokenGenerator) GetAccessToken ¶
func (t *StaticTokenGenerator) GetAccessToken() (string, error)
GetAccessToken always returns the configured token.
func (*StaticTokenGenerator) SetClient ¶
func (t *StaticTokenGenerator) SetClient(c *Client)
SetClient sets the client attribute of this token generator.
type Step ¶
type Step struct { ID string `json:"id"` Name string `json:"name"` Status StepStatus `json:"status"` Logs string `json:"logs"` }
type StepStatus ¶
type StepStatus string
type TokenCreateParams ¶
type TokenCreateParams struct {
Name string `json:"name"`
}
type TokensService ¶
type UpdateUserParams ¶
type UpdateUserResponse ¶
type UpdateUserResponse struct {
User *User `json:"user"`
}
type UsersService ¶
type VariableSetParams ¶
type VariableSetParams struct {
Variable *Variable `json:"variable"`
}
type VariablesRes ¶
type VariablesRes struct {
Variables Variables `json:"variables"`
}
type VariablesService ¶
type VariablesService interface { VariablesList(app string) (Variables, error) VariablesListWithoutAlias(app string) (Variables, error) VariableSet(app string, name string, value string) (*Variable, int, error) VariableMultipleSet(app string, variables Variables) (Variables, int, error) VariableUnset(app string, id string) error }
Source Files
¶
- addons.go
- addons_providers.go
- alerts.go
- apps.go
- auth_mock.go
- autoscalers.go
- backups.go
- client.go
- collaborators.go
- container.go
- databases.go
- deployments.go
- domains.go
- env.go
- events.go
- events_billing.go
- events_boilerplate.go
- events_structs.go
- events_types.go
- events_user.go
- github_link.go
- gomock_subresourceservice.go
- keys.go
- log_drains.go
- login.go
- logs-archives.go
- logs.go
- metrics.go
- notification_platforms.go
- notifier_types.go
- notifiers.go
- operations.go
- pagination_options.go
- region_migrations.go
- regions.go
- review_apps.go
- run.go
- scm_integrations.go
- scm_repo_link.go
- signup.go
- sources.go
- stacks.go
- static_token.go
- token_generator_mock.go
- tokens.go
- users.go
- version.go
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
httpmock
Package httpmock is a generated GoMock package.
|
Package httpmock is a generated GoMock package. |
tokensservicemock
Package tokensservicemock is a generated GoMock package.
|
Package tokensservicemock is a generated GoMock package. |
Package scalingomock is a generated GoMock package.
|
Package scalingomock is a generated GoMock package. |