Documentation ¶
Index ¶
- Constants
- Variables
- func GetTokenType(value string) html.TokenType
- type Attributes
- type ExpressionNode
- func (n *ExpressionNode) GetKey() string
- func (n *ExpressionNode) GetOperator() Operator
- func (n *ExpressionNode) GetType() Type
- func (n *ExpressionNode) Insert(key string)
- func (n *ExpressionNode) IsComparisonOperatorNode() bool
- func (n *ExpressionNode) IsInode() bool
- func (n *ExpressionNode) IsLogicalOperatorNode() bool
- func (n *ExpressionNode) IsValueFieldNode() bool
- type ExpressionNodeKey
- type ExpressionTree
- type Meta
- type Operator
- type Page
- type Query
- type QueryResults
- type QueryType
- type Section
- type SiteMap
- type SiteMapUrl
- type Source
- type Type
Constants ¶
View Source
const ( Wildcard string = "*" TypeField string = "type" DataField string = "data" TokenField string = "token" HrefField string = "href" SourceName string = "name" SourceUrl string = "url" SourceTotalSections string = "total_sections" SourceLastUpdate string = "last_update" SourceMeta string = "meta" SourceMetaTitle string = "meta_title" SourceMetaDescription string = "meta_description" SourceMetaTwitter string = "meta_twitter" SourceMetaUrl string = "meta_url" SourceMetaLocale string = "meta_locale" SourcePageText string = "text" SourcePageLinks string = "links" SourcePageLink string = "link" SourcePageSitemap string = "sitemap" SourcePageSitemapUrl string = "sitemap_url" SourcePageSitemapLastMod string = "sitemap_lastmod" SourcePageSitemapChangeFreq string = "sitemap_changefreq" )
View Source
const ( EqualOperator Operator = iota LikeOperator NotLikeOperator AndOperator OrOperator StringType Type = iota TokenType TextTokenType ErrorTokenType StartTagTokenType EndTagTokenType SelfClosingTagTokenType CommentTokenType DocTypeTokenType SelectType QueryType = iota CreateType ShowSources )
View Source
const (
CreateSource string = "create source"
)
Variables ¶
View Source
var AttributeFields = common.NewStringSlice(HrefField)
View Source
var Fields = common.NewStringSlice( Wildcard, SourceName, SourceUrl, SourceTotalSections, SourceLastUpdate, SourceMeta, SourceMetaTitle, SourceMetaDescription, SourceMetaTwitter, SourceMetaLocale, SourceMetaUrl, SourcePageText, SourcePageLinks, SourcePageLink, TypeField, DataField, TokenField, HrefField, SourcePageSitemapUrl, SourcePageSitemapLastMod, SourcePageSitemapChangeFreq, SourcePageSitemap, )
Functions ¶
func GetTokenType ¶
Types ¶
type Attributes ¶
type Attributes struct {
// contains filtered or unexported fields
}
func NewAttributes ¶
func NewAttributes(attributes []html.Attribute) *Attributes
func (*Attributes) Get ¶
func (s *Attributes) Get(key string) string
type ExpressionNode ¶
type ExpressionNode struct { Key *ExpressionNodeKey Left *ExpressionNode Right *ExpressionNode }
func (*ExpressionNode) GetKey ¶
func (n *ExpressionNode) GetKey() string
func (*ExpressionNode) GetOperator ¶
func (n *ExpressionNode) GetOperator() Operator
func (*ExpressionNode) GetType ¶
func (n *ExpressionNode) GetType() Type
func (*ExpressionNode) Insert ¶
func (n *ExpressionNode) Insert(key string)
func (*ExpressionNode) IsComparisonOperatorNode ¶
func (n *ExpressionNode) IsComparisonOperatorNode() bool
func (*ExpressionNode) IsInode ¶
func (n *ExpressionNode) IsInode() bool
func (*ExpressionNode) IsLogicalOperatorNode ¶
func (n *ExpressionNode) IsLogicalOperatorNode() bool
func (*ExpressionNode) IsValueFieldNode ¶
func (n *ExpressionNode) IsValueFieldNode() bool
type ExpressionNodeKey ¶
type ExpressionTree ¶
type ExpressionTree struct {
Root *ExpressionNode
}
func (*ExpressionTree) GetParamNode ¶
func (t *ExpressionTree) GetParamNode(node *ExpressionNode) *ExpressionNode
func (*ExpressionTree) InOrderPrint ¶
func (t *ExpressionTree) InOrderPrint(node *ExpressionNode)
func (*ExpressionTree) Insert ¶
func (t *ExpressionTree) Insert(key string)
func (*ExpressionTree) Match ¶
func (t *ExpressionTree) Match(node *ExpressionNode, section *Section) bool
type Meta ¶
type Meta struct { Title string Url string Description string Twitter string Locale string SiteMap *SiteMap }
func (*Meta) AddSitemap ¶
func (*Meta) AddSitemapUrl ¶
func (m *Meta) AddSitemapUrl(url *SiteMapUrl)
func (*Meta) IsCompleted ¶
type Page ¶
func (*Page) AddSection ¶
type Query ¶
type Query struct { Source string Url string Schedule string Fields *common.StringSlice QueryType QueryType Distinct bool Expression *ExpressionTree }
func (*Query) InOrderPrint ¶
func (q *Query) InOrderPrint()
type QueryResults ¶
type Section ¶
func NewSection ¶
func NewSection() *Section
type SiteMap ¶
type SiteMap struct {
Sites []*SiteMapUrl `xml:"url"`
}
func NewSitemap ¶
func NewSitemap() *SiteMap
type SiteMapUrl ¶
Click to show internal directories.
Click to hide internal directories.