Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

durudex-old/go-durudex

Repository files navigation

Durudex Go SDK

Setup

go get github.com/durudex/go-durudex/sdk

Usage

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 { ... }

  ...
}

⚠️ License

Copyright © 2022 Durudex. Released under the MIT license.