file

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: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNil defines an error sent when an unexpected value is nil
	ErrNil = errors.New("value is nil")
)

Functions

func Exists

func Exists(name string) bool

Exists checks if file exists on filesystem

func ToUNC

func ToUNC(path string) string

ToUNC converts windows path to UNC path

Types

type MkdirAll

type MkdirAll func(string, os.FileMode) error

MkdirAll is a type declaration for the os.MkdirAll function

type SrtEncoder

type SrtEncoder struct{}

SrtEncoder builds an srt file from provided clip captions

func (*SrtEncoder) Encode

func (s *SrtEncoder) Encode(captions []decryptor.Caption) io.Reader

Encode converts clip captions into an srt file

func (*SrtEncoder) Extension

func (s *SrtEncoder) Extension() decryptor.Extension

Extension returns the srt's file extension

type Storage

type Storage struct {
	Path      string
	MkdirAll  MkdirAll
	WriteFile WriteFile
}

Storage implements the video clip storage interface which stores clips to the filesystem

func (*Storage) Save

func (s *Storage) Save(c decryptor.Clip, r io.Reader, ext decryptor.Extension) (string, error)

Save stores the decrypted video clip to the filesystem

type WriteFile

type WriteFile func(string, []byte, os.FileMode) error

WriteFile is a type declaration for the ioutil.WriteFile function

Jump to

Keyboard shortcuts

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