This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
v0.4.0
0.4.0 (2022-06-07)
Changes
- feat!: ReadAuthorizationModels now returns an array of Authorization Models instead of IDs [BREAKING CHANGE]
The response will become similar to:
{
"authorization_models": [
{
"id": (string),
"type_definitions": [...]
}
]
}
-
feat!: drop support for all settings endpoints [BREAKING CHANGE]
-
feat!: Simplify error prefix to
Fga
[BREAKING CHANGE]
Possible Errors:
-
FgaApiError
: All errors returned by the API extend this error -
FgaApiValidationError
: 400 and 422 Validation Errors returned by the API -
FgaApiNotFoundError
: 404 errors returned by the API -
FgaApiRateLimitExceededError
: 429 errors returned by the API -
FgaApiInternalError
: 5xx errors returned by the API -
FgaApiAuthenticationError
: Error during authentication -
feat!: drop
Params
postfix from the name of the request interface [BREAKING CHANGE]
e.g. ReadRequestParams
will become ReadRequest
- feat: add support for contextual tuples in the Check request
You can call them like so:
body := fgaSdk.CheckRequest{
TupleKey: &fgaSdk.TupleKey{
User: fgaSdk.PtrString("anne"),
Relation: fgaSdk.PtrString("can_view"),
Object: fgaSdk.PtrString("transaction:A"),
},
ContextualTuples: &fgaSdk.ContextualTuples{
TupleKeys: []fgaSdk.TupleKey{
{
User: fgaSdk.PtrString("anne"),
Relation: fgaSdk.PtrString("user"),
Object: fgaSdk.PtrString("ip-address-range:10.0.0.0/16"),
},
{
User: fgaSdk.PtrString("anne"),
Relation: fgaSdk.PtrString("user"),
Object: fgaSdk.PtrString("timeslot:18_19"),
}
}
}
}
data, response, err := fgaClient.Auth0FgaApi.Check(context.Background()).Body(body).Execute()
-
chore: upgrade dependencies
-
chore: internal refactor