decryptor

package
v0.0.0-...-1b20fa8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 1 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caption

type Caption struct {
	StartMs uint64
	EndMs   uint64
	Text    string
	Clip    *Clip
}

Caption represents a video clip caption

type CaptionEncoder

type CaptionEncoder interface {
	Encode([]Caption) io.Reader
	Extension() Extension
}

CaptionEncoder defines an interface for encoding captions into different formats

type Clip

type Clip struct {
	Order    int
	Title    string
	ID       string
	Module   *Module
	Captions []Caption
}

Clip represents a video clip

type ClipRepository

type ClipRepository interface {
	GetContent(*Clip) (io.ReadCloser, error)
	Exists(*Clip) (bool, error)
}

ClipRepository defines an interface for fetching video clips

type Course

type Course struct {
	Title   string
	ID      string
	Modules []Module
}

Course represents a video course

type CourseRepository

type CourseRepository interface {
	FindAll() ([]Course, error)
}

CourseRepository defined an interface for fetching courses

type Decoder

type Decoder interface {
	Decode(io.Reader) (io.Reader, error)
	Extension() Extension
}

Decoder defines an interface for decoding reader streams

type Extension

type Extension string

Extension is a type helper for file extensions

type Module

type Module struct {
	Order  int
	Title  string
	ID     string
	Author string
	Clips  []Clip
	Course *Course
}

Module represents a video course module

type OnDecrypted

type OnDecrypted func(Clip, *string)

OnDecrypted defines a callback function called when a video clip is decrypted

type Service

type Service struct {
	Decoder        Decoder
	Storage        Storage
	CaptionEncoder CaptionEncoder
	Courses        CourseRepository
	Clips          ClipRepository
}

Service represents the decryption service which decrypts video courses and stores the courses in a readable format

func (*Service) DecryptAll

func (s *Service) DecryptAll(evt OnDecrypted) error

DecryptAll decrypts all of the video courses contained in the courses repository

type Storage

type Storage interface {
	Save(Clip, io.Reader, Extension) (string, error)
}

Storage defines an interface for storing decrypted video clips

Jump to

Keyboard shortcuts

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