pipeline

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidActionType          = errors.Business("invalid action type [%s/%s]", "DP:002")
	ErrSourceIsEmpty              = errors.Business("source is empty", "DP:003")
	ErrSourceListIsEmpty          = errors.Business("source list is empty", "DP:004")
	ErrActionSourceIsNotAvailable = errors.Business("action source (%s) is not available [%s/%s]", "DP:005")
)
View Source
var ErrMissingAction = errors.Business("missing action value", "DP:001")

Functions

This section is empty.

Types

type Action

type Action string
const (
	YoutubeDownload   Action = "youtube-download"
	VideoCut          Action = "video-cut"
	VideoExtractAudio Action = "video-extract-audio"
	VideoMerge        Action = "video-merge"
	AudioNormalize    Action = "audio-normalize"
	AudioDefineTags   Action = "audio-define-tags"
	CoverGenerate     Action = "cover-generate"
)

type ActionDefinition

type ActionDefinition struct {
	ID      string            `yml:"id"`
	Type    Action            `yml:"type"`
	Params  collection.Params `yml:"params"`
	Source  ActionSource      `yml:"source"`
	Sources []ActionSource    `yml:"sources"`
}

type ActionSource

type ActionSource struct {
	Source
	Action string `yml:"action"`
}

func (*ActionSource) UnmarshalYAML

func (e *ActionSource) UnmarshalYAML(unmarshal func(interface{}) error) error

type Pipeline

type Pipeline struct {
	Name    string                       `yaml:"name"`
	Data    collection.Params            `yaml:"data"`
	Values  map[string]collection.Params `yaml:"values"`
	Actions []ActionDefinition           `yaml:"actions"`
	// contains filtered or unexported fields
}

func Parse added in v0.8.0

func Parse(input []byte) (Pipeline, error)

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context, cfg config.AppConfig) (map[string]files.Output, error)

type Source

type Source struct {
	Value string
}

Jump to

Keyboard shortcuts

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