extractor

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(rawURIs []string, options ...Option) ([]*api.Artifact, error)

Extract returns an []*api.Artifact for the given rawURIs.

func Register

func Register(scheme string, e Extractor)

Register the Extractor e for the given scheme

func Schemes

func Schemes() []string

Schemes returns the list of registered schemes.

Types

type Extractor

type Extractor func(*uri.URI, ...Option) ([]*api.Artifact, error)

Extractor extract an api.Artifact referenced by the given uri.URI.

type Option

type Option func(interface{}) error

Option is a functional option for extractors.

type Options

type Options []Option

Options is a slice of Option.

func (Options) Apply

func (o Options) Apply(opts interface{}) error

Apply interates over Options and calls each functional option with a given opts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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