avatar

package module
v0.0.0-...-d43e52e Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 10 Imported by: 0

README

avatar

The microservice that's responsible for user avatars.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageFromURL

func ImageFromURL(url string) (img image.Image, data []byte, format string, err error)

ImageFromURL ...

Types

type Avatar

type Avatar struct {
	User   *arn.User
	Image  image.Image
	Data   []byte
	Format string
}

Avatar represents a single image and the name of the format.

func FromURL

func FromURL(url string, user *arn.User) (*Avatar, error)

FromURL downloads and decodes the image from an URL and creates an Avatar.

func (*Avatar) Extension

func (avatar *Avatar) Extension() string

Extension ...

func (*Avatar) String

func (avatar *Avatar) String() string

String returns a text representation of the format, width and height.

type Output

type Output interface {
	SaveAvatar(*Avatar) error
}

Output represents a system that saves an avatar locally (in database or as a file, e.g.)

type Source

type Source interface {
	GetAvatar(*arn.User) (*Avatar, error)
}

Source describes a source where we can find avatar images for a user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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