Discover Packages
git.oschina.net/hades_c/ProxyPool
pkg
models
package
Version:
v0.0.0-...-f6e951e
Opens a new window with list of versions in this module.
Published: Mar 28, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var (
HasEngine bool
DbCfg struct {
Type, Host, Name, User, Passwd, Path, SSLMode string
}
EnableSQLite3 bool
)
InsertIps SaveIps save ips info to database
func NewEngine() (err error )
NewEngine .
func SetEngine() (err error )
SetEngine .
Test if have https proxy in database
just test on mysql database
dbName: ProxyPool
dbTableName: ip
select distinct if(exists(select * from ip where type2='https'),1,0) as a from ip;
type Engine interface {
Delete(interface{}) (int64 , error )
Exec(string , ...interface{}) (sql .Result , error )
Exist(...interface{}) (bool , error )
Find(interface{}, ...interface{}) error
Get(interface{}) (bool , error )
Id(interface{}) *xorm .Session
In(string , ...interface{}) *xorm .Session
Insert(...interface{}) (int64 , error )
InsertOne(interface{}) (int64 , error )
Iterate(interface{}, xorm .IterFunc ) error
Query(string , ...interface{}) (sql .Result , error )
Sql(string , ...interface{}) *xorm .Session
Table(interface{}) *xorm .Session
Where(interface{}, ...interface{}) *xorm .Session
}
Engine represents a XORM engine or session.
type IP struct {
ID int64 `xorm:"pk autoincr" json:"-"`
Data string `xorm:"NOT NULL" json:"ip"`
Type1 string `xorm:"NOT NULL" json:"type1"`
Type2 string `xorm:"NULL" json:"type2,omitempty"`
Speed int64 `xorm:"NOT NULL" json:"speed,omitempty"`
}
IP struct
Source Files
¶
Click to show internal directories.
Click to hide internal directories.