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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址