GoBroke/cachedb/types.go

28 lines
462 B
Go
Raw Permalink Normal View History

2024-12-17 17:39:10 -05:00
package cachedb
import (
`time`
`github.com/jmoiron/sqlx`
`r00t2.io/gobroke/tunnelbroker`
)
type Cache struct {
db *sqlx.DB
}
type TunnelDB struct {
*tunnelbroker.Tunnel
Created time.Time `db:"created"`
Checked time.Time `db:"checked"`
Updated time.Time `db:"updated"`
}
type ClientIpDB struct {
ID uint64 `db:"id"`
TunID uint64 `db:"tun_id"`
*tunnelbroker.FetchedIP
Set time.Time `db:"when_set"`
Fetched time.Time `db:"when_fetched"`
}