types

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

package types contains all json structs used by the proxy server for input and output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericResponse

type GenericResponse struct {
	Code int32  `json:"code"` // TODO: rethink this (0 = success)
	Data []byte `json:"data"` // TODO: make sure this is hex encoded
	Log  string `json:"log"`
}

GenericResponse is returned for 4xx and 5xx errors And the following 2xx results: BroadcastResult

type PostTxRequest

type PostTxRequest struct {
	Name       string          `json:"name" validate:"required,min=4"`
	Passphrase string          `json:"passphrase" validate:"required,min=10"`
	Data       json.RawMessage `json:"data" validate:"required"` // this is handled by SignableReader
}

PostTxRequest is sent to sign and post a new transaction

type QueryResponse

type QueryResponse struct {
	Height uint64          `json:"height"`
	Key    data.Bytes      `json:"key"`    // TODO: make sure this is hex encoded
	Value  json.RawMessage `json:"value"`  // this is from ValueReader
	Proven bool            `json:"proven"` // only true if we verified all headers
}

QueryResponse is returned on success (GenericResponse on failure) Also returned for proofs, with Proven = true

Jump to

Keyboard shortcuts

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