stages

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWidth  = 1080
	DefaultHeight = 1920
)

Variables

View Source
var (
	ErrFailToCreateFile = apperrors.System(nil, "fail to create file", "STAGES:FAIL_TO_CREATE_FILE")
	ErrFailToWriteFile  = apperrors.System(nil, "fail to write file", "STAGES:FAIL_TO_WRITE_FILE")
	ErrFailToBuildStage = apperrors.System(nil, "fail to build stage", "STAGES:FAIL_TO_BUILD_STAGE")
)
View Source
var (
	ErrEmptyTarget         = apperrors.Business("target cannot be empty", "STAGES:EMPTY_TARGET")
	ErrFailtoCreateDir     = apperrors.System(nil, "fail to create dir", "STAGES:FAIL_TO_CREATE_DIR")
	ErrFailToParseTemplate = apperrors.System(nil, "fail to parse template", "STAGES:FAIL_TO_PARSE_TEMPLATE")
	ErrFailtoBuildFilename = apperrors.System(nil, "fail to build filename", "STAGES:FAIL_TO_BUILD_FILENAME")
)
View Source
var (
	ErrFailToCreateVideo    = apperrors.System(nil, "fail to create video", "STAGES:FAIL_TO_CREATE_VIDEO")
	ErrTargetVideoMustBeMp4 = apperrors.Business("target video must be a mp4 file", "STAGES:TARGET_VIDEO_MUST_BE_MP4")
)

Functions

func BuildVideo

func BuildVideo(ctx context.Context, opt BuildVideoOptions) (string, error)

Types

type BuildStageOptions

type BuildStageOptions struct {
	Footer
	Source   fetcher.Result
	Template filetemplate.Template
}

type BuildVideoOptions

type BuildVideoOptions struct {
	Stage
	Target string
}
type Footer drawer.Footer

type Stage

type Stage struct {
	Width      int
	Height     int
	Full       string
	Background string
	Foreground string
}

func BuildStage

func BuildStage(ctx context.Context, opt BuildStageOptions) (Stage, error)

func (Stage) Files

func (s Stage) Files() []string

func (Stage) RemoveAll

func (s Stage) RemoveAll() error

Jump to

Keyboard shortcuts

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