storage

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(conf *options.Config) *Manager

func (*Manager) GetArticle

func (f *Manager) GetArticle(artID string) (*structs.Article, error)

func (*Manager) GetLatestArticleID

func (f *Manager) GetLatestArticleID() (string, error)

func (*Manager) GetTags

func (f *Manager) GetTags() ([]*structs.ArticleTag, error)

构造一个首页文章导航json [{"Name":"linux","Articles":[{"ID":"/linux/linux-code1","Title":"mknote","En_name":"","Content":"","Author":"","Like_count":0,"Viewer_count":0,"Create_date":""},{"ID":"/linux/linux-code2","Title":"Linux 管道","En_name":"","Content":"","Author":"","Like_count":0,"Viewer_count":0,"Create_date":""}]},{"Name":"mknote","Articles":[{"ID":"/mknote/README","Title":"mknote","En_name":"","Content":"","Author":"","Like_count":0,"Viewer_count":0,"Create_date":""}]}]

func (*Manager) GetTitle

func (f *Manager) GetTitle(uri string) (r string, e error)

func (*Manager) Start

func (f *Manager) Start(errCh chan error)

从本地文件系统监听是否有文章更新,以更新缓存

func (*Manager) Stop

func (f *Manager) Stop()

func (*Manager) UpdateArtcile

func (f *Manager) UpdateArtcile(art *structs.Article) (*structs.Article, error)

func (*Manager) UpdateMetadata

func (f *Manager) UpdateMetadata(art *structs.Article) (*structs.Article, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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