http

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package http implements functionality common to HTTP uploading pipelines.

Index

Constants

View Source
const (
	// ModeBinary uploads only compiled binaries
	ModeBinary = "binary"
	// ModeArchive uploads release archives
	ModeArchive = "archive"
)

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(ctx *context.Context, put *config.Put, kind string) error

CheckConfig validates a Put configuration returning a descriptive error when appropriate

func Defaults

func Defaults(puts []config.Put) error

Defaults sets default configuration options on Put structs

func Upload

func Upload(ctx *context.Context, puts []config.Put, kind string, check ResponseChecker) error

Upload does the actual uploading work

Types

type ResponseChecker

type ResponseChecker func(*h.Response) (string, error)

ResponseChecker is a function capable of validating an http server response. It must return the location of the uploaded asset or the error when the response must be considered a failure.

Jump to

Keyboard shortcuts

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