file

package
v0.18.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UserAgent = "" /* 129-byte string literal not displayed */

Variables

View Source
var ErrInvalidURL = errors.New("webhook/file: invalid URL")

Functions

This section is empty.

Types

type Client

type Client interface {
	Hosts() []string
	Get(url string, options ...string) (*http.Response, error)
}

type Downloader

type Downloader struct {
	Root    string
	Options map[string]string
	// contains filtered or unexported fields
}

func NewDownloader

func NewDownloader(root string, client ...Client) *Downloader

func (*Downloader) Download added in v0.18.0

func (d *Downloader) Download(url string) error

func (*Downloader) Open

func (d *Downloader) Open(name string) (http.File, error)

func (*Downloader) Register

func (d *Downloader) Register(client ...Client)

type WithUserAgent added in v0.17.0

type WithUserAgent []string

func (WithUserAgent) Get added in v0.17.0

func (WithUserAgent) Get(url string, options ...string) (*http.Response, error)

func (WithUserAgent) Hosts added in v0.17.0

func (c WithUserAgent) Hosts() []string

Jump to

Keyboard shortcuts

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