Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initials ¶
type Initials interface { // Generate will create a new avatar with the given initials and color. Generate(initials, color string) ([]byte, error) ContentType() string }
Initials is able to generate initial avatar.
type PNGInitials ¶
type PNGInitials struct {
// contains filtered or unexported fields
}
PNGInitials create PNG avatars with initials in it.
This implementation is based on the `convert` binary.
func NewPNGInitials ¶
func NewPNGInitials(cmd string) *PNGInitials
NewPNGInitials instantiate a new PNGInitials.
func (*PNGInitials) ContentType ¶
func (a *PNGInitials) ContentType() string
ContentType return the generated avatar content-type.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handle all the interactions with the initials images.
func NewService ¶
NewService instantiate a new Service.
Click to show internal directories.
Click to hide internal directories.