This is the official client library for interacting with the GleSYS API.
- Go 1.18 or higher. Required to build.
go get github.com/glesys/glesys-go
To use the glesys-go library you need a GleSYS Cloud account and a valid API key. You can sign up for an account at https://glesys.com/signup. After signing up visit https://cloud.glesys.com to create an API key for your Project.
client := glesys.NewClient("CL12345", "your-api-key", "my-application/0.0.1")
// Create a Server
server, err := client.Servers.Create(context.Background(), glesys.CreateServerParams{Password: "..."}.WithDefaults())
// List all Servers
servers, err := client.Servers.List(context.Background())
To be able to monitor usage and help track down issues, we encourage you to
provide a user agent string identifying your application or library. Recommended
syntax is my-library/version
or www.example.com
.
glesys-go uses Go's context library to handle
timeouts and deadlines. All functions making HTTP requests requires a context
argument.
Full documentation is available at https://godoc.org/github.com/glesys/glesys-go.
- Fork the repo.
- Make sure to run the tests to verify that you're starting with a clean slate.
- Add a test for your change, make sure it fails. Refactoring existing code or improving documentation does not require new tests.
- Make the changes and ensure the test pass.
- Commit your changes, push to your fork and submit a Pull Request.
Please use the formatting provided by gofmt.
The contents of this repository are distributed under the MIT license, see LICENSE.