http

package
v0.3.0-prep Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEndpointDeprecated = errors.New("Your fluxd version is deprecated - please upgrade, see https://github.com/weaveworks/flux/releases")
)
View Source
var ErrorDeprecated = &flux.BaseError{
	Help: `The API endpoint requested appears to have been deprecated.

This indicates your client (fluxctl) needs to be updated: please see

    https://github.com/weaveworks/flux/releases

If you still have this problem after upgrading, please file an issue at

    https://github.com/weaveworks/flux/issues

mentioning what you were attempting to do, and the output of

    fluxctl status
`,
	Err: errors.New("API endpoint deprecated"),
}
View Source
var ErrorUnauthorized = &flux.BaseError{
	Help: `The request failed authentication

This most likely means you have a missing or incorrect token. Please
make sure you supply a service token, either by setting the
environment variable FLUX_SERVICE_TOKEN, or using the argument --token
with fluxctl.

`,
	Err: errors.New("request failed authentication"),
}

Functions

func MakeAPINotFound

func MakeAPINotFound(path string) *flux.BaseError

func MakeURL

func MakeURL(endpoint string, router *mux.Router, routeName string, urlParams ...string) (*url.URL, error)

func NewRouter

func NewRouter() *mux.Router

func WriteError

func WriteError(w http.ResponseWriter, r *http.Request, code int, err error)

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon handles communication from the daemon to the service

func NewDaemon

func NewDaemon(client *http.Client, ua string, t flux.Token, router *mux.Router, endpoint string, p platform.Platform, logger log.Logger) (*Daemon, error)

func (*Daemon) Close

func (a *Daemon) Close() error

Close closes the connection to the service

type PostReleaseResponse

type PostReleaseResponse struct {
	Status    string     `json:"status"`
	ReleaseID jobs.JobID `json:"release_id"`
}

type SortAccept

type SortAccept struct {
	// contains filtered or unexported fields
}

func (SortAccept) Len

func (s SortAccept) Len() int

func (SortAccept) Less

func (s SortAccept) Less(i, j int) bool

We want to sort by descending order of suitability: higher quality to lower quality, and preferred to less preferred.

func (SortAccept) Swap

func (s SortAccept) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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