mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-01 02:59:08 +02:00
support for GetNetwork 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) GetNetwork(ctx context.Context, accountId string) (nmdat
|
||||
return nmdata.Network{}, err
|
||||
}
|
||||
|
||||
n, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[accountnetwork])
|
||||
n, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[networkmapdb.AccountNetwork])
|
||||
if err != nil {
|
||||
return nmdata.Network{}, err
|
||||
}
|
||||
@@ -39,11 +37,3 @@ func (pgc *PgStoreConn) GetNetwork(ctx context.Context, accountId string) (nmdat
|
||||
|
||||
return toret, nil
|
||||
}
|
||||
|
||||
type accountnetwork struct {
|
||||
Identifier sql.NullString
|
||||
Net json.RawMessage
|
||||
NetV6 json.RawMessage
|
||||
Dns sql.NullString
|
||||
Serial sql.NullInt64
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user