package
1.8.0
Repository: https://github.com/jolheiser/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.
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.
EncodeSha256 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.
NaturalSortLess compares two strings so that they could be sorted in natural order.
SetupGiteaRoot Sets GITEA_ROOT if it is not already set and returns the value.
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.
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.
DefaultAvatarSize is a sentinel value for the default avatar size, as determined by the avatar-hosting service.
Storage space size types.
Storage space size types.
Storage space size types.
Storage space size types.
Storage space size types.
Storage space size types.
TimeLimitCodeLength default value for time limit code.

# Type aliases

No description provided by the author