tag

package
v0.0.0-...-aa5fa10 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableTag = "tag"
)

Const

Variables

This section is empty.

Functions

func DeleteTag

func DeleteTag(id primitive.ObjectID) (int64, error)

DeleteTag delete Tag

func GetTotalTag

func GetTotalTag() (int64, error)

GetTotalTag get total tag https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#pkg-examples

func InsertTag

func InsertTag(tag Tag) error

InsertTag Insert Tag

func UpdateTag

func UpdateTag(tag Tag) (int64, error)

UpdateTag update Tag

Types

type Tag

type Tag struct {
	ID        primitive.ObjectID `bson:"_id" json:"id"`
	Name      string             `bson:"name" json:"name"`
	CreatedAt time.Time          `bson:"created_at" json:"-"`
	UpdatedAt time.Time          `bson:"updated_at" json:"updatedAt"`
}

Tag struct

func GetAllTag

func GetAllTag() []Tag

GetAllTag get all tag

func GetSlideTag

func GetSlideTag(skip int64, limlit int64) []Tag

GetSlideTag get slide tag

Jump to

Keyboard shortcuts

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