Documentation ¶
Index ¶
- func SetupBolt(path string, l *logrus.Entry) error
- type Bolt
- func (b Bolt) Close() error
- func (b Bolt) EnsureBuckets(meta Meta) error
- func (b Bolt) GetChangelog(servername, packName string) (changelog string, err error)
- func (b Bolt) GetMeta(serverName string) (meta Meta, found bool, err error)
- func (b Bolt) PrettyPrint(meta Meta) error
- func (b Bolt) PutChangelog(servername, packName, changelog string) error
- func (b Bolt) RefreshMeta(meta Meta) error
- type Cache
- type Meta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bolt ¶
Bolt holds a pointer of bolt.DB boltdb is used to store a cache of Changelogs of Ubuntu/Debian
func (Bolt) EnsureBuckets ¶
EnsureBuckets puts a Meta information and create a buket that holds changelogs.
func (Bolt) GetChangelog ¶
GetChangelog get the changelgo of specified packName from the Bucket
func (Bolt) PutChangelog ¶
PutChangelog put the changelgo of specified packName into the Bucket
func (Bolt) RefreshMeta ¶ added in v0.3.0
RefreshMeta gets a Meta Information os the servername to boltdb.
type Cache ¶
type Cache interface { Close() error GetMeta(string) (Meta, bool, error) RefreshMeta(Meta) error EnsureBuckets(Meta) error PrettyPrint(Meta) error GetChangelog(string, string) (string, error) PutChangelog(string, string, string) error }
Cache is a interface of cache
var DB Cache
DB has a cache instance
Click to show internal directories.
Click to hide internal directories.