initial commit
This commit is contained in:
27
cachedb/types.go
Normal file
27
cachedb/types.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user