Documentation
¶
Index ¶
- Variables
- func CheckIP(ip *models.IP) bool
- func CheckProxy(ip *models.IP)
- func CheckProxyDB()
- func ProxyAdd(ip *models.IP)
- func ProxyDel(ip *models.IP)
- func ProxyFind(value string) (ip *models.IP)
- func ProxyRandom() (ip *models.IP)
- type Storage
- func (s *Storage) Count() int
- func (s *Storage) Create(item interface{}) error
- func (s *Storage) Delete(ip *models.IP) error
- func (s *Storage) FindAll(value string) ([]*models.IP, error)
- func (s *Storage) GetAll() ([]*models.IP, error)
- func (s *Storage) GetDBSession() *mgo.Session
- func (s *Storage) GetOne(value string) (*models.IP, error)
- func (s *Storage) Update(ip *models.IP) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = util.NewConfig()
Config 全局配置文件
View Source
var GlobalMgoSession, _ = mgo.Dial(string(Config.Mongo.Addr))
GlobalMgoSession 全局连接Session
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.