store

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderInfo

type ProviderInfo struct {
	Name       string
	RangeCount int
}

type Store

type Store struct {
	DataDir string
	BinPath string
}

func DefaultStore

func DefaultStore() (*Store, error)

func (*Store) AddRanges

func (s *Store) AddRanges(provider string, cidrs []string) error

func (*Store) Build

func (s *Store) Build() (*trie.Trie, error)

func (*Store) Init

func (s *Store) Init() error

func (*Store) ListProviders

func (s *Store) ListProviders() ([]ProviderInfo, error)

func (*Store) LoadOrBuildTrie

func (s *Store) LoadOrBuildTrie(seedFS fs.FS) (*trie.Trie, error)

func (*Store) LoadTrie

func (s *Store) LoadTrie() (*trie.Trie, error)

func (*Store) OverwriteRanges

func (s *Store) OverwriteRanges(provider string, cidrs []string) error

func (*Store) ProviderExists

func (s *Store) ProviderExists(provider string) bool

func (*Store) ReadProviderRanges

func (s *Store) ReadProviderRanges(provider string) ([]string, error)

func (*Store) RemoveProvider

func (s *Store) RemoveProvider(provider string) error

func (*Store) SeedFromFS

func (s *Store) SeedFromFS(seedFS fs.FS) error

Jump to

Keyboard shortcuts

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