server

package
v0.0.0-...-ae55713 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

Proxy Server

This package provides all the functionality for a local http server, providing access to key management functionality (creating, listing, updating, and deleting keys). This is a nice building block for larger apps, and the HTTP handlers here can be embedded in a larger server that does nice things like signing transactions and posting them to a tendermint chain (which requires domain-knowledge of the transactions types and out of scope of this generic app).

Key Management

We expose a number of methods for safely managing your keychain. If you are embedding this in a larger server, you will typically want to mount all these paths under /keys.

  • POST / - provide a name and passphrase and create a brand new key
  • GET / - get a list of all available key names, along with their public key and address
  • GET /{name} - get public key and address for this named key
  • PUT /{name} - update the passphrase for the given key. requires you to correctly provide the current passphrase, as well as a new one.
  • DELETE /{name} - permanently delete this private key. requires you to correctly provide the current passphrase

Documentation

Overview

package server provides http handlers to construct a server server for key management, transaction signing, and query validation.

Please read the README and godoc to see how to configure the server for your application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keys

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

func New

func New(manager keys.Manager, algo string) Keys

func (Keys) DeleteKey

func (k Keys) DeleteKey(w http.ResponseWriter, r *http.Request)

func (Keys) GenerateKey

func (k Keys) GenerateKey(w http.ResponseWriter, r *http.Request)

func (Keys) GetKey

func (k Keys) GetKey(w http.ResponseWriter, r *http.Request)

func (Keys) ListKeys

func (k Keys) ListKeys(w http.ResponseWriter, r *http.Request)

func (Keys) Register

func (k Keys) Register(r *mux.Router)

func (Keys) UpdateKey

func (k Keys) UpdateKey(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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