origin

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultOrigin added in v0.1.5

type DefaultOrigin struct {
	Host string
	URL  url.URL
}

DefaultOrigin struct holds Origin and Path of DefaultOrigin Variant level DefaultOrigins will be base64 encoded absolute Urls

func NewDefaultOrigin added in v0.1.5

func NewDefaultOrigin(host string, p string) (*DefaultOrigin, error)

NewDefaultOrigin returns a new Origin struct host is not required if path is absolute

func (*DefaultOrigin) FetchManifest added in v0.1.5

func (d *DefaultOrigin) FetchManifest(c config.Client) (ManifestInfo, error)

FetchManifest will grab DefaultOrigin contents of configured origin

func (*DefaultOrigin) GetPlaybackURL added in v0.1.5

func (d *DefaultOrigin) GetPlaybackURL() string

GetPlaybackURL will retrieve url

type ManifestInfo added in v0.1.5

type ManifestInfo struct {
	Manifest     string
	LastModified time.Time
	Status       int
}

ManifestInfo holds http response info from manifest request

type Origin

type Origin interface {
	GetPlaybackURL() string
	FetchManifest(c config.Client) (ManifestInfo, error)
}

Origin interface is implemented by DefaultOrigin and Propeller struct

func Configure

func Configure(ctx context.Context, c config.Config, path string) (Origin, error)

Configure will return proper Origin interface

type Propeller

type Propeller struct {
	URL string
}

Propeller Origin holds the URL of a propeller entity (Channel, Clip)

func NewPropeller

func NewPropeller(ctx context.Context, c config.Config, getter urlGetter) (*Propeller, error)

NewPropeller returns a Propeller origin struct

func (*Propeller) FetchManifest

func (p *Propeller) FetchManifest(c config.Client) (ManifestInfo, error)

FetchManifest will grab manifest contents of configured origin

func (*Propeller) GetPlaybackURL

func (p *Propeller) GetPlaybackURL() string

GetPlaybackURL will retrieve url

Jump to

Keyboard shortcuts

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