Skip to content

Commit fc3a97c

Browse files
committed
Update docs to point to new repositories
- fabric/core/chaincode -> fabric-chaincode-go - fabric/protos -> fabric-protos-go - stronger language in the vendoring topic FAB-16446 #done Change-Id: Iaa0f316eb3846f2e6651a114663f0c635e33695b Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent 9c6f7cb commit fc3a97c

11 files changed

+32
-37
lines changed

docs/source/chaincode4ade.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Every chaincode program must implement the ``Chaincode`` interface whose methods
2929
are called in response to received transactions. You can find the reference
3030
documentation of the Chaincode Shim API for different languages below:
3131

32-
- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`__
32+
- `Go <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#Chaincode>`__
3333
- `node.js <https://fabric-shim.github.io/ChaincodeInterface.html>`__
3434
- `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/Chaincode.html>`_
3535

@@ -53,7 +53,7 @@ function by using the `peer chaincode invoke` command and passing the
5353

5454
The other interface in the chaincode "shim" APIs is the ``ChaincodeStubInterface``:
5555

56-
- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStubInterface>`__
56+
- `Go <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStubInterface>`__
5757
- `node.js <https://fabric-shim.github.io/ChaincodeStub.html>`__
5858
- `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/ChaincodeStub.html>`_
5959

@@ -95,7 +95,7 @@ Housekeeping
9595
^^^^^^^^^^^^
9696

9797
First, let's start with some housekeeping. As with every chaincode, it implements the
98-
`Chaincode interface <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`_
98+
`Chaincode interface <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#Chaincode>`_
9999
in particular, ``Init`` and ``Invoke`` functions. So, let's add the Go import
100100
statements for the necessary dependencies for our chaincode. We'll import the
101101
chaincode shim package and the
@@ -109,8 +109,8 @@ Next, let's add a struct ``SimpleAsset`` as a receiver for Chaincode shim functi
109109
import (
110110
"fmt"
111111
112-
"github.com/hyperledger/fabric/core/chaincode/shim"
113-
"github.com/hyperledger/fabric/protos/peer"
112+
"github.com/hyperledger/fabric-chaincode-go/shim"
113+
"github.com/hyperledger/fabric-protos-go/peer"
114114
)
115115
116116
// SimpleAsset implements a simple chaincode to manage an asset
@@ -135,7 +135,7 @@ Next, we'll implement the ``Init`` function.
135135
no "migration" or nothing to be initialized as part of the upgrade.
136136

137137
Next, we'll retrieve the arguments to the ``Init`` call using the
138-
`ChaincodeStubInterface.GetStringArgs <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetStringArgs>`_
138+
`ChaincodeStubInterface.GetStringArgs <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.GetStringArgs>`_
139139
function and check for validity. In our case, we are expecting a key-value pair.
140140

141141
.. code:: go
@@ -154,7 +154,7 @@ function and check for validity. In our case, we are expecting a key-value pair.
154154
155155
Next, now that we have established that the call is valid, we'll store the
156156
initial state in the ledger. To do this, we will call
157-
`ChaincodeStubInterface.PutState <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.PutState>`_
157+
`ChaincodeStubInterface.PutState <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.PutState>`_
158158
with the key and value passed in as the arguments. Assuming all went well,
159159
return a peer.Response object that indicates the initialization was a success.
160160

@@ -200,7 +200,7 @@ As with the ``Init`` function above, we need to extract the arguments from the
200200
name of the chaincode application function to invoke. In our case, our application
201201
will simply have two functions: ``set`` and ``get``, that allow the value of an
202202
asset to be set or its current state to be retrieved. We first call
203-
`ChaincodeStubInterface.GetFunctionAndParameters <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetFunctionAndParameters>`_
203+
`ChaincodeStubInterface.GetFunctionAndParameters <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.GetFunctionAndParameters>`_
204204
to extract the function name and the parameters to that chaincode application
205205
function.
206206

@@ -250,8 +250,8 @@ Implementing the Chaincode Application
250250
As noted, our chaincode application implements two functions that can be
251251
invoked via the ``Invoke`` function. Let's implement those functions now.
252252
Note that as we mentioned above, to access the ledger's state, we will leverage
253-
the `ChaincodeStubInterface.PutState <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.PutState>`_
254-
and `ChaincodeStubInterface.GetState <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetState>`_
253+
the `ChaincodeStubInterface.PutState <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.PutState>`_
254+
and `ChaincodeStubInterface.GetState <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.GetState>`_
255255
functions of the chaincode shim API.
256256

257257
.. code:: go
@@ -292,7 +292,7 @@ Pulling it All Together
292292
^^^^^^^^^^^^^^^^^^^^^^^
293293

