fetcher

package
v0.0.238 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClient

func WithClient(hc *http.Client) func(*opts)

WithClient sets the http.Client the fetcher uses.

Types

type Fetcher

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

Fetcher is able to load file contents from http, https, file, and base64 locations.

func NewFetcher

func NewFetcher(opts ...func(*opts)) *Fetcher

NewFetcher creates a new fetcher instance.

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(source string) (*bytes.Buffer, error)

Fetch fetches the file contents from the source.

Jump to

Keyboard shortcuts

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