types

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateKeyRequest

type CreateKeyRequest struct {
	Name       string `json:"name" validate:"required,min=4,printascii"`
	Passphrase string `json:"passphrase" validate:"required,min=10"`
	Algo       string `json:"algo"`
}

CreateKeyRequest is sent to create a new key

type CreateKeyResponse added in v0.2.1

type CreateKeyResponse struct {
	Key  keys.Info `json:"key"`
	Seed string    `json:"seed_phrase"`
}

type DeleteKeyRequest

type DeleteKeyRequest struct {
	Name       string `json:"name" validate:"required,min=4,printascii"`
	Passphrase string `json:"passphrase" validate:"required,min=10"`
}

DeleteKeyRequest to destroy a key permanently (careful!)

type ErrorResponse

type ErrorResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"` // error message if Success is false
	Code    int    `json:"code"`  // error code if Success is false
}

ErrorResponse is returned for 4xx and 5xx errors

type UpdateKeyRequest

type UpdateKeyRequest struct {
	Name    string `json:"name" validate:"required,min=4,printascii"`
	OldPass string `json:"passphrase"  validate:"required,min=10"`
	NewPass string `json:"new_passphrase" validate:"required,min=10"`
}

UpdateKeyRequest is sent to update the passphrase for an existing key

Jump to

Keyboard shortcuts

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