annotated

package
v0.0.0-...-4ed3328 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ProviderName = "annotated"
	CacheTTL     = 5 * time.Minute
)

Variables

This section is empty.

Functions

func LoadAnnotatedIPPrefixesFromPaths

func LoadAnnotatedIPPrefixesFromPaths(l *slog.Logger, paths []string, prefixesWithAnnotations PrefixesWithAnnotations) error

func LoadFilePrefixesWithAnnotationsFromPath

func LoadFilePrefixesWithAnnotationsFromPath(l *slog.Logger, path string, prefixesWithAnnotations map[netip.Prefix][]annotation) error

func NewProviderClient

func NewProviderClient(c session.Session) (providers.ProviderClient, error)

func ReadAnnotatedPrefixesFromFile

func ReadAnnotatedPrefixesFromFile(l *slog.Logger, path string, prefixesWithAnnotations map[netip.Prefix][]annotation) error

Types

type Annotated

type Annotated struct {
	Client *retryablehttp.Client
	Root   string
	Paths  []string
}

type HostSearchResult

type HostSearchResult map[netip.Prefix][]annotation

type PrefixesWithAnnotations

type PrefixesWithAnnotations map[netip.Prefix][]annotation

type ProviderClient

type ProviderClient struct {
	session.Session
}

func (*ProviderClient) CreateTable

func (c *ProviderClient) CreateTable(data []byte) (*table.Writer, error)

func (*ProviderClient) Enabled

func (c *ProviderClient) Enabled() bool

func (*ProviderClient) ExtractThreatIndicators

func (c *ProviderClient) ExtractThreatIndicators(findRes []byte) (*providers.ThreatIndicators, error)

func (*ProviderClient) FindHost

func (c *ProviderClient) FindHost() ([]byte, error)

func (*ProviderClient) GetConfig

func (c *ProviderClient) GetConfig() *session.Session

func (*ProviderClient) Initialise

func (c *ProviderClient) Initialise() error

func (*ProviderClient) Priority

func (c *ProviderClient) Priority() *int32

func (*ProviderClient) RateHostData

func (c *ProviderClient) RateHostData(findRes []byte, ratingConfigJSON []byte) (providers.RateResult, error)

type Repository

type Repository struct {
	URL         string   `toml:"url"`
	GitHubUser  string   `toml:"github_user"`
	GitHubToken string   `toml:"github_token"`
	Paths       []string `toml:"paths"`
	Patterns    []string `toml:"patterns"`
}

type VersionedAnnotatedDoc

type VersionedAnnotatedDoc struct {
	LastFetchedFromSource time.Time
	LastFetchededFromDB   time.Time
	Doc                   PrefixesWithAnnotations
}

type YamlPrefixAnnotationsRecords

type YamlPrefixAnnotationsRecords struct {
	Prefixes    []string         `yaml:"prefixes"`
	Annotations []yamlAnnotation `yaml:"annotations"`
}

Jump to

Keyboard shortcuts

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