Documentation ¶
Index ¶
- func Register(ctx context.Context, conn RegisterConn) error
- type DBQuerier
- func (q *DBQuerier) FindServerByIP(ctx context.Context, ipAddress *net.IPNet) (FindServerByIPRow, error)
- func (q *DBQuerier) FindServers(ctx context.Context) ([]FindServersRow, error)
- func (q *DBQuerier) InsertServer(ctx context.Context, ipAddress *net.IPNet, extraIpAddress *net.IPNet) (int32, error)
- type FindServerByIPRow
- type FindServersRow
- type Querier
- type RegisterConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBQuerier ¶
type DBQuerier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
NewQuerier creates a DBQuerier that implements Querier.
func (*DBQuerier) FindServerByIP ¶
func (q *DBQuerier) FindServerByIP(ctx context.Context, ipAddress *net.IPNet) (FindServerByIPRow, error)
FindServerByIP implements Querier.FindServerByIP.
func (*DBQuerier) FindServers ¶
func (q *DBQuerier) FindServers(ctx context.Context) ([]FindServersRow, error)
FindServers implements Querier.FindServers.
type FindServerByIPRow ¶
type FindServersRow ¶
type Querier ¶
type Querier interface { // FindServers finds all servers. FindServers(ctx context.Context) ([]FindServersRow, error) // FindServerByIP finds a server by its ip address. FindServerByIP(ctx context.Context, ipAddress *net.IPNet) (FindServerByIPRow, error) // InsertServer inserts a server and returns the ID. InsertServer(ctx context.Context, ipAddress *net.IPNet, extraIpAddress *net.IPNet) (int32, error) }
Querier is a typesafe Go interface backed by SQL queries.
Click to show internal directories.
Click to hide internal directories.