internal

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrimHtml

func TrimHtml(src string) string

TrimHtml 去掉字符串中的html标签

Types

type Article

type Article struct {
	YQ     sdk.IYuQue
	Jieba  *jiebago.Segmenter
	Config *config.Toml
}

func NewArticle

func NewArticle(yq sdk.IYuQue, jieba *jiebago.Segmenter, config *config.Toml) (*Article, error)

func (*Article) BuildAllIndex

func (s *Article) BuildAllIndex(ctx context.Context) error

func (*Article) Cut

func (s *Article) Cut(ctx context.Context, text string) ([]string, error)

func (*Article) GetDetail

func (*Article) GetIndex

func (s *Article) GetIndex(ctx context.Context) map[string]mapset.Set[string]

func (*Article) GetList

func (s *Article) GetList(ctx context.Context, request *service.GetListRequest) (*service.GetListResponse, error)

func (*Article) GetToc added in v1.2.1

func (s *Article) GetToc(ctx context.Context, content string) []service.H

GetToc 获取目录列表

func (*Article) GetTotal

func (s *Article) GetTotal(ctx context.Context) (int, error)

func (*Article) PutIndex

func (s *Article) PutIndex(ctx context.Context, article *service.Article) error

Jump to

Keyboard shortcuts

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