article

package
v0.0.0-...-8145f48 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RvblrParse

func RvblrParse(content string) (hws []string, hwsalt []string, err error)

RvblrParse returns rvblr article headwords struct

Types

type Article

type Article struct {
	ID          string                `json:"-"`
	Dictionary  dictionary.Dictionary `json:"-"`
	Title       string
	Content     string
	Headword    []string
	HeadwordAlt []string
	Suggest     []Suggest
	Prefix      []Prefix
}

Article represents an article entity

func Get

func Get(d dictionary.Dictionary, articleID string) (Article, error)

Get gets one article from the storage

func Query

func Query(path string, reqbody interface{}) ([]Article, int, error)

Query queries articles in the storage

type Prefix

type Prefix struct {
	Letter1 string
	Letter2 string
	Letter3 string
}

Prefix article prefix struct

type Suggest

type Suggest struct {
	Input  string `json:"input"`
	Weight int    `json:"weight"`
}

Suggest article suggests

Jump to

Keyboard shortcuts

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