Vscale Go API client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
account.go
account_test.go
background.go
background_test.go
backup.go
backup_test.go
billing.go
billing_test.go
client.go
configuration.go
configuration_test.go
domain.go
domain_record.go
domain_record_test.go
domain_tags.go
domain_tags_test.go
domain_test.go
notification.go
notification_test.go
ptr_records.go
ptr_records_test.go
scalet.go
scalet_test.go
server_tags.go
server_tags_test.go
sshkey.go
sshkey_test.go
utils.go

README.md

go-vscale

go-vscale is a Go client library for accessing the Vscale API.

Usage

import "github.com/vscale/go-vscale"

First step is constructing Vscale client which allows to use API services. You can generate token in Vscale Panel.

client := NewClient("token should be here")
account, _, err := client.Account.Get()

Some operations with scalets can be started both sync and async.

// Second argument is "wait" which expects boolean value
// true - if you want to wait until the end of operation
// false - if you want this operation to be handled in background
client := NewClient("token should be here")
scalet, _, err := client.Scalet.Rebuild(11111, true)

Tests

You can run tests which make requests straightly to Vscale API. For now they can't be run together. Run specific test if you want to test some method.

$ go test -v github.com/vscale/go-vscale -run TestAccountService_Get

For convenience you can use "VSCALE_API_TOKEN" env for not passing token to every test.