Documentation
¶
Overview ¶
Package mapstore keeps the learned site maps (internal/sitemap) on disk: one JSON file per host in a per-profile directory (~/.daisybell/maps/<profile>/<host>.json), private to the user (0700 directory, 0600 files), written atomically. Separate from sitemap, which is pure.
Index ¶
- Variables
- func Decode(data []byte) (*sitemap.Map, error)
- type Entry
- type Store
- func (s Store) Clear(host string) error
- func (s Store) Export(host, to string) error
- func (s Store) Import(from string) (*sitemap.Map, error)
- func (s Store) List() ([]Entry, error)
- func (s Store) Load(host string) (*sitemap.Map, error)
- func (s Store) Path(host string) string
- func (s Store) Save(m *sitemap.Map) error
- func (s Store) Update(host string, fn func(*sitemap.Map) bool) error
Constants ¶
This section is empty.
Variables ¶
var ErrNoMap = errors.New("no map")
ErrNoMap is returned for a host without a map.
Functions ¶
Types ¶
type Store ¶
Store reads and writes the maps of one profile.
func (Store) Import ¶
Import reads an exported map and saves it as its host's map (replacing the current one).
func (Store) Load ¶
Load reads a host's map (empty when there is none), dropping what aged out (90 days) and anything that is not structure.