Documentation
¶
Overview ¶
Package v2 defines version 2 of the on-disk named IP-origin cache.
Index ¶
Constants ¶
View Source
const Version = 2
Version is the cache format this package defines.
Variables ¶
View Source
var Storage = apispec.Storage{ Format: apispec.JSON, Types: []reflect.Type{reflect.TypeFor[Cache]()}, }
Storage is the schema specification of the IP-origin cache file.
Immutable
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// Version identifies the format; a reader discards a cache whose Version
// differs and rebuilds it, with no migration.
Version int `json:"version"`
// Origins holds the entry of each named IP origin.
Origins map[string]Entry `json:"origins"`
}
Cache is the cache file.
Click to show internal directories.
Click to hide internal directories.