Documentation ¶
Overview ¶
Package tags are categories and platform metadata used to classify the served files.
Index ¶
- Variables
- func Description(tag string) (string, error)
- func Humanize(platform, section Tag) string
- func Humanizes(platform, section Tag) string
- func InvalidExec(exec boil.ContextExecutor) bool
- func IsCategory(name string) bool
- func IsPlatform(name string) bool
- func IsTag(name string) bool
- func IsText(name string) bool
- func NameByURI(slug string) string
- func OSTags() [5]string
- func Platform(platform, tag string) (string, error)
- type Info
- type Name
- type Sum
- type T
- type Tag
- type TagData
- type URIS
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPlatform = errors.New("invalid platform") ErrTag = errors.New("invalid tag") )
View Source
var ( ErrDB = errors.New("database value is nil") ErrT = errors.New("lockable tags t is nil") )
Functions ¶
func Description ¶
Description returns the short description of the tag.
func Humanizes ¶
Humanizes returns the human readable name plurals of the platform and section tags combined.
func InvalidExec ¶ added in v0.14.0
func InvalidExec(exec boil.ContextExecutor) bool
InvalidExec returns true if the database context executor is invalid such as nil.
func IsCategory ¶
IsCategory returns true if the named tag is a category.
func IsPlatform ¶
IsPlatform returns true if the named tag is a platform.
Types ¶
type T ¶
T is a lockable collection of tags, to stop potential race conditions when writing to the map containing the tagdata list.
type Tag ¶
type Tag int
Tag is the unique ID.
const ( // FirstCategory is the first tag marked as a category. FirstCategory Tag = Announcement // FirstPlatform is the first tag marked as a platform. FirstPlatform Tag = ANSI // LastCategory is the final tag marked as a category. LastCategory Tag = Install // LastPlatform is the final tag marked as a platform. LastPlatform Tag = Windows // CategoryCount is the number of tags used as a category. CategoryCount = int(FirstCategory + LastCategory + 1) // PlatformCount is the number of tags used as a platform. PlatformCount = int(LastPlatform - FirstPlatform + 1) )
type TagData ¶
type TagData struct { URI string // URI is a unique URL slug for the tag. Name string // Name is the tags displayed title. Info string // Info is a short description of the tag. Count int // Count is the results of file count query for the tag. }
TagData holds the tag information.
Click to show internal directories.
Click to hide internal directories.