dataurl

package
v0.0.0-...-3b00c42 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HEADER_LIM = 256

Variables

This section is empty.

Functions

func ToDataUrl

func ToDataUrl(mime Mime, data io.Reader, out io.Writer) error

Types

type MediaStream

type MediaStream struct {
	// stdin or `os.File` reader
	In *bufio.Reader

	// `In` will be pointing to stdin if `Path` is empty
	Path string
}

func NewMediaStream

func NewMediaStream(in io.Reader, path string) MediaStream

func (*MediaStream) DataUrl

func (ms *MediaStream) DataUrl(out io.Writer) error

func (*MediaStream) Mime

func (ms *MediaStream) Mime() (Mime, error)

type Mime

type Mime string

func MimeCustom

func MimeCustom(raw string) Mime

func MimeFromBuf

func MimeFromBuf(buf []byte) Mime

func MimeFromExt

func MimeFromExt(ext string) (Mime, error)

Jump to

Keyboard shortcuts

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