forked from raystack/optimus
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: resource changelog tracking & API (#252)
* feat: add resource changelog API service & repo * feat: unit test for service * feat: move to a separate service * feat: add handler & proto * feat: reorganize functions & track resource updates * feat: fix metric counter & fix job changelog query * feat: skip when there's no changes * feat: update queries structure * feat: fix query & handler function name * fix: handler naming * feat: update on code review * feat: remove sorting from get query * fix: lint * feat: update proton commit
- Loading branch information
1 parent
c52d2c7
commit 9ef1741
Showing
17 changed files
with
1,373 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package resource | ||
|
||
import "time" | ||
|
||
const ( | ||
EntityResourceChangelog = "resource_changelog" | ||
|
||
ChangelogChangeTypeCreate = "create" | ||
ChangelogChangeTypeUpdate = "update" | ||
ChangelogChangeTypeDelete = "delete" | ||
) | ||
|
||
type Change struct { | ||
Property string | ||
Diff string | ||
} | ||
|
||
type ChangeLog struct { | ||
Change []Change | ||
Type string | ||
Time time.Time | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.