symbiosis-go is compatible with modern Go releases in module mode, with Go installed:
go get github.com/symbiosis-cloud/symbiosis-go
will resolve and add the package to the current development module, along with its dependencies.
Alternatively the same can be achieved if you use import in a package:
import "github.com/symbiosis-cloud/symbiosis-go"
and run go get
without parameters.
You can easily instantiate the API client by providing it with a valid API key:
client, err := symbiosis.NewClientFromAPIKey(os.Getenv("SYMBIOSIS_API_KEY"))
ClientOptions can be passed to symbiosis.NewClientFromAPIKey()
for example:
// Changing the symbiosis API endpoint
client, err := symbiosis.NewClientFromAPIKey(os.Getenv("SYMBIOSIS_API_KEY"), symbiosis.WithEndpoint("https://some-other-url"))
// Setting a default timeout
client, err := symbiosis.NewClientFromAPIKey(os.Getenv("SYMBIOSIS_API_KEY"), symbiosis.WithTimeout(time.Second * 30)))
members, err := client.InviteTeamMembers([]string{"[email protected]", "[email protected]"}, symbiosis.RoleAdmin)
Valid roles can be obtained by using the symbiosis.GetValidRoles()
function which returns a map[string]bool of valid roles.
go test
Mocks can be generated by running (requires Docker):
docker run -v "$PWD":/src -w /src vektra/mockery --all
- Expand readme
- Add single node creation call
- Public docs
- Add integration tests