tomago

package
v0.0.0-...-ea1d8b2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 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 ChaincodeRequest

type ChaincodeRequest struct {
	Channel     string   `json:"channel"`
	ChaincodeID string   `json:"chaincode_id"`
	Args        []string `json:"args"`
}

ChaincodeRequest Struct Define

type ChaincodeResponse

type ChaincodeResponse struct {
	Result  string `json:"result"`
	Code    int64  `json:"Code"`
	Message string `json:"Message"`
}

ChaincodeResponse Defines Invoke and Query API Response Struct

type IBlockchainClient

type IBlockchainClient interface {
	Invoke(http.Header, *PayloadWithTags) (*ChaincodeResponse, error)
	Query(http.Header, *PayloadWithTags) (*ChaincodeResponse, error)
	QueryTxn(http.Header, string) (*TransactionResponse, error)
}

Blockchain Interface

type ITomagoClient

type ITomagoClient interface {
	GetBlockchainClient() IBlockchainClient
}

TomagoClient Interface

type PayloadWithTags

type PayloadWithTags struct {
	Payload    *ChaincodeRequest `json:"payload"`
	QueryTags  []string          `json:"queryTags"`
	UpdateTags []string          `json:"updateTags"`
}

PayloadWithTags Defines Invoke and Query API Request Struct

type Timestamp

type Timestamp struct {
	Seconds int64 `json:"seconds"`
	Nanos   int32 `json:"nanos"`
}

Timestamp Struct Defines

type TransactionResponse

type TransactionResponse struct {
	Code          int64     `json:"Code"`
	Message       string    `json:"Message"`
	ChannelID     string    `json:"channel_id"`
	ChaincodeID   string    `json:"chaincode_id"`
	TransactionID string    `json:"transaction_id"`
	Timestamp     Timestamp `json:"timestamp"`
	CreatorID     []byte    `json:"creator_id"`
	PayloadSize   uint64    `json:"payload_size"`
	IsInvalID     bool      `json:"is_invalid"`
	Payload       string    `json:"payload"`
}

TransactionResponse Defines QueryTxn API Response Struct

Jump to

Keyboard shortcuts

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