origin

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	Origin string
	URL    url.URL
}

Manifest struct holds Origin and Path of Manifest Variant level manifests will be base64 encoded absolute path

func NewManifest

func NewManifest(c config.Config, p string) (*Manifest, error)

NewManifest returns a new Origin struct

func (*Manifest) FetchManifest

func (m *Manifest) FetchManifest(c config.Config) (string, error)

FetchManifest will grab manifest contents of configured origin

func (*Manifest) GetPlaybackURL

func (m *Manifest) GetPlaybackURL() string

GetPlaybackURL will retrieve url

type Origin

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

Origin interface is implemented on Manifest and Propeller struct

func Configure

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

Configure will return proper Origin interface

type Propeller

type Propeller struct {
	URL string
}

Propeller struct holds basic config of a Propeller Channel

func NewPropeller

func NewPropeller(p config.Propeller, orgID string, endpointID string, get fetchURL) (*Propeller, error)

NewPropeller returns a propeller struct

func (*Propeller) FetchManifest

func (p *Propeller) FetchManifest(c config.Config) (string, 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