Skip to content

spectrocloud/palette-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e47062a · Mar 3, 2025
Feb 12, 2025
Feb 12, 2025
Mar 3, 2025
Aug 14, 2024
Aug 7, 2024
Aug 7, 2024
Dec 17, 2024
Feb 7, 2025
Feb 23, 2023
Dec 17, 2024
Feb 23, 2023
Aug 7, 2024
Aug 9, 2024
Feb 12, 2025
Dec 19, 2024

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