cache

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(t Transcoder, dir, tempdir string) (*Cache, error)

func (*Cache) Base

func (c *Cache) Base(id string) string

func (*Cache) Get

func (c *Cache) Get(id string) *Cached

func (*Cache) Set

func (c *Cache) Set(e *Entry) error

func (*Cache) SetProgress

func (c *Cache) SetProgress(e *Entry, progress func(written, total int64)) error

type Cached

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

func (*Cached) ID

func (c *Cached) ID() string

func (*Cached) Path

func (c *Cached) Path() string

type Entry

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

func NewEntry

func NewEntry(id, ext string, url *url.URL) *Entry

func (*Entry) Ext

func (e *Entry) Ext() string

func (*Entry) ID

func (e *Entry) ID() string

func (*Entry) URL

func (e *Entry) URL() *url.URL

type Transcoder

type Transcoder interface {
	Transcode(video io.Reader, audio io.Writer) error
	Ext() string
}

Jump to

Keyboard shortcuts

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