initial commit

This commit is contained in:
brent saner
2024-12-17 17:39:10 -05:00
commit 010643757e
29 changed files with 1644 additions and 0 deletions

27
cachedb/types.go Normal file
View File

@@ -0,0 +1,27 @@
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"`
}