geosite

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "geosite"

Variables

This section is empty.

Functions

func NewGeoSite

func NewGeoSite(ctx context.Context, _ adapter.Core, logger log.Logger, tag string, args any) (adapter.PluginMatcher, error)

Types

type Args

type Args struct {
	Path string                 `json:"path"`
	Type string                 `json:"type"`
	Code utils.Listable[string] `json:"code"`
}

type GeoSite

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

func (*GeoSite) APIHandler

func (g *GeoSite) APIHandler() chi.Router

func (*GeoSite) LoadRunningArgs

func (g *GeoSite) LoadRunningArgs(_ context.Context, args any) (uint16, error)

func (*GeoSite) Match

func (g *GeoSite) Match(ctx context.Context, dnsCtx *adapter.DNSContext, argsID uint16) (bool, error)

func (*GeoSite) Start

func (g *GeoSite) Start() error

func (*GeoSite) Tag

func (g *GeoSite) Tag() string

func (*GeoSite) Type

func (g *GeoSite) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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