categories

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CategorySeparator = ":"

CategorySeparator is the string that divdes category name and value

Variables

This section is empty.

Functions

func NewAPI

func NewAPI(mdb *mongo.Database) apis.Categories

NewAPI creates a new apiImpl object that will use the provided db

func SlugifyCategoryAndValue

func SlugifyCategoryAndValue(catValue string) string

SlugifyCategoryAndValue converts a category+value string into a slug. The category value string should be two tokens separated by the CategorySeparator.

func SlugifyToken

func SlugifyToken(s string) string

SlugifyToken converts a category or category value to a slug

func SplitCategoryValue

func SplitCategoryValue(catValue string) (string, string)

SplitCategoryValue splits a combined catValue string into category and value strings. The combined string must be have a CategorySeparator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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