staticimage

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataTooLarge = errors.New("data image exceeds its byte limit")

Functions

func DecodeDataURL

func DecodeDataURL(value string, limit int64) ([]byte, error)

func Detect

func Detect(data []byte) (string, error)

func DetectContext

func DetectContext(ctx context.Context, data []byte) (string, error)

func ValidateDataURL

func ValidateDataURL(ctx context.Context, value string, limit int64) ([]byte, string, error)

Types

type Error

type Error struct {
	Kind    ErrorKind
	Message string
}

func (*Error) Error

func (err *Error) Error() string

type ErrorKind

type ErrorKind string
const (
	FormatUnsupported ErrorKind = "format_unsupported"
	SVGInvalid        ErrorKind = "svg_invalid"
	SVGActive         ErrorKind = "svg_active"
)

Jump to

Keyboard shortcuts

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