source

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Overview

Keeps a cache of all the source image thumbnails.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source handles the source images that may be used by fiddles.

func New

func New(dir string) (*Source, error)

New create a new Source.

func (*Source) List

func (s *Source) List() []int

List returns the list of source image ids.

func (*Source) ListAsJSON

func (s *Source) ListAsJSON() string

ListAsJSON return s.List() serialized as JSON.

func (*Source) Thumbnail

func (s *Source) Thumbnail(i int) ([]byte, bool)

Thumbnail returns the serialized PNG thumbnail for the given source id.

Jump to

Keyboard shortcuts

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