Skip to content

Commit

Permalink
refactor(api): rewrite entitlements internals and api OM-649 (#1000)
Browse files Browse the repository at this point in the history
* refactor(api): rewrite entitlements api

* fix(api): add grant voiding api

* feat(credit): implement calculation engine

* feat(credit): restructure packages

* feat: write credit connector interfaces

* feat: write more connector interfaces

* feat: extend entitlement apis

* chore: update API docs

* feat: re-add entitlements apis and write balance connectors

* feat: implement most adapters and db access

* feat: usagereset persistence and unified ID handling

* feat: add windowed history retrieval

* feat: implement entitlement reset

* feat(api): add static and boolean entitlements

(cherry picked from commit 700b76f)

* feat(api): improve

(cherry picked from commit 56a7852)

* feat(api): improve

(cherry picked from commit fce0817)

* feat(api): improve

(cherry picked from commit 9b20fb9)

* feat: update openapi schema

* style: address TODOs

* feat: add generic transaction management

* refactor(api): final api proposal

* feat: add transactions and owner exclusive locking

* feat: add feature API

* feat: pretty dev logging and entitlement APIs

* fix: entitlement resp body

* fix: balance snapping timing and grant creation

* feat: add grant listing api

* feat: reset api

* feat: add balance history API

* feat: add grant listing and voiding

* chore: delete old credit pg connector

* feat: expoe through openemter package

* style: fix lint

* chore: update go version and truncate test ts precisions

* refactor: rm HighWaterMark from streaming testutils

* style: rm comments

* style: rm old comments

* fix(engine): write populate helper for balance operations and fill the snapshot with grants on reset too

* fix: typo update  internal/credit/history.go

Co-authored-by: Peter Turi <[email protected]>
Signed-off-by: Alex Goth <[email protected]>

* fix: typo update  internal/credit/history.go

Co-authored-by: Peter Turi <[email protected]>
Signed-off-by: Alex Goth <[email protected]>

* chore: fix filename typo

* fix: invalidate snapshots after grant voiding

* chore: expose handler types

* refactor: tidy up api handlers for betterexposability

* fix: expose handlers as aliases

* fix: expose all entitlement handlers

* chore: expose db builder from server package

* chore: expose client creation

* fix: remove unnecessary return

* fix(e2e): fix e2e tests, api types, problems

* refactor: rename repos to repos

* fix: fix linting and archived-feature  entitlement creation

* style: use long names

* test: sort

* fix: e2e tests and capitalization

---------

Signed-off-by: Alex Goth <[email protected]>
Co-authored-by: Peter Marton <[email protected]>
Co-authored-by: Peter Turi <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2024
1 parent 9c0c9d2 commit a7c1ffb
Show file tree
Hide file tree
Showing 294 changed files with 43,346 additions and 21,152 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/config.yaml
/tmp/

.tmp.*

.DS_Store

# Go workspace file
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/server",
"args": ["--config", "${workspaceFolder}/config.example.yaml"]
"args": ["--config", "${workspaceFolder}/config.yaml"]
}
]
}
2,523 changes: 1,609 additions & 914 deletions api/api.gen.go

Large diffs are not rendered by default.

4,080 changes: 2,471 additions & 1,609 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

Loading

0 comments on commit a7c1ffb

Please sign in to comment.