var GetKeyCmd = &cobra.Command{ Use: "get-key", Short: "Get a public key certificate from the remote server", RunE: getKeyCmd, }
var ListKeysCmd = &cobra.Command{ Use: "list-keys", Short: "List keys available on the remote server", RunE: listKeysCmd, }
var RegisterCmd = &cobra.Command{ Use: "register", Short: "Generate a certificate for communicating with a server", RunE: registerCmd, }
var RemoteCmd = &cobra.Command{ Use: "remote", Short: "Commands accessing a remote server", }
var SignCmd = &cobra.Command{ Use: "sign", Short: "Sign a package using a remote signing server", RunE: signCmd, }
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, }
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.
type ReaderGetter interface { GetReader() (io.Reader, error) }
type ResponseError struct { Method string URL string Status string StatusCode int BodyText string }
func (e ResponseError) Error() string
func (e ResponseError) Temporary() bool