Categorygithub.com/Scalingo/go-scalingo/v6
modulepackage
6.7.7
Repository: https://github.com/scalingo/go-scalingo.git
Documentation: pkg.go.dev

# README

Codeship Status for Scalingo/go-scalingo

Go client for Scalingo API v6.7.7

This repository is the Go client for the Scalingo APIs.

Getting Started

package main

import (
	"github.com/Scalingo/go-scalingo/v6"
)

func getClient() (*scalingo.Client, error) {
	config := scalingo.ClientConfig{
		APIEndpoint: "https://api.osc-fr1.scalingo.com", // Possible endpoints can be found at https://developers.scalingo.com/#endpoints
		APIToken: "tk-us-XYZXYZYZ", // You can create a token in the dashboard at Profile > Token > Create new token
	}
	return scalingo.New(config)
}

func main() {
	client, err := getClient()
	if err != nil {
		panic(err)
	}
	apps, err := client.AppsList()
	if err != nil {
		panic(err)
	}
	for _, app := range apps {
		println("App: " + app.Name)
	}
}

Explore

As this Go client maps all the public Scalingo APIs, you can explore the API documentation. If you need an implementation example, you can take a look at the Scalingo CLI code.

Repository Processes

Add Support for a New Event

A couple of files must be updated when adding support for a new event type. For instance if your event type is named my_event:

  • events_struct.go:
    • Add the EventMyEvent constant
    • Add the EventMyEventTypeData structure
    • Add EventMyEventType structure which embeds a field TypeData of the type EventMyEventTypeData.
    • Implement function String for EventMyEventType
    • [optional] Implement Who function for EventMyEventType. E.g. if the event type can be created by an addon.

Once the Event has been added run the following command to update boilerplate code

go generate

Client HTTP Errors

HTTP errors are managed in the file http/errors.go. It follows the Scalingo standards detailed in the developers documentation.

Release a New Version

Bump new version number in:

  • CHANGELOG.md
  • README.md
  • version.go

Commit, tag and create a new release:

version="6.7.7"

git switch --create release/${version}
git add CHANGELOG.md README.md version.go
git commit -m "Bump v${version}"
git push --set-upstream origin release/${version}
gh pr create --reviewer=EtienneM --title "$(git log -1 --pretty=%B)"

Once the pull request merged, you can tag the new release.

git tag v${version}
git push origin master v${version}
gh release create v${version}

The title of the release should be the version number and the text of the release is the same as the changelog.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package scalingomock is a generated GoMock package.
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
IsOTPRequired tests if the authentication backend return an OTP Required error Deprecated: use http.IsOTPRequired instead of this wrapper.
No description provided by the author
No description provided by the author
No description provided by the author
NewMockSubresourceService creates a new mock instance.
NewStaticTokenGenerator returns a new StaticTokenGenerator.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DatabaseFeatureStatusActivated is set when the feature has been enabled with success.
DatabaseFeatureStatusFailed is set when the feature failed to get enabeld.
DatabaseFeatureStatusPending is set when the feature is being enabled.
DatabaseStatusCreating is set when the database is being started before it's operational.
DatabaseStatusMigrating is set when a component of the database is being migrated by Scalingo infrastructure.
DatabaseStatusRunning is the standard status of a database when everything is operational.
DatabaseStatusStopped is set when the database has been stopped (suspended after free trial or when an account has been suspended).
DatabaseStatusUpdating is set the plan of the database is being changed.
DatabaseStatusUpgrading is set when a database version upgrade is being applied on the database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EventLinkGithub and EventUnlinkGithub events are kept for retro-compatibility.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InstanceStatusBooting is set when an instance is starting for the first time.
InstanceStatusMigrating is set when an instance is being migrated by the Scalingo infrastructure.
InstanceStatusRemoving is set during the deletion of an Instance (business to starter downgrade or database deletion).
InstanceStatusRestarting is set when an instance is restarting (during a plan change, at the end of an upgrade or a migration).
InstanceStatusRunning is the default status when the instance is working normally.
InstanceStatusStopped is set when an instance has been stopped.
InstanceStatusUpgrading is set when an instance version is being changed, part of a Database upgrade.
InstanceTypeDBNode instances represent database instances holding data.
InstanceTypeHAProxy are instances running a HAProxy reverse proxy in order to route requests to the InstanceTypeDBNodes.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
These constants contain the string repsentation for all metric available on Scalingo.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GitHub Enterprise (private instance).
GitHub.
GitLab self-hosted (private instance).
GitLab.com.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Deprecated: use http.ErrOTPRequired instead of this wrapper.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AddonProvisionParams gathers all arguments which can be sent to provision an addon.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Database contains the metadata and configuration of a database deployment.
No description provided by the author
DatabaseDisableFeatureResponse is the response body of DatabaseDisableFeature.
DatabaseEnableFeatureParams contains the feature which has to be enabled.
DatabaseEnableFeatureResponse is the response structure from DatabaseEnableFeature.
DatabaseFeature represents the state of application of a database feature.
DatabaseRes is the returned response from DatabaseShow.
No description provided by the author
No description provided by the author
No description provided by the author
DatabaseUpdatePeriodicBackupsConfigParams contains the parameters which can be tweaked to update how periodic backups are triggered.
No description provided by the author
No description provided by the author
DatabaseUserResponse is the response body of database create user.
DatabaseUsersResponse is the response body of database list users.
No description provided by the author
No description provided by the author
DeploymentEvent represents a deployment stream event sent on the websocket.
DeploymentEventDataLog is the data type present in the DeploymentEvent.Data field if the DeploymentEvent.Type is DeploymentEventDataLog.
DeploymentEventDataStatus is the data type present in the DeploymentEvent.Data field if the DeploymentEvent.Type is DeploymentEventDataStatus.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Inviter is filled there.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Database maintenance completed.
No description provided by the author
No description provided by the author
No description provided by the author
Create data_access_consent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Delete addon log drain.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Delete log drain.
No description provided by the author
Delete notifier.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Edit hds_contact.
No description provided by the author
No description provided by the author
No description provided by the author
Edit notifier.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New addon log drain.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New log drain.
No description provided by the author
New notifier.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Database maintenance planned.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Stack changed.
No description provided by the author
Database maintenance started.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Disable Tfa.
No description provided by the author
Enable Tfa.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Instance contains the metadata of an Instance which is one component of a Database deployment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MockSubresourceService is a mock of SubresourceService interface.
MockSubresourceServiceMockRecorder is the mock recorder for MockSubresourceService.
No description provided by the author
Struct used to represent a notifier.
Email.
No description provided by the author
Struct used to serialize a notifier.
NotifierParams will be given as a parameter in notifiers function's.
Slack.
No description provided by the author
No description provided by the author
Webhook.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StaticTokenGenerator is an implementation of TokenGenerator which always return the same token.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DatabasesService is the interface gathering all the methods related to database addon configuration updates.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DatabaseFeatureStatus is a type of string representing the advancement of the application of a database feature.
DatabaseStatus is a string representing the status of a database deployment.
DeploymentEventType holds all different deployment stream types of event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InstanceStatus is a type of string representing the status of an Instance.
InstanceType is a type of string representing the type of the Instance inside a Database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author