mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-23 15:19:08 +02:00
support for GetPostureChecks in sqlite
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user