transport

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CdnTransport *httpTransporter
View Source
var DirectoryTransport *httpTransporter
View Source
var StorageTransport *httpTransporter

Functions

func NewHTTPClient

func NewHTTPClient() *http.Client

func SetupCDNTransporter

func SetupCDNTransporter(cdnUrl string, tel string, password string, userAgent string, proxyServer string)

func SetupDirectoryTransporter

func SetupDirectoryTransporter(Url string, tel string, password string, userAgent string, proxyServer string)

func SetupStorageTransporter added in v1.3.0

func SetupStorageTransporter(Url string, tel string, password string, userAgent string, proxyServer string)

func SetupTransporter

func SetupTransporter(server string,
	tel string,
	password string,
	userAgent string,
	proxyServer string)

Types

type Transporter

type Transporter interface {
	Get(url string) (*response, error)
	Del(url string) (*response, error)
	Put(url string, body []byte, ct string) (*response, error)
	PutWithAuth(url string, body []byte, ct string, auth string) (*response, error)

	PutJSON(url string, body []byte) (*response, error)
	PutBinary(url string, body []byte) (*response, error)
	PutJSONWithAuth(url string, body []byte, auth string) (*response, error)
}
var Transport Transporter

Jump to

Keyboard shortcuts

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