categories

package
v1.22.11 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CategorySeparator = ":"

CategorySeparator is the string that divdes category components

Variables

This section is empty.

Functions

func CanonicalizeCategory added in v1.20.4

func CanonicalizeCategory(category string) string

func IsValidCategory added in v1.20.4

func IsValidCategory(category string) bool

Check if string is a valid category. Must have at least two components, each a non-empty string.

func NewAPI

func NewAPI(mdb *mongo.Database, top *apis.APIs) apis.Categories

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

func SlugifyCategory added in v1.20.4

func SlugifyCategory(category string) string

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

func SlugifyToken

func SlugifyToken(s string) string

SlugifyToken converts a category or category to a slug

Types

This section is empty.

Jump to

Keyboard shortcuts

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