taxonomy

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGETCategory added in v0.0.18

func APIGETCategory(c *gin.Context)

func APIGETCategoryByTermTaxonomyID added in v0.0.18

func APIGETCategoryByTermTaxonomyID(c *gin.Context)

APIGETCategoryByTermTaxonomyID @since 0.0.17

func APIGETTaxonomy added in v0.0.18

func APIGETTaxonomy(c *gin.Context)

APIGETTaxonomy 根据类型查询所有分类 @since 0.0.12 @since 0.0.17 换标准方法名称

func APIPOSTTaxonomy added in v0.0.18

func APIPOSTTaxonomy(c *gin.Context)

APIPOSTTaxonomy 添加分类 @since 0.0.17

func APIPUTTaxonomy added in v0.0.18

func APIPUTTaxonomy(c *gin.Context)

func GETCategory added in v0.0.18

func GETCategory(req *GETCategoryReq) (*[]model.Category, error)

func GETCategoryByTermTaxonomyID added in v0.0.18

func GETCategoryByTermTaxonomyID(req *GETCategoryByTermTaxonomyIDReq) (*model.Category, error)

func GetTaxonomy

func GetTaxonomy(taxonomy string, parent uint64) (*[]model.Taxonomy, error)

func GetTaxonomyIDs

func GetTaxonomyIDs(taxonomy string) ([]uint64, error)

func POSTTaxonomy added in v0.0.18

func POSTTaxonomy(name string, taxonomy string, description string, parent uint64, order int) error

func POSTTermTaxonomy added in v0.0.18

func POSTTermTaxonomy(tx *sqlx.Tx, termID uint64, taxonomy string, description string, parent uint64, count int, order int) (sql.Result, error)

func POSTTerms added in v0.0.18

func POSTTerms(tx *sqlx.Tx, name string, slug string, termGroup int) (sql.Result, error)

func PUTTaxonomy added in v0.0.18

func PUTTaxonomy(req *PUTTaxonomyReq) (sql.Result, error)

func Register

func Register()

Types

type APIGetTaxonomyForm

type APIGetTaxonomyForm struct {
	Taxonomy string `form:"taxonomy" json:"taxonomy" binding:"required"`
	Parent   uint64 `form:"parent" json:"parent"`
}

type APIPOSTTaxonomyForm added in v0.0.18

type APIPOSTTaxonomyForm struct {
	Name        string `json:"name" binding:"required"`
	Taxonomy    string `json:"taxonomy" binding:"required"`
	Description string `json:"description"`
	Parent      uint64 `json:"parent"`
	Order       int    `json:"order"`
}

type GETCategoryByTermTaxonomyIDReq added in v0.0.18

type GETCategoryByTermTaxonomyIDReq struct {
	TermTaxonomyID uint64 `form:"term_taxonomy_id" json:"term_taxonomy_id" binding:"required"`
}

type GETCategoryReq added in v0.0.18

type GETCategoryReq struct {
	Taxonomy string `form:"taxonomy"`
}

type PUTTaxonomyReq added in v0.0.18

type PUTTaxonomyReq struct {
	APIPOSTTaxonomyForm
	TermTaxonomyID uint64 `json:"term_taxonomy_id" binding:"required"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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