remotecmd

package
v7.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetKeyCmd = &cobra.Command{
	Use:   "get-key",
	Short: "Get a public key certificate from the remote server",
	RunE:  getKeyCmd,
}
View Source
var ListKeysCmd = &cobra.Command{
	Use:   "list-keys",
	Short: "List keys available on the remote server",
	RunE:  listKeysCmd,
}
View Source
var RegisterCmd = &cobra.Command{
	Use:   "register",
	Short: "Generate a certificate for communicating with a server",
	RunE:  registerCmd,
}
View Source
var RemoteCmd = &cobra.Command{
	Use:   "remote",
	Short: "Commands accessing a remote server",
}
View Source
var SignCmd = &cobra.Command{
	Use:   "sign",
	Short: "Sign a package using a remote signing server",
	RunE:  signCmd,
}
View Source
var SignPgpCmd = &cobra.Command{
	Use:   "sign-pgp",
	Short: "Create PGP signatures",
	Long:  "This command is vaguely compatible with the gpg command-line and accepts (and mostly, ignores) many of gpg's options. It can thus be used as a drop-in replacement for tools that use gpg to make signatures.",
	RunE:  signPgpCmd,
}

Functions

func CallRemote

func CallRemote(endpoint, method string, query *url.Values, body ReaderGetter) (*http.Response, error)

Make a single API request to a named endpoint, handling directory lookup and failover automatically.

Types

type ReaderGetter

type ReaderGetter interface {
	GetReader() (io.Reader, error)
}

type ResponseError

type ResponseError struct {
	Method     string
	URL        string
	Status     string
	StatusCode int
	BodyText   string
}

func (ResponseError) Error

func (e ResponseError) Error() string

func (ResponseError) Temporary

func (e ResponseError) Temporary() bool

Jump to

Keyboard shortcuts

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