avatar

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package avatar is capable of generating a user icon from a string with information from the user. The information is hashed before is used to generate the icon, so that sensible information can be used without security issues.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GimmeAnAvatarGenerator

func GimmeAnAvatarGenerator() *avatarGenerator

GimmieAnAvatarGenerator returns the pointer to an avatarGenerator. Was replaced by NewAvatarGenerator, but is keept here for backwards compatibilities

func NewAvatarGenerator added in v1.1.0

func NewAvatarGenerator() *avatarGenerator

NewAvatarGenerator returns the pointer to an avatarGenerator.

Types

type Info

type Info struct {
	StrInfo  string
	FilePath string
}

Info contains the information related to the generation of an avatar. StrInfo contains the string that is going to be hashed to ganerate the avatar, and FilePath is the path where the avatar will be stored (the image format must be .png).

Directories

Path Synopsis
Package encoder provides a structure type called encoder, which implements the infoEncoder interface.
Package encoder provides a structure type called encoder, which implements the infoEncoder interface.
Package images provides a structure type called icon, which implements the imageGen interface.
Package images provides a structure type called icon, which implements the imageGen interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL