cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: CC-BY-SA-4.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconSize = 256
	IconType = "icon"

	MediumSize = 2048
	MediumType = "medium"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityCache

type EntityCache struct {
	// contains filtered or unexported fields
}

func NewEntityCache

func NewEntityCache(shelf *shelf.Shelf, path string) *EntityCache

func (*EntityCache) FetchIcon

func (cache *EntityCache) FetchIcon(ent shelf.Entity) (string, error)

func (*EntityCache) FetchMediumThumbnail

func (cache *EntityCache) FetchMediumThumbnail(ent shelf.Entity) (string, error)

func (*EntityCache) Remove

func (cache *EntityCache) Remove(entity shelf.Entity) error

type MomentCache

type MomentCache struct {
	// contains filtered or unexported fields
}

func NewMomentCache

func NewMomentCache(shelf *shelf.Shelf) *MomentCache

func (*MomentCache) Fetch

func (cache *MomentCache) Fetch(m *shelf.Moment) *MomentCacheItem

func (*MomentCache) Preview

func (cache *MomentCache) Preview(m *shelf.Moment) *MomentCacheItem

func (*MomentCache) Save

func (cache *MomentCache) Save(origTime time.Time, m *shelf.Moment) error

type MomentCacheItem

type MomentCacheItem struct {
	Moment *shelf.Moment
	// contains filtered or unexported fields
}

func (*MomentCacheItem) Content

func (cache *MomentCacheItem) Content() string

func (*MomentCacheItem) Embeds

func (cache *MomentCacheItem) Embeds() []shelf.Entity

func (*MomentCacheItem) FindFirstImage

func (cache *MomentCacheItem) FindFirstImage() *shelf.ImageEntity

Jump to

Keyboard shortcuts

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