Package maya (v1.41.5) [up] [repository]

api.go

cli.go

dash.go

dash_segments.go

downloader.go

drm.go

hls.go

orchestrator.go

Index

Functions

func DownloadDash(streamId string, manifestData *Manifest, optionsData *Options) error
func DownloadHls(streamId string, manifestData *Manifest, optionsData *Options) error
func Get(targetUrl *url.URL, headers map[string]string) (*http.Response, error)

Get performs an HTTP GET request and logs it

Head performs an HTTP HEAD request and logs it

func Post(targetUrl *url.URL, headers map[string]string, body []byte) (*http.Response, error)

Post performs an HTTP POST request and logs it

func SetProxy(proxiesCsv string) error

SetProxy overrides the global http.DefaultTransport with the proxy routing logic

Types

type Cache

type Cache string

Methods

func (c Cache) Decode(values ...CacheValue) error
func (c Cache) Encode(values ...CacheValue) error
func (c *Cache) Setup() error

type CacheValue

type CacheValue interface {
	CachePath() string
}

type DrmSystem

type DrmSystem int

Constants

const (
	DrmNone DrmSystem = iota
	DrmPlayReady
	DrmWidevine
)

type Flag

type Flag struct {
	Name  string
	Usage string
	Value FlagValue
	Needs string
	// contains filtered or unexported fields
}

type FlagBool

type FlagBool bool

Methods

func (b FlagBool) Default() string
func (FlagBool) Example() string
func (b *FlagBool) Parse(value string) error
func (FlagBool) Type() string

type FlagInt

type FlagInt int

Methods

func (i FlagInt) Default() string
func (FlagInt) Example() string
func (i *FlagInt) Parse(value string) error
func (FlagInt) Type() string

type FlagSet

type FlagSet []*Flag

Methods

func (set FlagSet) IsSet(value FlagValue) bool
func (set FlagSet) Parse(args []string) error
func (set FlagSet) Usage(w io.Writer, name string) error

type FlagString

type FlagString string

Methods

func (s FlagString) Default() string
func (FlagString) Example() string
func (s *FlagString) Parse(value string) error
func (FlagString) Type() string

type FlagValue

type FlagValue interface {
	Parse(string) error
	Type() string
	Default() string
	Example() string
}

type Manifest

type Manifest struct {
	Url  *url.URL
	Body []byte
}

Functions

func ListDash(baseUrl *url.URL) (*Manifest, error)
func ListHls(baseUrl *url.URL) (*Manifest, error)

Methods

func (*Manifest) CachePath() string

type Options

type Options struct {
	Threads int
	Drm     DrmSystem
	Device  string
	License func([]byte) ([]byte, error)
}