contentstack-go-sdk

module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MIT

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

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
})

instance, err := client.Stack(stackAuth)
if err != nil {
    panic(err)
}

webhooks, err := stack.WebHookFetchAll(context.TODO())
if err != nil {
    panic(err)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL