Skip to content

spectrocloud/palette-sdk-go

Repository files navigation

Contributions Welcome License Test Go Report Card Go Reference

palette-sdk-go

Palette SDK for the Go programming language.

Usage

A project-scoped client can be instantiated as follows:

pc := client.New(
    client.WithPaletteURI(host),
    client.WithAPIKey(apiKey),
    client.WithScopeProject(projectUid),
)

Switch from a project-scoped client to a tenant-scoped client:

client.WithScopeTenant()(pc)

Note that the above will only succeed if original client's credentials are associated with a user who is authorized as a tenant administrator.

Switch from a tenant-scoped client to a project-scoped client - or from one project to another:

client.WithScopeProject(projectUid)(pc)

Next Steps

Contributing

All contributions are welcome! Feel free to reach out on the Spectro Cloud community Slack.

Make sure pre-commit is installed.

Install the pre-commit scripts:

pre-commit install --hook-type commit-msg
pre-commit install --hook-type pre-commit