All checks were successful
continuous-integration/drone/push Build is passing
Servers with monitor filtering returned incorrect results when monitors
have same names but different protocols (v4/v6). Monitor lookup now
considers both name and IP version to match the correct protocol.
- Add GetMonitorByNameAndIPVersion SQL query with protocol matching
- Update history parameter parsing to use server IP version context
- Fix both /scores/{ip}/log and Grafana endpoints
- Remove unused GetMonitorByName query
Fixes abh/ntppool#264
Reported-by: Anssi Johansson <https://github.com/avijc>
27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.29.0
|
|
|
|
package ntpdb
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Querier interface {
|
|
GetMonitorByNameAndIPVersion(ctx context.Context, arg GetMonitorByNameAndIPVersionParams) (Monitor, error)
|
|
GetMonitorsByID(ctx context.Context, monitorids []uint32) ([]Monitor, error)
|
|
GetServerByID(ctx context.Context, id uint32) (Server, error)
|
|
GetServerByIP(ctx context.Context, ip string) (Server, error)
|
|
GetServerLogScores(ctx context.Context, arg GetServerLogScoresParams) ([]LogScore, error)
|
|
GetServerLogScoresByMonitorID(ctx context.Context, arg GetServerLogScoresByMonitorIDParams) ([]LogScore, error)
|
|
GetServerNetspeed(ctx context.Context, ip string) (uint32, error)
|
|
GetServerScores(ctx context.Context, arg GetServerScoresParams) ([]GetServerScoresRow, error)
|
|
GetZoneByName(ctx context.Context, name string) (Zone, error)
|
|
GetZoneCounts(ctx context.Context, zoneID uint32) ([]ZoneServerCount, error)
|
|
GetZoneStatsData(ctx context.Context) ([]GetZoneStatsDataRow, error)
|
|
GetZoneStatsV2(ctx context.Context, ip string) ([]GetZoneStatsV2Row, error)
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|