Documentation
¶
Index ¶
- Variables
- func InitModelEngine(cfg svc.ValueDbconf) (err error)
- func MySQL(cfg svc.ValueDbconf) (err error)
- func SQLite(cfg svc.ValueDbconf) (err error)
- type Natinfo
- func (obj *Natinfo) Add() (code uint64, err error)
- func (obj *Natinfo) Delete() (code uint64, err error)
- func (obj *Natinfo) Get() (code uint64, err error)
- func (obj *Natinfo) GetAdv() (code uint64, err error)
- func (obj *Natinfo) Reset() (code uint64, err error)
- func (obj *Natinfo) Set() (code uint64, err error)
- func (obj *Natinfo) Update() (code uint64, err error)
- type P2pinfo
- func (obj *P2pinfo) Add() (code uint64, err error)
- func (obj *P2pinfo) Delete() (code uint64, err error)
- func (obj *P2pinfo) Get() (code uint64, err error)
- func (obj *P2pinfo) GetAdv() (code uint64, err error)
- func (obj *P2pinfo) GetBySessionKey() (code uint64, err error)
- func (obj *P2pinfo) Reset() (code uint64, err error)
- func (obj *P2pinfo) Set() (code uint64, err error)
- func (obj *P2pinfo) Update() (code uint64, err error)
- func (obj *P2pinfo) UpdateBySessionKey() (code uint64, err error)
- type Relayinfo
- func (obj *Relayinfo) Add() (code uint64, err error)
- func (obj *Relayinfo) Delete() (code uint64, err error)
- func (obj *Relayinfo) Get() (code uint64, err error)
- func (obj *Relayinfo) GetAdv() (code uint64, err error)
- func (obj *Relayinfo) GetBySessionKey() (code uint64, err error)
- func (obj *Relayinfo) Reset() (code uint64, err error)
- func (obj *Relayinfo) Set() (code uint64, err error)
- func (obj *Relayinfo) Update() (code uint64, err error)
- func (obj *Relayinfo) UpdateBySessionKey() (code uint64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Orm *xorm.Engine
)
Functions ¶
func InitModelEngine ¶
func InitModelEngine(cfg svc.ValueDbconf) (err error)
InitModelEngine init engine
Types ¶
type Natinfo ¶
type Natinfo struct {
ID uint32 `json:"_" xorm:"id"`
Did string `json:"did" xorm:"did"`
UserID int64 `json:"user_id" xorm:"user_id"`
Upnp int32 `json:"upnp" xorm:"upnp"`
UpnpProtocol int32 `json:"upnp_protocol"`
UpnpPort int32 `json:"upnp_pprt"`
NatType int32 `json:"nat_type"`
LocalIP string `json:"local_ip" xorm:"local_ip"`
LocalPort int32 `json:"local_port"`
OutsideIpaddr string `json:"outside_ipaddr" xorm:"outside_ipaddr"`
LocalSsid string `json:"local_ssid"`
LocalGateway string `json:"local_gateway"`
GatewayMac string `json:"gateway_mac"`
LastTime int64 `json:"last_time"`
}
Natinfo table name natinfo struct define
type P2pinfo ¶
type P2pinfo struct {
ID uint32 `json:"_" xorm:"id"`
Did string `json:"did" xorm:"did"`
UserID int64 `json:"user_id" xorm:"user_id"`
DeviceOutsideIP string `json:"device_outside_ip" xorm:"device_outside_ip"`
DeviceOutsidePort int32 `json:"device_outside_port" xorm:"device_outside_port"`
DeviceLocalIP string `json:"device_local_ip" xorm:"device_local_ip"`
DeviceLocalPort int32 `json:"device_local_port" xorm:"device_local_port"`
UserOutsideIP string `json:"user_outside_ip" xorm:"user_outside_ip"`
UserOutsidePort int32 `json:"user_outside_port" xorm:"user_outside_port"`
UserLocalIP string `json:"user_local_ip" xorm:"user_local_ip"`
UserLocalPort int32 `json:"user_local_port" xorm:"user_local_port"`
SessionKey string `json:"session_key"`
P2psrvIP string `json:"p2psrv_ip" xorm:"p2psrv_ip"`
P2psrvPort int32 `json:"p2psrv_port"`
UserTime int64 `json:"user_time"`
DeviceTime int64 `json:"device_time"`
}
P2pinfo table name p2pinfo struct define
func GetP2pInfo ¶
GetP2pInfo get p2p info by did and uid.
func (*P2pinfo) GetBySessionKey ¶
GetBySessionKey get record
func (*P2pinfo) UpdateBySessionKey ¶
UpdateBySessionKey update record
type Relayinfo ¶
type Relayinfo struct {
ID uint32 `json:"_" xorm:"id"`
RelayIpaddr string `json:"relay_ipaddr" xorm:"relay_ipaddr"`
Did string `json:"did" xorm:"did"`
UserID int64 `json:"user_id" xorm:"user_id"`
SessionKey string `json:"session_key"`
UserTime int64 `json:"user_time"`
DeviceTime int64 `json:"device_time"`
}
Relayinfo table name relayinfo struct define
func (*Relayinfo) GetBySessionKey ¶
GetBySessionKey get record
func (*Relayinfo) UpdateBySessionKey ¶
UpdateBySessionKey update record
Click to show internal directories.
Click to hide internal directories.