geosite

package
v0.0.0-...-2a1d78e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-2.0 Imports: 11 Imported by: 0

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 NewReader

func NewReader(readSeeker io.ReadSeeker) (*Reader, []string, error)

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