294294
Finally, we need to add the ``main`` function, which will call the
295-
`shim.Start <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Start>`_
295+
`shim.Start <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#Start>`_
296296
function. Here's the whole chaincode program source.
297297

298298
.. code:: go
@@ -302,8 +302,8 @@ function. Here's the whole chaincode program source.
302302
import (
303303
"fmt"
304304
305-
"github.com/hyperledger/fabric/core/chaincode/shim"
306-
"github.com/hyperledger/fabric/protos/peer"
305+
"github.com/hyperledger/fabric-chaincode-go/shim"
306+
"github.com/hyperledger/fabric-protos-go/peer"
307307
)
308308
309309
// SimpleAsset implements a simple chaincode to manage an asset
@@ -396,7 +396,7 @@ Now let's compile your chaincode.
396396

397397
.. code:: bash
398398
399-
go get -u github.com/hyperledger/fabric/core/chaincode/shim
399+
go get -u github.com/hyperledger/fabric-chaincode-go
400400
go build
401401
402402
Assuming there are no errors, now we can proceed to the next step, testing
@@ -526,7 +526,7 @@ to make updates to the key/value in the future. The client identity
526526
library extension APIs can be used within chaincode to retrieve this
527527
submitter information to make such access control decisions.
528528

529-
See the `client identity (CID) library documentation <https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/ext/cid/README.md>`_
529+
See the `client identity (CID) library documentation <https://github.com/hyperledger/fabric-chaincode-go/blob/master/pkg/cid/README.md>`_
530530
for more details.
531531

532532
To add the client identity shim extension to your chaincode as a dependency, see :ref:`vendoring`.
@@ -535,10 +535,9 @@ To add the client identity shim extension to your chaincode as a dependency, see
535535

536536
Managing external dependencies for chaincode written in Go
537537
----------------------------------------------------------
538-
If your chaincode requires packages not provided by the Go standard library,
539-
you will need to include those packages with your chaincode. It is also a
540-
good practice to add the shim and any extension libraries to your chaincode
541-
as a dependency.
538+
Your Go chaincode requires packages (like the chaincode shim) that are not part
539+
of the Go standard library. These packages must be included in your chaincode
540+
package.
542541

543542
There are `many tools available <https://github.com/golang/go/wiki/PackageManagementTools>`__
544543
for managing (or "vendoring") these dependencies. The following demonstrates how to use

docs/source/couchdb_as_state_database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Using CouchDB from Chaincode
5353
Chaincode queries
5454
~~~~~~~~~~~~~~~~~
5555

56-
Most of the `chaincode shim APIs <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStubInterface>`__
56+
Most of the `chaincode shim APIs <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStubInterface>`__
5757
can be utilized with either LevelDB or CouchDB state database, e.g. ``GetState``, ``PutState``,
5858
``GetStateByRange``, ``GetStateByPartialCompositeKey``. Additionally when you utilize CouchDB as
5959
the state database and model assets as JSON in chaincode, you can perform rich queries against

docs/source/couchdb_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ Delving into the query command above, there are three arguments of interest:
584584

585585
* ``queryMarbles``
586586

587-
Name of the function in the Marbles chaincode. Notice a `shim <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim>`__
587+
Name of the function in the Marbles chaincode. Notice a `shim <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim>`__
588588
``shim.ChaincodeStubInterface`` is used to access and modify the ledger. The
589589
``getQueryResultForQueryString()`` passes the queryString to the shim API ``getQueryResult()``.
590590

@@ -793,7 +793,7 @@ a unique bookmark.)
793793
794794
* ``queryMarblesWithPagination``
795795
796-
Name of the function in the Marbles chaincode. Notice a `shim <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim>`__
796+
Name of the function in the Marbles chaincode. Notice a `shim <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim>`__
797797
``shim.ChaincodeStubInterface`` is used to access and modify the ledger. The
798798
``getQueryResultForQueryStringWithPagination()`` passes the queryString along
799799
with the pagesize and bookmark to the shim API ``GetQueryResultWithPagination()``.

