uri

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinURL

func JoinURL(base string, sub string) (string, error)

JoinURL can be used to join a base url (http(s)://domain.com) and a path (/my/path) it will return a joined string or an error (if you supply invalid url)

Types

type FileURIReader

type FileURIReader struct {
}

FileURIReader can read data from file:// URIs

func (*FileURIReader) Read

func (r *FileURIReader) Read(uri string) (io.ReadCloser, error)

type HTTPURIReader

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

HTTPURIReader can read data from http:// and https:// URIs

func (*HTTPURIReader) Read

func (r *HTTPURIReader) Read(uri string) (io.ReadCloser, error)

type Reader

type Reader interface {
	Read(string) (io.ReadCloser, error)
}

Reader reads from a specific URI schema

func NewReader

func NewReader(uri string, timeout time.Duration, clientTransport http.RoundTripper) (Reader, error)

NewReader creates an instance of URIReader that can handle URI schema for the passed uri string

Jump to

Keyboard shortcuts

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