Package Usage: go: github.com/transip/gotransip/v6
Package gotransip implements a client for the TransIP Rest API.
This package is a complete implementation for communicating with the TransIP RestAPI.
It covers resource calls available in the TransIP RestAPI Docs and it allows your
project(s) to connect to the TransIP RestAPI easily. Using this package you can order,
update and remove products from your TransIP account.
As of version 6.0 this package is no longer compatible with TransIP SOAP API because the
library is now organized around REST. The SOAP API library versions 5.* are now deprecated
and will no longer receive future updates.
The following example uses the transip demo token in order to call the api with the test repository.
For more information about authenticating with your own credentials, see the Authentication section.
If you want to tinker out with the api first without setting up your authentication,
we defined a static DemoClientConfiguration.
Which can be used to create a new client:
Create a new client using a token:
As tokens have a limited expiry time you can also request new tokens using the private key
acquired from your transip control panel:
We also implemented a PrivateKeyReader option, for users that want to store their key elsewhere,
not on a filesystem but on X datastore:
If you would like to keep a token between multiple client instantiations,
you can provide the client with a token cache. If the file does not exist, it creates one for you
As long as a provided TokenCache adheres to the following interface,
the client's authenticator is able to use it. This means you can also provide
your own token cacher: for example, one that caches to etcd
All resource calls as can be seen on https://api.transip.nl/rest/docs.html
have been grouped in the following repositories,
these are subpackages under the gotransip package:
Such a repository can be initialised with a client as follows:
Each repository has a bunch methods you can use to call get/modify/update resources in
that specific subpackage. For example, here we get a list of domains from a transip account:
30 versions
Latest release: over 1 year ago
245 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/transip/gotransip/v6