geosite

package
v0.0.0-...-a4db326 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Overview

Package geosite implements functions for parsing and processing GeoSite resource files.

Index

Constants

View Source
const (
	TypeV2Ray = "V2Ray"
	TypeSing  = "sing-geosite"
)

Variables

View Source
var ErrInvalidDatabase = errors.New("invalid GeoSite database")

Functions

This section is empty.

Types

type Database

type Database struct {
	SourceType Type
	CodeCount  int
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(data []byte) (db *Database, err error)

func FromFile

func FromFile(file string) (db *Database, err error)

func (Database) LookupCode

func (db Database) LookupCode(domainName string) string

func (Database) LookupCodes

func (db Database) LookupCodes(domainName string) []string

type Type

type Type string

Jump to

Keyboard shortcuts

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