Documentation ¶
Index ¶
- Constants
- func DefaultAvatarLink() string
- func GenerateEmailAvatarFastLink(email string, size int) string
- func GenerateEmailAvatarFinalLink(email string, size int) string
- func GenerateUserAvatarFastLink(userName string, size int) string
- func GenerateUserAvatarImageLink(userAvatar string, size int) string
- func GetEmailForHash(md5Sum string) (string, error)
- func HashEmail(email string) string
- func LibravatarURL(email string) (*url.URL, error)
- type EmailHash
Constants ¶
View Source
const DefaultAvatarPixelSize = 28
DefaultAvatarPixelSize is the default size in pixels of a rendered avatar
Variables ¶
This section is empty.
Functions ¶
func GenerateEmailAvatarFastLink ¶
GenerateEmailAvatarFastLink returns a avatar link (fast, the link may be a delegated one: "/avatar/${hash}")
func GenerateEmailAvatarFinalLink ¶
GenerateEmailAvatarFinalLink returns a avatar final link (maybe slow)
func GenerateUserAvatarFastLink ¶
GenerateUserAvatarFastLink returns a fast link (302) to the user's avatar: "/user/avatar/${User.Name}/${size}"
func GenerateUserAvatarImageLink ¶
GenerateUserAvatarImageLink returns a link for `User.Avatar` image file: "/avatars/${User.Avatar}"
func GetEmailForHash ¶
GetEmailForHash converts a provided md5sum to the email
func HashEmail ¶
HashEmail hashes email address to MD5 string. https://en.gravatar.com/site/implement/hash/
Types ¶
Click to show internal directories.
Click to hide internal directories.