resource

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChapterResource

type ChapterResource interface {
	Resourcer
	Chapters() []Resourcer
}

type Definition

type Definition string

https://www.image-engineering.de/library/technotes/991-separating-sd-hd-full-hd-4k-and-8k

const (
	DefinitionSD     Definition = "sd"
	DefinitionHD     Definition = "hd"
	DefinitionFullHD Definition = "full-hd"
	DefinitionUHD    Definition = "uhd"
	Definition4K     Definition = "4k"
	Definition8K     Definition = "8k"
)

func ConvertDefinition

func ConvertDefinition(s string) (Definition, error)

func MayConvertDefinition

func MayConvertDefinition(s string) Definition

type MP3

type MP3 struct {
	ID          int
	FileName    string
	SavePath    string
	Playable    bool
	DownloadUrl string
	Tag         Tag
	Origin      int
}

func (*MP3) UpdateTag

func (mp3 *MP3) UpdateTag(file string) error

type MP3ChapterResource

type MP3ChapterResource interface {
	Resourcer
	Chapters() []Mp3Resource
}

type Mp3Resource

type Mp3Resource interface {
	Resourcer
	MP3() *MP3
}

func NewMp32

func NewMp32(mp3 *MP3) Mp3Resource

type Resourcer

type Resourcer interface {
	Title() string
	Reader() (int64, io.ReadCloser, error)
}

func NewChapter

func NewChapter(title string, chapterList []Resourcer) Resourcer

func NewM3U8

func NewM3U8(concurrency int, title string, url string) (Resourcer, error)

func NewMP3Chapter

func NewMP3Chapter(title string, chapterList []Mp3Resource) Resourcer

func NewMp3

func NewMp3(mp3 *MP3) Resourcer

func NewURL

func NewURL(title string, url string) Resourcer

func NewURLCombineResource

func NewURLCombineResource(title string, urls []string) Resourcer

func NewURLCombineWithOption

func NewURLCombineWithOption(title string, urls []string, option *URLCombineOption) Resourcer

func NewURLWithSpecification

func NewURLWithSpecification(title string, specifications []*Specification) Resourcer

type Resourcer2

type Resourcer2 interface {
	Title() string
	Reader2() (func() int64, io.ReadCloser, error)
}

type ResourcerAfterTrigger

type ResourcerAfterTrigger interface {
	Trigger(file string) (string, error)
}

type Specification

type Specification struct {
	Size       int64      `json:"size"`
	Definition Definition `json:"definition"`
	URL        string     `json:"url"`
}

type SpecificationList

type SpecificationList []*Specification

func (SpecificationList) GetMax

func (r SpecificationList) GetMax() *Specification

type Tag

type Tag struct {
	Title      string
	Artist     string
	Album      string
	Year       string
	Track      string
	CoverImage string
}

type URLCombineOption

type URLCombineOption struct {
	Callback func(url string, data []byte) []byte
	Sep      []byte
}

Jump to

Keyboard shortcuts

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