Documentation ¶
Index ¶
- Variables
- type AdblockEngine
- type Engine
- type FilterRequest
- func (*FilterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FilterRequest) GetBaseUrl() string
- func (x *FilterRequest) GetClasses() []string
- func (x *FilterRequest) GetIds() []string
- func (x *FilterRequest) GetUrls() []string
- func (*FilterRequest) ProtoMessage()
- func (x *FilterRequest) ProtoReflect() protoreflect.Message
- func (x *FilterRequest) Reset()
- func (x *FilterRequest) String() string
- type FilterResponse
- func (*FilterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FilterResponse) GetBlockedDomains() []string
- func (x *FilterResponse) GetMatches() []string
- func (*FilterResponse) ProtoMessage()
- func (x *FilterResponse) ProtoReflect() protoreflect.Message
- func (x *FilterResponse) Reset()
- func (x *FilterResponse) String() string
- type ParseAnalysis
- type RuleGroups
- type Rules
- type SimpleNode
- type SimpleNodeType
Constants ¶
This section is empty.
Variables ¶
View Source
var File_lib_goadblock_src_adblock_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AdblockEngine ¶
type AdblockEngine struct {
// contains filtered or unexported fields
}
func NewAdblockEngine ¶
func NewAdblockEngine(log *log.Logger) (*AdblockEngine, error)
func (*AdblockEngine) Close ¶
func (engine *AdblockEngine) Close()
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) HtmlToText ¶
func (*Engine) IdentifyElements ¶
func (engine *Engine) IdentifyElements(z *html.Node, baseUrl string, adblock *AdblockEngine) (*ParseAnalysis, error)
type FilterRequest ¶
type FilterRequest struct { Classes []string `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` Urls []string `protobuf:"bytes,3,rep,name=urls,proto3" json:"urls,omitempty"` BaseUrl string `protobuf:"bytes,4,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` // contains filtered or unexported fields }
func (*FilterRequest) Descriptor
deprecated
func (*FilterRequest) Descriptor() ([]byte, []int)
Deprecated: Use FilterRequest.ProtoReflect.Descriptor instead.
func (*FilterRequest) GetBaseUrl ¶
func (x *FilterRequest) GetBaseUrl() string
func (*FilterRequest) GetClasses ¶
func (x *FilterRequest) GetClasses() []string
func (*FilterRequest) GetIds ¶
func (x *FilterRequest) GetIds() []string
func (*FilterRequest) GetUrls ¶
func (x *FilterRequest) GetUrls() []string
func (*FilterRequest) ProtoMessage ¶
func (*FilterRequest) ProtoMessage()
func (*FilterRequest) ProtoReflect ¶
func (x *FilterRequest) ProtoReflect() protoreflect.Message
func (*FilterRequest) Reset ¶
func (x *FilterRequest) Reset()
func (*FilterRequest) String ¶
func (x *FilterRequest) String() string
type FilterResponse ¶
type FilterResponse struct { Matches []string `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` BlockedDomains []string `protobuf:"bytes,2,rep,name=blocked_domains,json=blockedDomains,proto3" json:"blocked_domains,omitempty"` // contains filtered or unexported fields }
func (*FilterResponse) Descriptor
deprecated
func (*FilterResponse) Descriptor() ([]byte, []int)
Deprecated: Use FilterResponse.ProtoReflect.Descriptor instead.
func (*FilterResponse) GetBlockedDomains ¶
func (x *FilterResponse) GetBlockedDomains() []string
func (*FilterResponse) GetMatches ¶
func (x *FilterResponse) GetMatches() []string
func (*FilterResponse) ProtoMessage ¶
func (*FilterResponse) ProtoMessage()
func (*FilterResponse) ProtoReflect ¶
func (x *FilterResponse) ProtoReflect() protoreflect.Message
func (*FilterResponse) Reset ¶
func (x *FilterResponse) Reset()
func (*FilterResponse) String ¶
func (x *FilterResponse) String() string
type ParseAnalysis ¶
type RuleGroups ¶
type RuleGroups struct { Filters []*Rules `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` // contains filtered or unexported fields }
func (*RuleGroups) Descriptor
deprecated
func (*RuleGroups) Descriptor() ([]byte, []int)
Deprecated: Use RuleGroups.ProtoReflect.Descriptor instead.
func (*RuleGroups) GetFilters ¶
func (x *RuleGroups) GetFilters() []*Rules
func (*RuleGroups) ProtoMessage ¶
func (*RuleGroups) ProtoMessage()
func (*RuleGroups) ProtoReflect ¶
func (x *RuleGroups) ProtoReflect() protoreflect.Message
func (*RuleGroups) Reset ¶
func (x *RuleGroups) Reset()
func (*RuleGroups) String ¶
func (x *RuleGroups) String() string
type Rules ¶
type Rules struct { Rules []string `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
func (*Rules) Descriptor
deprecated
func (*Rules) ProtoMessage ¶
func (*Rules) ProtoMessage()
func (*Rules) ProtoReflect ¶
func (x *Rules) ProtoReflect() protoreflect.Message
type SimpleNode ¶
type SimpleNode struct { Type SimpleNodeType Text string Children []*SimpleNode }
func (*SimpleNode) String ¶
func (node *SimpleNode) String() string
type SimpleNodeType ¶
type SimpleNodeType string
Click to show internal directories.
Click to hide internal directories.