extension

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapResults

func MapResults(exts []Extension) map[string]map[string]*Result

MapResults ...

Types

type App

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

App represents the executable for the extension.

func New

func New(name, source string) *App

New creates new instance of App based on the provided parameters.

func (*App) Install

func (a *App) Install(ctx context.Context) error

Install installs the App.

func (*App) Run

func (a *App) Run(ctx context.Context, args ...string) ([]byte, error)

Run executes the App.

type Extension

type Extension interface {
	Name() string
	Version() string
	Result() *Result
}

Extension provides ability to extend Tagify workflow, to be able to incorporate more functionality into the Tagify and build such things like deeper more opinionated Tagify primitives e.g. YouTube extension to get more data out of the YouTube videos and etc (see testImgCrawlerExt inside the processor/html/extension_test.go).

type Result

type Result struct {
	Name    string                 `json:"name"`
	Version string                 `json:"version"`
	Err     error                  `json:"error,omitempty"`
	Data    map[string]interface{} `json:"data,omitempty"`
}

ExtResult ...

func NewResult

func NewResult(ext Extension, data map[string]interface{}, err error) *Result

NewResult ...

Jump to

Keyboard shortcuts

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