support for GetPostureChecks in sqlite

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-08-11 13:42:14 +02:00
parent 1caa0ddf27
commit 4375fdc7b6
5 changed files with 50 additions and 16 deletions
@@ -2,8 +2,6 @@ package networkmap_pgsql
import (
"context"
"database/sql"
"encoding/json"
"reflect"
"github.com/jackc/pgx/v5"
@@ -25,7 +23,7 @@ func (pgc *PgStoreConn) GetPostureChecks(ctx context.Context, accountId string)
return nil, nil, err
}
checks, err := pgx.CollectRows(rows, pgx.RowToStructByName[posturechecks])
checks, err := pgx.CollectRows(rows, pgx.RowToStructByName[networkmapdb.PostureChecks])
if err != nil {
return nil, nil, err
}
@@ -44,9 +42,3 @@ func (pgc *PgStoreConn) GetPostureChecks(ctx context.Context, accountId string)
return toret, idToPublicIDIdx, nil
}
type posturechecks struct {
ID string
PublicID sql.NullString `nmap:"skip"`
Checks json.RawMessage
}