Documentation
¶
Index ¶
- type DBWorker
- type DBrw
- func (db *DBrw) AddHash(hash string, urlID int64)
- func (db *DBrw) AddHost(host *proxy.Host, baseURL string) (int64, error)
- func (db *DBrw) FindOrigin(hash string) sql.NullInt64
- func (db *DBrw) GetHosts() (map[int64]*proxy.Host, error)
- func (db *DBrw) GetNewURLs(hostID int64, cnt int) ([]URL, error)
- func (db *DBrw) Transaction(fn func(*DBrw) error) error
- type Link
- type Logger
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBrw ¶
DBrw - content database (enable read/write operations)
func (*DBrw) FindOrigin ¶
FindOrigin - find origin url id in table 'URL'
func (*DBrw) GetNewURLs ¶
GetNewURLs - get URLs for downloads for host
type Link ¶
type Link struct { Master int64 `gorm:"type:integer REFERENCES url(id);index;not null"` Slave int64 `gorm:"type:integer REFERENCES url(id);index;not null"` }
Link - links between pages
Click to show internal directories.
Click to hide internal directories.