Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func SafeURLSegmentNZ(s string) error
- func URLDataProof(blockNum uint64, dbname, key string, deleted bool) string
- func URLForGetConfig() string
- func URLForGetDBStatus(dbName string) string
- func URLForGetData(dbName, key string) string
- func URLForGetDataDeletedBy(userID string) string
- func URLForGetDataReadBy(userID string) string
- func URLForGetDataReaders(dbName, key string) string
- func URLForGetDataWriters(dbName, key string) string
- func URLForGetDataWrittenBy(userID string) string
- func URLForGetHistoricalData(dbName, key string) string
- func URLForGetHistoricalDataAt(dbName, key string, version *types.Version) string
- func URLForGetHistoricalDataAtOrBelow(dbName, key string, version *types.Version) string
- func URLForGetHistoricalDeletedData(dbName, key string) string
- func URLForGetMostRecentNodeConfig(nodeID string, version *types.Version) string
- func URLForGetMostRecentUserInfo(userID string, version *types.Version) string
- func URLForGetNextHistoricalData(dbName, key string, version *types.Version) string
- func URLForGetPreviousHistoricalData(dbName, key string, version *types.Version) string
- func URLForGetTransactionReceipt(txId string) string
- func URLForGetTxIDsSubmittedBy(userID string) string
- func URLForGetUser(userID string) string
- func URLForJSONQuery(dbName string) string
- func URLForLastLedgerBlock() string
- func URLForLedgerBlock(blockNum uint64, augmented bool) string
- func URLForLedgerPath(start, end uint64) string
- func URLForNodeConfigPath(nodeID string) string
- func URLTxProof(blockNum uint64, txIdx int) string
Constants ¶
const ( UserHeader = "UserID" SignatureHeader = "Signature" TimeoutHeader = "TxTimeout" UserEndpoint = "/user/" GetUser = "/user/{userid}" PostUserTx = "/user/tx" DataEndpoint = "/data/" GetData = "/data/{dbname:" + `[0-9a-zA-Z_\-\.]+` + "}/{key}" PostDataTx = "/data/tx" PostDataQuery = "/data/{dbname:" + `[0-9a-zA-Z_\-\.]+` + "}/jsonquery" DBEndpoint = "/db/" GetDBStatus = "/db/{dbname:" + `[0-9a-zA-Z_\-\.]+` + "}" PostDBTx = "/db/tx" ConfigEndpoint = "/config/" PostConfigTx = "/config/tx" GetConfig = "/config/tx" GetNodeConfigPath = "/config/node" GetNodeConfig = "/config/node/{nodeId}" GetLastConfigBlock = "/config/block/last" GetClusterStatus = "/config/cluster" LedgerEndpoint = "/ledger/" GetBlockHeader = "/ledger/block/{blockId:[0-9]+}" GetLastBlockHeader = "/ledger/block/last" GetPath = "/ledger/path" GetTxProofPrefix = "/ledger/proof/tx" GetTxProof = "/ledger/proof/tx/{blockId:[0-9]+}" GetDataProofPrefix = "/ledger/proof/data" GetDataProof = "/ledger/proof/data/{dbname:" + `[0-9a-zA-Z_\-\.]+` + "}/{key}" GetTxReceipt = "/ledger/tx/receipt/{txId}" ProvenanceEndpoint = "/provenance/" GetHistoricalData = "/provenance/data/history/{dbname}/{key}" GetDataReaders = "/provenance/data/readers/{dbname}/{key}" GetDataWriters = "/provenance/data/writers/{dbname}/{key}" GetDataReadBy = "/provenance/data/read/{userId}" GetDataWrittenBy = "/provenance/data/written/{userId}" GetDataDeletedBy = "/provenance/data/deleted/{userId}" GetTxIDsSubmittedBy = "/provenance/data/tx/{userId}" GetMostRecentUserOrNode = "/provenance/{type:user|node}/{id}" )
const ( // Combination operators QueryOpAnd = "$and" QueryOpOr = "$or" // Logical operators QueryOpEqual = "$eq" QueryOpNotEqual = "$neq" QueryOpGreaterThan = "$gt" QueryOpLesserThan = "$lt" QueryOpGreaterThanOrEqual = "$gte" QueryOpLesserThanOrEqual = "$lte" // Top-level fields allowed in the query QueryFieldSelector = "selector" )
Variables ¶
This section is empty.
Functions ¶
func SafeURLSegmentNZ ¶
SafeURLSegmentNZ checks that the string `s` is safe to use as a URL segment-nz. For example: `http://example.com:8080/tx/my-id`, for s="my-id". See: `https://www.ietf.org/rfc/rfc3986.txt`.
func URLForGetConfig ¶
func URLForGetConfig() string
URLForGetConfig returns url for GET request to retrieve the cluster configuration
func URLForGetDBStatus ¶
URLForGetDBStatus returns url for GET request to find status of a given database
func URLForGetData ¶
URLForGetData returns url for GET request to retrieve value of the key present in the dbName
func URLForGetDataDeletedBy ¶
URLForGetDataDeletedBy returns url for GET request to retrieve all data written by a given user
func URLForGetDataReadBy ¶
URLForGetDataReadBy returns url for GET request to retrieve all data read by a given user
func URLForGetDataReaders ¶
URLForGetDataReaders returns url for GET request to retrive all users who have read a given key from a database
func URLForGetDataWriters ¶
URLForGetDataWriters returns url for GET request to retrive all users who have written a given key from a database
func URLForGetDataWrittenBy ¶
URLForGetDataWrittenBy returns url for GET request to retrieve all data written by a given user
func URLForGetHistoricalData ¶
URLForGetHistoricalData returns url for GET request to retrieve all values associated with a given key on a database
func URLForGetHistoricalDataAt ¶
URLForGetHistoricalDataAt returns url for GET request to retrieve a value at a particular version for a given key on a database
func URLForGetHistoricalDataAtOrBelow ¶
URLForGetHistoricalDataAtOrBelow returns url for GET request to retrieve a most recent value at a particular version for a given key on a database
func URLForGetHistoricalDeletedData ¶
URLForGetHistoricalDeletedData returns url for GET request to retrieve all deleted values associated with a given key on a database
func URLForGetNextHistoricalData ¶
URLForGetNextHistoricalData returns url for GET request to retrieve next values for a given key on a database from a particular version
func URLForGetPreviousHistoricalData ¶
URLForGetPreviousHistoricalData returns url for GET request to retrieve previous values for a given key on a database from a particular version
func URLForGetTxIDsSubmittedBy ¶
URLForGetTxIDsSubmittedBy returns url for GET request to retrieve all txIDs submitted by a given user
func URLForGetUser ¶
URLForGetUser returns url for GET request to retrieve a user information
func URLForJSONQuery ¶
URLForJSONQuery returns url for GET request to retrieve key-value pairs present in the dbName which are matching the given JSON query criteria
func URLForLastLedgerBlock ¶
func URLForLastLedgerBlock() string
func URLForLedgerBlock ¶
func URLForLedgerPath ¶
func URLForNodeConfigPath ¶
func URLTxProof ¶
Types ¶
This section is empty.