Skip to content

Releases: openfga/go-sdk

v0.3.1

19 Dec 19:41
v0.3.1
121eae9
Compare
Choose a tag to compare

0.3.1 (2023-12-19)

  • feat: oauth2 client credentials support (#62), thanks @le-yams
  • fix: remove canonical import path from oauth2 packages (#64), thanks @bketelsen

v0.3.1-go1.20

19 Dec 19:59
v0.3.1-go1.20
4cd0ee4
Compare
Choose a tag to compare
v0.3.1-go1.20 Pre-release
Pre-release

0.3.1-go1.20 (2023-12-19)

Same as v0.3.1, but with the target go version set to 1.20 (see https://github.com/lxc/incus/issues/315\#issuecomment-1863382429)

v0.3.0

12 Dec 15:59
v0.3.0
6d03bf4
Compare
Choose a tag to compare

0.3.0 (2023-12-11)

  • feat!: initial support for conditions
  • feat: support specifying a port and path for the API (You can now set the ApiUrl to something like: https://api.fga.exampleL8080/some_path)
  • fix: resolve a bug in NewCredentials (#60) - thanks @harper
  • chore!: use latest API interfaces
  • chore: dependency updates

BREAKING CHANGES:

Note: This release comes with substantial breaking changes, especially to the interfaces due to the protobuf changes in the last openfga release.

While the http interfaces did not break (you can still use v0.2.3 SDK with a v1.3.8+ server),
the grpc interface did and this caused a few changes in the interfaces of the SDK.

You will have to modify some parts of your code, but we hope this will be to the better as a lot of the parameters are now correctly marked as required,
and so the Pointer-to-String conversion is no longer needed.

Some of the changes to expect:

  • When initializing a client, please use ApiUrl. The separate ApiScheme and ApiHost fields have been deprecated
fgaClient, err := NewSdkClient(&ClientConfiguration{
    ApiUrl:  os.Getenv("FGA_API_URL"), // required, e.g. https://api.fga.example
    StoreId: os.Getenv("FGA_STORE_ID"), // not needed when calling `CreateStore` or `ListStores`
    AuthorizationModelId: os.Getenv("FGA_AUTHORIZATION_MODEL_ID"), // optional, recommended to be set for production
})
  • When initializing a client, AuthorizationModelId is no longer a pointer, and you can just pass the string directly
  • The OpenFgaClient now has methods to get and set the model ID GetAuthorizationModelId and SetAuthorizationModelId
  • The following request interfaces changed:
    • CheckRequest: the TupleKey field is now of interface CheckRequestTupleKey, you can also now pass in Context
    • ExpandRequest: the TupleKey field is now of interface ExpandRequestTupleKey
    • ReadRequest: the TupleKey field is now of interface ReadRequestTupleKey
    • WriteRequest: now takes WriteRequestWrites and WriteRequestDeletes
    • And more
  • The following interfaces had fields that were pointers are are now the direct value:
    • CreateStoreResponse
    • GetStoreResponse
    • ListStoresResponse
    • ListObjectsResponse
    • ReadChangesResponse
    • ReadResponse
    • AuthorizationModel and several interfaces under it
    • And more

v0.3.0-beta.1

02 Nov 18:07
v0.3.0-beta.1
02addf9
Compare
Choose a tag to compare
v0.3.0-beta.1 Pre-release
Pre-release
  • feat!: initial support for conditions

v0.2.3

13 Oct 16:47
v0.2.3
868313b
Compare
Choose a tag to compare

0.2.3 (2023-10-13)

  • fix: allow setting user agent
  • fix(client): resolve null pointer exceptions when getting auth model id
  • fix(client): allow read to contain empty fields
  • fix(client): require auth model id and store id to be ulids
  • fix(client): resolve cases where req options was not respected
  • fix: add retry logic to oauth
  • chore: target go1.21.3 and upgrade dependencies

v0.2.2

21 Apr 20:39
v0.2.2
7149e3a
Compare
Choose a tag to compare

0.2.2 (2023-04-21)

  • feat(client): add OpenFgaClient wrapper see docs, see the v0.2.1 docs for the OpenFgaApi docs
  • feat(client): implement BatchCheck to check multiple tuples in parallel
  • feat(client): implement ListRelations to check in one call whether a user has multiple relations to an objects
  • feat(client): add support for a non-transactional Write
  • chore(config): bump default max retries to 15
  • fix(config)!: make the capitalization of the json equivalent of the configuration consistent
  • fix: retry on 5xx errors

v0.2.1

17 Jan 22:59
v0.2.1
09e5e88
Compare
Choose a tag to compare

0.2.1 (2023-01-17)

  • chore(deps): upgrade golang.org/x/net dependency

v0.2.0

15 Dec 01:38
v0.2.0
6f5dc40
Compare
Choose a tag to compare

0.2.0 (2022-12-14)

Updated to include support for OpenFGA 0.3.0

Changes:

  • [BREAKING] feat(list-objects)!: response has been changed to include the object type e.g. response that was {"object_ids":["roadmap"]}, will now be {"objects":["document:roadmap"]}

Fixes:

  • [BREAKING] fix(models): update interfaces that had incorrectly optional fields to make them required

Chore:

  • chore(deps): update dev dependencies

v0.1.1

30 Sep 06:02
v0.1.1
2f37d6e
Compare
Choose a tag to compare

0.1.1 (2022-09-30)

  • chore(deps): upgrade dependencies - dependency updates were accidentally reverted in v0.1.0 release

v0.1.0

29 Sep 22:33
v0.1.0
e1d0f2d
Compare
Choose a tag to compare

0.1.0 (2022-09-29)

  • BREAKING: exported interface TypeDefinitions is now WriteAuthorizationModelRequest This is only a breaking change on the SDK, not the API. It was changed to conform to the proto changes in openfga/api.
  • chore(deps): upgrade dependencies