archive

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotator

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

Annotator implementation for RAAR

func NewAnnotator

func NewAnnotator(wapClient annotator.ClientInterface, options *AnnotatorOptions) *Annotator

NewAnnotator gets an Annotator

func (*Annotator) CreateAnnotations

func (a *Annotator) CreateAnnotations(url string) ([]string, error)

CreateAnnotations based on RAAR data and files.

func (*Annotator) FromRecord

func (a *Annotator) FromRecord(uri string, record *models.Broadcast) ([]string, error)

FromRecord ...

func (*Annotator) LoadPeaks

func (a *Annotator) LoadPeaks(uri string, files []*models.AudioFile, filePath string, peakPath string) []string

LoadPeaks ...

func (*Annotator) LoadSegments

func (a *Annotator) LoadSegments(uri string, files []*models.AudioFile, record *models.Broadcast, filePath string, segmentPath string) []string

LoadSegments ...

type AnnotatorOptions

type AnnotatorOptions struct {
	RAARUsername       string
	RAARPassword       string
	RAARDownloadPrefix string

	StorageEndpoint     string
	StorageAccessKey    string
	StorageAccessSecret string
	StorageUseSSL       bool

	PeaksStorageBucket       string
	PeaksStoragePublicURL    string
	PeaksAnnotationContainer string

	SonicAnnotatorTransform           string
	SonicannotatorAnnotationContainer string
}

AnnotatorOptions ...

type AudioFileServiceInterface

type AudioFileServiceInterface interface {
	GetBroadcastsBroadcastIDAudioFiles(
		params *audio_file.GetBroadcastsBroadcastIDAudioFilesParams,
		authInfo runtime.ClientAuthInfoWriter,
	) (*audio_file.GetBroadcastsBroadcastIDAudioFilesOK, error)
}

AudioFileServiceInterface ...

type BroadcastServiceInterface

type BroadcastServiceInterface interface {
	GetBroadcastsYearMonthDay(
		params *broadcast.GetBroadcastsYearMonthDayParams,
		authInfo runtime.ClientAuthInfoWriter,
	) (*broadcast.GetBroadcastsYearMonthDayOK, error)
	GetBroadcastsID(
		params *broadcast.GetBroadcastsIDParams,
		authInfo runtime.ClientAuthInfoWriter,
	) (*broadcast.GetBroadcastsIDOK, error)
}

BroadcastServiceInterface for RAAR API

type Client

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

Client concrete type

func (*Client) GetBroadcasts

func (c *Client) GetBroadcasts(date time.Time) []*models.Broadcast

GetBroadcasts ...

func (*Client) GetFiles

func (c *Client) GetFiles(record *models.Broadcast) []*models.AudioFile

GetFiles ...

func (*Client) GetRecord

func (c *Client) GetRecord(uri string) *models.Broadcast

GetRecord ...

func (*Client) Login

func (c *Client) Login(username string, password string) LoggedInClientInterface

Login ...

type ClientInterface

type ClientInterface interface {
	Login(username string, password string) LoggedInClientInterface
}

ClientInterface for clients

func GetClient

func GetClient() ClientInterface

GetClient returns the acrClient singleton

type File

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

File ...

func NewFile

func NewFile(id string) *File

NewFile ...

func (*File) Download

func (f *File) Download(uri string) error

Download ...

func (*File) HasDownload

func (f *File) HasDownload() bool

HasDownload ...

func (*File) HasPeaks

func (f *File) HasPeaks() bool

HasPeaks tells if we have a peaks.js dat file

func (*File) HasSegments

func (f *File) HasSegments() bool

HasSegments ...

func (*File) Path

func (f *File) Path() string

Path ...

func (*File) PeakPath

func (f *File) PeakPath() string

PeakPath ...

func (*File) SegmentsPath

func (f *File) SegmentsPath() string

SegmentsPath ...

type FileInterface

type FileInterface interface {
	HasDownload() bool
	Download(uri string) error
	Path() string
	HasPeaks() bool
	PeakPath() string
	HasSegments() string
	SegmentsPath() string
}

FileInterface ...

type LoggedInClientInterface

type LoggedInClientInterface interface {
	GetBroadcasts(date time.Time) []*models.Broadcast
	GetRecord(uri string) *models.Broadcast
	GetFiles(record *models.Broadcast) []*models.AudioFile
}

LoggedInClientInterface ...

type Storage

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

Storage ...

func (*Storage) Init

func (s *Storage) Init() StorageInterface

Init ...

func (*Storage) Store

func (s *Storage) Store(url string, filePath string, contentType string) (string, error)

Store ...

type StorageInterface

type StorageInterface interface {
	Init() StorageInterface
	Store(url string, filePath string, contentType string) (string, error)
}

StorageInterface ...

func NewStorage

func NewStorage(endpoint string, accessKey string, accessSecret string, useSSL bool, bucketName string) StorageInterface

NewStorage ...

type UserServiceInterface

type UserServiceInterface interface {
	PostLogin(params *user.PostLoginParams) (*user.PostLoginOK, error)
}

UserServiceInterface ...

Directories

Path Synopsis
raar

Jump to

Keyboard shortcuts

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