Skip to content

v0.3.0

Compare
Choose a tag to compare
@kislerdm kislerdm released this 26 Oct 22:02
· 90 commits to master since this release
8f1dd85

Changed

  • The interface Client is removed and the output of the NewClient is the pointer to the struct now. It will facilitate stub of the SDK client.

  • [BREAKING] NewClient requires Config to initialise a Neon client. It's meant to improve security by eliminating
    support of environment variables for authentication by default. It also simplifies the codebase.

    Example

    package main
    
    import (
          "log"
    
          neon "github.com/kislerdm/neon-sdk-go"
    )
    
    func main() {
          client, err := neon.NewClient(neon.Config{Key: "{{.NeonApiKey}}"})
          if err != nil {
              panic(err)
          }
    
          v, err := client.ListProjects()
          if err != nil {
              panic(err)
          }
    
          log.Printf("%d projects found", len(v.Projects))
    }
  • [BREAKING] Removed support of variadic functions used to configure SDK client.

Changelog