14 lines
331 B
Go
14 lines
331 B
Go
package db
|
|
|
|
func Peer_ListAll(tx TX, networkID int64) ([]*Peer, error) {
|
|
const query = Peer_SelectQuery + ` WHERE NetworkID=? ORDER BY PeerIP ASC`
|
|
return Peer_List(tx, query, networkID)
|
|
}
|
|
|
|
func Peer_GetByAPIKey(tx TX, apiKey string) (*Peer, error) {
|
|
return Peer_GetWhere(
|
|
tx,
|
|
Peer_SelectQuery+` WHERE APIKey=?`,
|
|
apiKey)
|
|
}
|