Upgrade to kit v0.3.0

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-04-03 10:56:06 +02:00
parent 8adf26ad20
commit f17fb7bf49
191 changed files with 1617 additions and 1617 deletions

View File

@@ -74,7 +74,7 @@ func (f *Finding) CursorKey(field FindingOrderField) page.CursorKey {
panic(fmt.Sprintf("unsupported order by: %s", field))
}
func (f *Finding) AuthorizationAttributes(ctx context.Context, conn pg.Conn) (map[string]string, error) {
func (f *Finding) AuthorizationAttributes(ctx context.Context, conn pg.Querier) (map[string]string, error) {
q := `SELECT organization_id FROM findings WHERE id = $1 LIMIT 1;`
var organizationID gid.GID
@@ -90,7 +90,7 @@ func (f *Finding) AuthorizationAttributes(ctx context.Context, conn pg.Conn) (ma
func (f *Finding) LoadByID(
ctx context.Context,
conn pg.Conn,
conn pg.Querier,
scope Scoper,
findingID gid.GID,
) error {
@@ -145,7 +145,7 @@ LIMIT 1;
func (fs *Findings) CountByOrganizationID(
ctx context.Context,
conn pg.Conn,
conn pg.Querier,
scope Scoper,
organizationID gid.GID,
filter *FindingFilter,
@@ -180,7 +180,7 @@ WHERE
func (fs *Findings) LoadByOrganizationID(
ctx context.Context,
conn pg.Conn,
conn pg.Querier,
scope Scoper,
organizationID gid.GID,
cursor *page.Cursor[FindingOrderField],
@@ -240,7 +240,7 @@ WHERE
func (f *Finding) Insert(
ctx context.Context,
conn pg.Conn,
conn pg.Tx,
scope Scoper,
) error {
lockQuery := `SELECT pg_advisory_xact_lock(hashtext(@organization_id::text))`
@@ -336,7 +336,7 @@ RETURNING reference_id
func (f *Finding) Update(
ctx context.Context,
conn pg.Conn,
conn pg.Tx,
scope Scoper,
) error {
q := `
@@ -389,7 +389,7 @@ WHERE
func (f *Finding) Delete(
ctx context.Context,
conn pg.Conn,
conn pg.Tx,
scope Scoper,
) error {
q := `
@@ -412,7 +412,7 @@ WHERE
return nil
}
func (fs Findings) Snapshot(ctx context.Context, conn pg.Conn, scope Scoper, organizationID, snapshotID gid.GID) error {
func (fs Findings) Snapshot(ctx context.Context, conn pg.Tx, scope Scoper, organizationID, snapshotID gid.GID) error {
query := `
INSERT INTO findings (
id,
@@ -503,7 +503,7 @@ WHERE %s AND live.organization_id = @organization_id
func (fs *Findings) LoadByAuditID(
ctx context.Context,
conn pg.Conn,
conn pg.Querier,
scope Scoper,
auditID gid.GID,
cursor *page.Cursor[FindingOrderField],
@@ -589,7 +589,7 @@ WHERE %s
func (fs *Findings) CountByAuditID(
ctx context.Context,
conn pg.Conn,
conn pg.Querier,
scope Scoper,
auditID gid.GID,
filter *FindingFilter,