package
0.0.0-20240513174111-a311b3bdd62a
Repository: https://github.com/aptrust/registry.git
Documentation: pkg.go.dev
# Functions
BadgeClass returns the css class for the specified string, where string is a work item status or other value defined in Constants.
No description provided by the author
DateISO returns a date in format "2006-01-02".
DateTimeISO returns a date in format "2006-01-02T15:04:05Z".
DateUS returns a date in format "Jan 2, 2006 15:04:05".
DateUS returns a date in format "Jan 2, 2006".
DefaultString returns value if it's non-empty.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Dict returns an interface map suitable for passing into sub templates.
EscapeAttr escapes an HTML attribute value.
EscapeHTML returns an escaped HTML string.
FormatFloat formats a floating point number to have scale digits after the decimal point.
FormatInt formats an integer value to include commas.
FormatInt64 formats a 64-bit integer value to include commas.
No description provided by the author
HumanSize returns a number of bytes in a human-readable format.
IconFor returns a FontAwesome icon for the specified string, as defined in helpers.IconMap.
LinkifyUrls converts urls in text to clickable links.
RoleName transforms ugly DB role names into more readable ones.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SortIcon returns the name of the sort icon to display at the top of a table column.
SortUrl returns the url to sort results by the specified column.
StrEq compares the string representation of two values and returns true if they are equal.
ToJSON converts an interface to JSON.
Truncate truncates the value to the given length, appending an ellipses to the end.
TruncateStart trims str to maxLen by removing them from the middle of the string.
TruncateStart trims str to maxLen by removing them from the start of the string.
UnixToISO converts a Unix timestamp to ISO format.
UserCan returns true if the user has the specified permission.
YesNo returns "Yes" if value is true, "No" if value is false.
# Variables
BadgeClassMap maps work item status and other constant values to css badge classes.
IconMap maps strings to Material icons.
IconMissing is the icon we show for items that are not in the IconMap.
# Structs
No description provided by the author
# Interfaces
CookieSetter defines the methods used by gin.Context to set cookies.
# Type aliases
ByLen implements sorting by length.