vodmodule

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vodmodule defines types and a Mapper type that provides the ability of mapping media content by a common prefix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clip

type Clip struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

Clip represents a single media file.

type MapOptions

type MapOptions struct {
	Prefix string

	// Optional regexp that is used to filter the list of objects.
	Filter *regexp.Regexp
}

MapOptions represents the set of options that can be passed to Map.

type Mapper

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

Mapper provides the ability of mapping objects on a GCS bucket in the format expected by nginx-vod-module.

func NewMapper

func NewMapper(bucket *storage.BucketHandle) *Mapper

NewMapper returns a mapper that will map content for prefix in the given BucketHandle.

func (*Mapper) Map

func (m *Mapper) Map(ctx context.Context, opts MapOptions) (Mapping, error)

Map returns a Mapping object with the list of objects that match the given prefix. It supports a regular expression that is used to further filter (for example, if the caller only wants to return objects that with the “.mp4“ extension).

type Mapping

type Mapping struct {
	Sequences []Sequence `json:"sequences"`
}

Mapping represents the response expected by the vod-module.

See https://github.com/kaltura/nginx-vod-module#mapping-response-format.

type Sequence

type Sequence struct {
	Clips []Clip `json:"clips"`
}

Sequence represents a list of media clips.

Jump to

Keyboard shortcuts

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