asn

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 12 Imported by: 0

README

Installation

go get -u github.com/aredoff/iptec/plugins/asn

API

See godoc reference.

Example

package main

import (
	"github.com/aredoff/iptec"
	"github.com/aredoff/iptec/plugins/asn"
)

func main() {
	a := iptec.New()
	defer a.Close()
	a.Use(asn.New())
	a.Activate()
	a.Collect()
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AS

type AS struct {
	Start       netip.Addr
	End         netip.Addr
	Number      int
	CountryCode string
	Description string
}

func (AS) Contains

func (a AS) Contains(ip netip.Addr) bool

func (AS) String

func (a AS) String() string

type Asn

type Asn struct {
	iptec.Сurator
	iptec.Cash
	iptec.WebClient
	// contains filtered or unexported fields
}

func New

func New() *Asn

func (*Asn) Activate

func (p *Asn) Activate() error

func (*Asn) Find

func (p *Asn) Find(address net.IP) (AsnResult, error)

func (*Asn) Name

func (p *Asn) Name() string

type AsnResult

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

func (*AsnResult) Points

func (r *AsnResult) Points() int

Jump to

Keyboard shortcuts

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