keys

package
v0.12.2-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewKeyRequestHandler

func AddNewKeyRequestHandler(indent bool) http.HandlerFunc

AddNewKeyRequestHandler performs create or recover new keys operation

func DeleteKeyRequestHandler

func DeleteKeyRequestHandler(w http.ResponseWriter, r *http.Request)

delete key REST handler

func GetKeyRequestHandler

func GetKeyRequestHandler(indent bool) http.HandlerFunc

get key REST handler

func MarshalJSON

func MarshalJSON(o interface{}) ([]byte, error)

marshal keys

func QueryKeysRequestHandler

func QueryKeysRequestHandler(indent bool) http.HandlerFunc

query key list REST handler

func RecoverRequestHandler added in v0.7.0

func RecoverRequestHandler(indent bool) http.HandlerFunc

RecoverRequestHandler performs key recover request

func RegisterRoutes

func RegisterRoutes(r *mux.Router, indent bool)

resgister REST routes

func SeedRequestHandler added in v0.7.0

func SeedRequestHandler(indent bool) http.HandlerFunc

Seed REST request handler

func UnmarshalJSON

func UnmarshalJSON(bz []byte, ptr interface{}) error

unmarshal json

func UpdateKeyRequestHandler

func UpdateKeyRequestHandler(w http.ResponseWriter, r *http.Request)

update key REST handler

Types

type DeleteKeyBody

type DeleteKeyBody struct {
	Password string `json:"password"`
}

delete key request REST body

type NewKeyBody

type NewKeyBody struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	Seed     string `json:"seed"`
}

NewKeyBody - the request body for create or recover new keys

type RecoverKeyBody added in v0.7.0

type RecoverKeyBody struct {
	Password string `json:"password"`
	Seed     string `json:"seed"`
}

RecoverKeyBody is recover key request REST body

type UpdateKeyBody

type UpdateKeyBody struct {
	NewPassword string `json:"new_password"`
	OldPassword string `json:"old_password"`
}

update key request REST body

Jump to

Keyboard shortcuts

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