file

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 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) (*http.Response, error)
}

type DefaultClient

type DefaultClient struct{}

func (DefaultClient) Get

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

func (DefaultClient) Hosts

func (DefaultClient) Hosts() []string

type Downloader

type Downloader struct {
	Root string
	// contains filtered or unexported fields
}

func NewDownloader

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

func (*Downloader) Open

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

func (*Downloader) Register

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

type WeiboClient

type WeiboClient struct{}

func (WeiboClient) Get

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

func (WeiboClient) Hosts

func (WeiboClient) Hosts() []string

Jump to

Keyboard shortcuts

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