category

package
v0.0.0-...-0d658de Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name        string `json:"name,omitempty" redis:"name,omitempty"`
	Description string `json:"description,omitempty" redis:"description,omitempty"`
	Code        string `json:"code,omitempty" redis:"code,omitempty"`
	redisdb.DataInfo
}

func Repository

func Repository() *Category

func (*Category) Delete

func (c *Category) Delete(code string) (err error)

func (*Category) Exists

func (c *Category) Exists(code string, ignoreStatus bool) (bool, error)

func (*Category) GenerateCode

func (c *Category) GenerateCode() string

func (*Category) Get

func (c *Category) Get(code string) (category *Category, err error)

func (*Category) GetDataInfo

func (c *Category) GetDataInfo(code string) (dataInfo *redisdb.DataInfo, err error)

func (*Category) GetKeys

func (c *Category) GetKeys() (codes []string, err error)

func (*Category) GetList

func (c *Category) GetList() (categories []Category, err error)

func (*Category) Restore

func (c *Category) Restore(code string) (err error)

func (*Category) Save

func (c *Category) Save(category *Category) (err error)

func (*Category) Update

func (c *Category) Update(category *Category) (err error)

Jump to

Keyboard shortcuts

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