tag

package
v0.0.0-...-77d2946 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTagNotFound = errors.New(1_000_000, "tag '%s' not found.")

Functions

func Count

func Count(ctx context.Context, client *ent.Client, q QueryParams) (count int, err error)

func CreateQuery

func CreateQuery(client *ent.Client, q QueryParams) *ent.TagQuery

func IsTagExist

func IsTagExist(ctx context.Context, client *ent.Client, name string) bool

func ParseTag

func ParseTag(name string) []string

func Read

func Read(ctx context.Context, client *ent.Client, name string) (t *ent.Tag, err error)

func ReadAll

func ReadAll(ctx context.Context, client *ent.Client) (tags []*ent.Tag, err error)

func ReadPage

func ReadPage(ctx context.Context, client *ent.Client, q QueryParams) (tags []*ent.Tag, err error)

func Write

func Write(ctx context.Context, client *ent.Client, t *ent.Tag) error

Types

type QueryParams

type QueryParams struct {
	FavoriteOnly bool
	Search       string
	Page         int
	ItemPerPage  int
}

Jump to

Keyboard shortcuts

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