package
1.9.0-dev
Repository: https://github.com/quantonganh/gitea.git
Documentation: pkg.go.dev

# Functions

AvatarLink returns relative avatar link to the site domain by given email, which includes app sub-url as prefix.
BasicAuthDecode decode basic auth string.
BasicAuthEncode encode basic auth string.
CreateTimeLimitCode create a time limit code code format: 12 length date time string + 6 minutes string + 40 sha1 encoded string.
DefaultAvatarLink the default avatar link.
DetectEncoding detect the encoding of content.
EllipsisString returns a truncated short string, it appends '...' in the end of the length of string is too large.
EncodeMD5 encodes string to md5 hex value.
EncodeSha1 string to sha1 hex value.
EntryIcon returns the octicon class for displaying files/directories.
FileSize calculates the file size and generate user-friendly string.
GetRandomBytesAsBase64 generates a random base64 string from n bytes.
HashEmail hashes email address to MD5 string.
Int64sContains returns if a int64 in a slice of int64.
Int64sToMap converts a slice of int64 to a int64 map.
Int64sToStrings converts a slice of int64 to a slice of string.
IsAudioFile detects if data is an video format.
IsImageFile detects if data is an image format.
IsLetter reports whether the rune is a letter (category L).
IsPDFFile detects if data is a pdf format.
IsTextFile returns true if file content format is plain text or empty.
IsVideoFile detects if data is an video format.
MinutesToFriendly returns a user friendly string with number of minutes converted to hours and minutes.
NaturalSortLess compares two strings so that they could be sorted in natural order.
RawTimeSince retrieves i18n key of time since t.
ShortSha is basically just truncating.
SizedAvatarLink returns a sized link to the avatar for the given email address.
StringsToInt64s converts a slice of string to a slice of int64.
Subtract deals with subtraction of all types of number.
TimeSince calculates the time interval and generate user-friendly string.
TimeSincePro calculates the time interval and generate full user-friendly string.
TimeSinceUnix calculates the time interval and generate user-friendly string.
TruncateString returns a truncated string with given limit, it returns input string if length is not reached limit.
VerifyTimeLimitCode verify time limit code.

# Constants

Storage space size types.
Seconds-based time units.
DefaultAvatarSize is a sentinel value for the default avatar size, as determined by the avatar-hosting service.
DocURL api doc url.
Storage space size types.
Storage space size types.
Seconds-based time units.
Storage space size types.
Storage space size types.
Seconds-based time units.
Seconds-based time units.
Storage space size types.
Storage space size types.
TimeLimitCodeLength default value for time limit code.
Seconds-based time units.
Seconds-based time units.

# Type aliases

No description provided by the author