vendors

package
v0.0.0-...-2858fc5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VendorEntry

type VendorEntry struct {
	Oui     string `json:"oui"`
	Name    string `json:"name"`
	Address string `json:"address"`
}

type VendorNode

type VendorNode struct {
	Children map[rune]*VendorNode
	IsEnd    bool
	Data     *VendorEntry
}

type VendorSource

type VendorSource struct {
	URL string    `json:"url"`
	Rev time.Time `json:"rev"`
}

type Vendors

type Vendors struct {
	Root    *VendorNode
	Sources []*VendorSource
}

func New

func New() *Vendors

func (*Vendors) Insert

func (v *Vendors) Insert(prefix string, data *VendorEntry)

func (*Vendors) Reference

func (v *Vendors) Reference(url, rev string) error

func (*Vendors) Search

func (v *Vendors) Search(ctx context.Context, prefix string) []*VendorEntry

Jump to

Keyboard shortcuts

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