extractor

package
v0.0.0-...-ac0742e Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Copyright 2019-2020 vChain, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(rawURI string, options ...Option) (*object.Object, error)

Extract returns an object.Object for the given rawURI.

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.

func SetFallbackScheme

func SetFallbackScheme(scheme string)

Types

type Extractor

type Extractor func(uri.URI, ...Option) (*object.Object, error)

Extractor extract an object.Object 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