integrador-avater-me

module
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

README

integrador-avatar-me

Esto es el trabajo integrador de conceptos básicos del curso de Golang. El mismo es un módulo que genera un identicon único para cada usuario en base a una información del mismo.

Explicación de su uso

Para su uso debe crearse una estructura tipo Info, la cual contendrá la información de la cual se obtendrá un hash y la dirección donde se guardará la imagen generada. A continuación se encuentra un ejemplo.

package main

import (
	"fmt"

	"github.com/AtilioBoher/integrador-avater-me/avatar"
)

func main() {
	info := avatar.Info{
		StrInfo:  "atilio",
		FilePath: "identicon.png",
	}

	a := avatar.NewAvatarGenerator()
	err := a.GenerateAndSaveAvatar(info)
	if err != nil {
		fmt.Println(err)
	}

}

Directories

Path Synopsis
Package avatar is capable of generating a user icon from a string with information from the user.
Package avatar is capable of generating a user icon from a string with information from the user.
encoder
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.
images
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