docs/source/developapps/analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The value of `Owner` of a paper can be used to perform access control on the
7575
**redeem** transaction, by comparing the `Owner` against the identity of the
7676
transaction creator. Fabric supports this through the
7777
[`getCreator()` chaincode API](https://github.com/hyperledger/fabric-chaincode-node/blob/master/fabric-shim/lib/stub.js#L293).
78-
If golang is used as a chaincode language, the [client identity chaincode library](https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/ext/cid/README.md)
78+
If golang is used as a chaincode language, the [client identity chaincode library](https://github.com/hyperledger/fabric-chaincode-go/blob/master/pkg/cid/README.md)
7979
can be used to retrieve additional attributes of the transaction creator.
8080

8181
## Transactions

docs/source/enable_tls.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ of the CA certificates trusted by the peer or orderer node.
139139

140140
If you see the error message ``remote error: tls: bad certificate`` in your chaincode logs,
141141
ensure that your chaincode has been built using the chaincode shim provided with Fabric v1.1
142-
or newer. If your chaincode does not contain a vendored copy of the shim, deleting the
143-
chaincode container and restarting its peer will rebuild the chaincode container using the
144-
current shim version.
142+
or newer.
145143

146144
.. Licensed under Creative Commons Attribution 4.0 International License
147145
https://creativecommons.org/licenses/by/4.0/

docs/source/endorsement-policies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ following functions apply:
200200
To help set endorsement policies and marshal them into validation
201201
parameter byte arrays, the Go shim provides an extension with convenience
202202
functions that allow the chaincode developer to deal with endorsement policies
203-
in terms of the MSP identifiers of organizations, see `KeyEndorsementPolicy <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim/ext/statebased#KeyEndorsementPolicy>`_:
203+
in terms of the MSP identifiers of organizations, see `KeyEndorsementPolicy <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/pkg/statebased#KeyEndorsementPolicy>`_:
204204

205205
.. code-block:: Go
206206

docs/source/idemix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Idemix and chaincode
137137
From a verifier perspective, there is one more actor to consider: chaincode.
138138
What can chaincode learn about the transactor when an Idemix credential is used?
139139

140-
The `cid (Client Identity) library <https://github.com/hyperledger/fabric/tree/master/core/chaincode/shim/ext/cid>`_
140+
The `cid (Client Identity) library <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/pkg/cid>`_
141141
(for golang only) has been extended to support the ``GetAttributeValue`` function
142142
when an Idemix credential is used. However, as mentioned in the "Current
143143
limitations" section below, there are only two attributes which are disclosed in

docs/source/private-data-arch.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ properties will have ensured the private data is available on other peers.
173173
Referencing collections from chaincode
174174
--------------------------------------
175175

176-
A set of `shim APIs <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim>`_
176+
A set of `shim APIs <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim>`_
177177
are available for setting and retrieving private data.
178178

179179
The same chaincode data operations can be applied to channel state data and
@@ -191,7 +191,7 @@ not to include private data in the main part of the chaincode proposal. A specia
191191
field in the chaincode proposal called the ``transient`` field can be used to pass
192192
private data from the client (or data that chaincode will use to generate private
193193
data), to chaincode invocation on the peer. The chaincode can retrieve the
194-
``transient`` field by calling the `GetTransient() API <https://github.com/hyperledger/fabric/blob/8b3cbda97e58d1a4ff664219244ffd1d89d7fba8/core/chaincode/shim/interfaces.go#L315-L321>`_.
194+
``transient`` field by calling the `GetTransient() API <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.GetTransient>`_.
195195
This ``transient`` field gets excluded from the channel transaction.
196196

197197
Access control for private data
@@ -210,7 +210,7 @@ configuration definitions and how to set them, refer back to the
210210
``memberOnlyRead`` to false. You can then apply your own access
211211
control logic in chaincode, for example by calling the GetCreator()
212212
chaincode API or using the client identity
213-
`chaincode library <https://github.com/hyperledger/fabric/tree/master/core/chaincode/shim/ext/cid>`__ .
213+
`chaincode library <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub.GetCreator>`__ .
214214

215215
Querying Private Data
216216
~~~~~~~~~~~~~~~~~~~~~

docs/source/private_data_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Thus two different sets of private data are defined in the marbles private data
157157
sample. The mapping of this data to the collection policy which restricts its
158158
access is controlled by chaincode APIs. Specifically, reading and writing
159159
private data using a collection definition is performed by calling ``GetPrivateData()``
160-
and ``PutPrivateData()``, which can be found `here <https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L179>`_.
160+
and ``PutPrivateData()``, which can be found `here <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStub>`_.
161161

162162
The following diagrams illustrate the private data model used by the marbles
163163
private data sample.

docs/source/understand_fabcar_network.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Query
7272

7373
Queries are the simplest kind of invocation: a call and response. The most common query
7474
will interrogate the state database for the current value associated
75-
with a key (``GetState``). However, the `chaincode shim interface <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub>`__
75+
with a key (``GetState``). However, the `chaincode shim interface <https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim#ChaincodeStubInterface>`__
7676
also allows for different types of ``Get`` calls (e.g. ``GetHistoryForKey`` or ``GetCreator``).
7777

7878
In our example, the peer holds a hash chain of all transactions and maintains

0 commit comments

Comments
 (0)