favicon

package
v0.36.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Favicon

type Favicon string

Favicon is 64x64 sized data uri image send in response to a server list ping. Refer to https://en.wikipedia.org/wiki/Data_URI_scheme for details. Example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAABCAYAAABubagXAAAAEElEQVR42mP8z8BQzzCCAQB+lAGA+H8KEAAAAABJRU5ErkJggg=="

func FromBytes added in v0.27.0

func FromBytes(b []byte) Favicon

FromBytes takes base64 bytes encoding of an image and converts it to Favicon.

func FromFile

func FromFile(filename string) (Favicon, error)

FromFile takes the filename of an image and converts it to Favicon.

func FromImage

func FromImage(img image.Image) (Favicon, error)

FromImage converts an image.Image to Favicon.

func Parse added in v0.31.0

func Parse(s string) (Favicon, error)

Parse takes a data uri string or filename and converts it to Favicon.

func (Favicon) Bytes added in v0.27.0

func (f Favicon) Bytes() []byte

Bytes returns the bytes encoding of the favicon.

func (*Favicon) UnmarshalJSON added in v0.31.0

func (f *Favicon) UnmarshalJSON(bytes []byte) (err error)

UnmarshalJSON implements json.Unmarshaler.

func (*Favicon) UnmarshalYAML added in v0.31.0

func (f *Favicon) UnmarshalYAML(value *yaml.Node) (err error)

UnmarshalYAML implements yaml.Unmarshaler.

Jump to

Keyboard shortcuts

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