storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

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

Dir is directory item.

func (*Dir) Type

func (i *Dir) Type() ItemType

type Item

type Item interface {
	Type() ItemType
}

Item interface for a file or dir item on storage.

type ItemType

type ItemType int
const (
	ItemTypeDir ItemType = iota
	ItemTypeVideo
)

type StorageService

type StorageService interface {
	MountTo(mux *http.ServeMux)

	Browse(parentId string) (items []Item)
}

StorageService defines a interface which should be impled by storage service. It will be used by ContentDirectory service to browse files.

type VideoFile

type VideoFile struct {

	// File size
	Size int64
	// Media length in seconds
	Duration float64

	// Audio channels
	AudioChannels int
	// Audio sample rate
	AudioSampleRate int

	// Video resolution
	VideoResolution string

	// URL to play
	PlayURL string
	// contains filtered or unexported fields
}

Video file is video file item.

func (*VideoFile) Type

func (i *VideoFile) Type() ItemType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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