website

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WEEKLY string = "weekly"
	DAILY         = "daily"
)

Variables

This section is empty.

Functions

func IsExistPage

func IsExistPage(Db *gorp.DbMap, fullurl string) bool

func IsExistSite

func IsExistSite(Db *gorp.DbMap, fullurl string) bool

func IsVisitedPage

func IsVisitedPage(Db *gorp.DbMap, fullurl string) bool

func Normalize

func Normalize(fullurl string) string

func VisitPage

func VisitPage(Db *gorp.DbMap, fullurl string, body []byte, code int) error

Types

type Site

type Site struct {
	Id       int64
	Domain   string
	Www      bool
	Https    bool
	Encoding string
	Exist    bool

	Allow bool

	ChangeFreq string
	Pages      int64

	Description string
}

func AddSite

func AddSite(Db *gorp.DbMap, fullurl string) (Site, error)

func GetSite

func GetSite(Db *gorp.DbMap, fullurl string) (Site, error)

type SitePage

type SitePage struct {
	Id     int64
	SiteId int64
	Url    string
	Error  int64

	Visited int64
	Body    []byte
}

func AddPage

func AddPage(Db *gorp.DbMap, fullurl string) (SitePage, error)

func GetPage

func GetPage(Db *gorp.DbMap, fullurl string) (SitePage, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL