geosite

package
v1.10.0-alpha.24 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-2.0 Imports: 11 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(code []Item) option.DefaultRule

func Merge

func Merge(rules []option.DefaultRule) option.DefaultRule

func Write

func Write(writer varbin.Writer, domains map[string][]Item) error

Types

type Item

type Item struct {
	Type  ItemType
	Value string
}

type ItemType

type ItemType = uint8
const (
	RuleTypeDomain ItemType = iota
	RuleTypeDomainSuffix
	RuleTypeDomainKeyword
	RuleTypeDomainRegex
)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Reader, []string, error)

func (*Reader) Read

func (r *Reader) Read(code string) ([]Item, error)

func (*Reader) Upstream

func (r *Reader) Upstream() any

Jump to

Keyboard shortcuts

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