govatar: github.com/o1egl/govatar Index | Files | Directories

package govatar

import "github.com/o1egl/govatar"

Index

Package Files

govatar.go utils.go

Variables

var ErrUnsupportedGender = errors.New("unsupported gender")

func Generate Uses

func Generate(gender Gender) (image.Image, error)

Generate generates random avatar

func GenerateFile Uses

func GenerateFile(gender Gender, filePath string) error

GenerateFile generates random avatar and save it to specified file. Image format depends on file extension (jpeg, jpg, png, gif). Default is png

func GenerateFileForUsername Uses

func GenerateFileForUsername(gender Gender, username string, filePath string) error

GenerateFileForUsername generates avatar for username and save it to specified file. Image format depends on file extension (jpeg, jpg, png, gif). Default is png

func GenerateForUsername Uses

func GenerateForUsername(gender Gender, username string) (image.Image, error)

GenerateForUsername generates avatar for username

type Gender Uses

type Gender int

Gender represents gender type

const (
    MALE Gender = iota
    FEMALE
)

Male and female constants

Directories

PathSynopsis
bindata
govatar

Package govatar imports 16 packages (graph) and is imported by 2 packages. Updated 2020-03-06. Refresh now. Tools for package owners.