Documentation ¶
Overview ¶
Package store defines interfaces for types that handle storage of web page metadata, along with definitions of a few common errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCantCreateDatabase = errors.New("can't create the database") ErrorDatabaseNotFound = errors.New("database not found") ErrorResourceNotFound = errors.New("resource not found in data store") ErrorValueNotAllowed = errors.New("value not allowed") ErrMappingNotFound = errors.New("id mapping not found") )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory func() (URLDataStore, error)
type Maintainable ¶
This interface adds create/clear/maintain methods to the URLDataStore interface. URLDataStores may support these methods to create, clear, and maintain the store.
type Observable ¶ added in v0.6.5
This interface is to expose a method to supply data to healthchecks.
type URLDataStore ¶
type URLDataStore interface { fetch.URLFetcher Save(*resource.WebPage) (uint64, error) Ping() error Delete(*nurl.URL) (bool, error) }
This interface is the contract for storing and retrieving WebPage resources. It adds a Store() method to the fetch.URLFetcher interface. The fmt.Stringer interface is mainly to provide a way for the store to represent itself in log messages, e.g. a safe version of the DSN.
Click to show internal directories.
Click to hide internal directories.