https://github.com/labd/contentstack-go-sdk
Go SDK for the Contentstack management API
https://github.com/labd/contentstack-go-sdk
contentstack go-sdk
Last synced: 10 months ago
JSON representation
Go SDK for the Contentstack management API
- Host: GitHub
- URL: https://github.com/labd/contentstack-go-sdk
- Owner: labd
- License: mit
- Created: 2022-01-03T12:30:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T08:03:29.000Z (11 months ago)
- Last Synced: 2025-03-28T22:51:10.663Z (11 months ago)
- Topics: contentstack, go-sdk
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Contentstack management SDK for Go
This is the Go SDK for the contentstack management API. It is primarily
developed to be used in our terraform provider for contenstack, see
https://github.com/labd/terraform-provider-contentstack
## Example
```go
cfg := management.ClientConfig{
BaseURL: "https://eu-api.contentstack.com/",
HTTPClient: httpClient,
AuthToken: "foobar", // Optional
}
client, err := management.NewClient(cfg)
if err != nil {
panic(err)
}
stackAuth := management.StackAuth{
ApiKey: "foobar", // Required
ManagementToken: "secret", // Optional
Branch: "development", // Optional
}
instance, err := client.Stack(stackAuth)
if err != nil {
panic(err)
}
webhooks, err := stack.WebHookFetchAll(context.TODO())
if err != nil {
panic(err)
}
```