go get github.com/durudex/go-durudex/sdk
An example of getting a user using id:
import (
...
"github.com/durudex/durudex-go/sdk"
)
func main() {
client := sdk.NewClient(sdk.ClientConfig{
Endpoint: sdk.TestAPIEndpoint,
TransportType: sdk.AuthTransportType,
Transport: sdk.NewDefaultTransport(),
})
ctx := context.Background()
userId := ksuid.New()
user, err := client.GetUser(ctx, userId)
if err != nil { ... }
...
}
Copyright © 2022 Durudex. Released under the MIT license.