es

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPost

func AddPost(post Post)

func DeletePost

func DeletePost(post Post)

func ExistsPost

func ExistsPost(post Post) bool

func GetPost

func GetPost(post Post)

func Init

func Init(cfg *elasticsearch.Config)

func SavePost

func SavePost(post Post)
func Search(post Post, perPage int, page int) (err error, ids []string)

func UpdatePost

func UpdatePost(post Post)

Types

type Post

type Post struct {
	Id          int
	Title       string // 标题
	Description string
	Content     string    // 内容
	Created     time.Time // 创建时间
	Category    string
	Tags        string
}

Jump to

Keyboard shortcuts

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