recordstore

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package recordstore contains utilities to store/retrieve recordings to/from disk.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSegmentsFound = errors.New("no recording segments found")

ErrNoSegmentsFound is returned when no recording segments have been found.

Functions

func CommonPath

func CommonPath(v string) string

CommonPath returns the common path between all segments with given recording path.

func FindAllPathsWithSegments

func FindAllPathsWithSegments(pathConfs map[string]*conf.Path) []string

FindAllPathsWithSegments returns all paths that do have segments.

func PathAddExtension

func PathAddExtension(path string, format conf.RecordFormat) string

PathAddExtension adds the file extension to the path.

Types

type Path

type Path struct {
	Start time.Time
	Path  string
}

Path is a path of a recording segment.

func (*Path) Decode

func (p *Path) Decode(format string, v string) bool

Decode decodes a Path.

func (Path) Encode

func (p Path) Encode(format string) string

Encode encodes a path.

type Segment

type Segment struct {
	Fpath string
	Start time.Time
}

Segment is a recording segment.

func FindSegments

func FindSegments(
	pathConf *conf.Path,
	pathName string,
) ([]*Segment, error)

FindSegments returns all segments of a path.

func FindSegmentsInTimespan

func FindSegmentsInTimespan(
	pathConf *conf.Path,
	pathName string,
	start time.Time,
	duration time.Duration,
) ([]*Segment, error)

FindSegmentsInTimespan returns all segments in a certain timestamp.

Jump to

Keyboard shortcuts

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