prefixdb

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

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = 0x00010000

Variables

This section is empty.

Functions

This section is empty.

Types

type PrefixDB

type PrefixDB struct {
	Total       int
	Version     uint32
	Path        string
	Description string
	Strings     [4]int // size / count / offset / strings index width (bytes)
	Numbers     [3]int // size / count / offset
	Pairs       [3]int // size / count / offset
	Clusters    [4]int // size / count / offset / clusters index width (bytes)
	Maps        [3]int // size / count / offset
	Nodes       [4]int // size / count / offset / nodes width (bits)
	// contains filtered or unexported fields
}

func New

func New() *PrefixDB

func (*PrefixDB) Add

func (d *PrefixDB) Add(prefix netip.Prefix, data map[string]any, clusters [][]string)

func (*PrefixDB) Load

func (d *PrefixDB) Load(path string) error

func (*PrefixDB) Lookup

func (d *PrefixDB) Lookup(value string, out map[string]any)

func (*PrefixDB) Save

func (d *PrefixDB) Save(path, description string) (content []byte, err error)

Directories

Path Synopsis
cmd
prefixdb command

Jump to

Keyboard shortcuts

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