piping_util

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CipherTypeOpenpgp          string = "openpgp"
	CipherTypeAesCtr                  = "aes-ctr"
	CipherTypeOpensslAes128Ctr        = "openssl-aes-128-ctr"
	CipherTypeOpensslAes256Ctr        = "openssl-aes-256-ctr"
)

Variables

This section is empty.

Functions

func DuplexConnect

func DuplexConnect(httpClient *http.Client, headers []KeyValue, uploadUrl, downloadUrl string) (*pipingDuplex, error)

func DuplexConnectWithHandlers

func DuplexConnectWithHandlers(post postHandler, get getHandler) (*pipingDuplex, error)

func HandleDuplex

func HandleDuplex(httpClient *http.Client, duplex io.ReadWriteCloser, headers []KeyValue, uploadUrl string, downloadUrl string, downloadBufSize uint, arriveCh chan<- struct{}, showProgress bool, makeProgressMessage func(progress *io_progress.IOProgress) string) error

NOTE: duplex is usually conn

func PipingGet

func PipingGet(httpClient *http.Client, headers []KeyValue, downloadUrl string) (*http.Response, error)

func PipingGetWithContext

func PipingGetWithContext(ctx context.Context, httpClient *http.Client, headers []KeyValue, downloadUrl string) (*http.Response, error)

func PipingSend

func PipingSend(httpClient *http.Client, headers []KeyValue, uploadUrl string, reader io.Reader) (*http.Response, error)

func PipingSendWithContext

func PipingSendWithContext(ctx context.Context, httpClient *http.Client, headers []KeyValue, uploadUrl string, reader io.Reader) (*http.Response, error)

Types

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

func ParseKeyValueStrings

func ParseKeyValueStrings(strKeyValues []string) ([]KeyValue, error)

Jump to

Keyboard shortcuts

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