getter

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor func(options ...Option) (Getter, error)

type Getter

type Getter interface {
	Get(url string, options ...Option) (*bytes.Buffer, error)
}

func NewHTTPGetter

func NewHTTPGetter(options ...Option) (Getter, error)

type HTTPGetter

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

func (*HTTPGetter) Get

func (g *HTTPGetter) Get(href string, options ...Option) (*bytes.Buffer, error)

type Option

type Option func(*options)

func WithBasicAuth

func WithBasicAuth(username, password string) Option

func WithURL

func WithURL(url string) Option

type Provider

type Provider struct {
	Schemes []string
	New     Constructor
}

func (Provider) Provides

func (p Provider) Provides(scheme string) bool

type Providers

type Providers []Provider

func All

func All(settings *cli.EnvSettings) Providers

func (Providers) ByScheme

func (p Providers) ByScheme(scheme string) (Getter, error)

Jump to

Keyboard shortcuts

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