Skip to content

Commit 65730c8

Browse files
FAB-5474 add links to godoc resources
Change-Id: I13af4e7452cac28d0708ab4ba996af05f3fc8614 Signed-off-by: Christopher Ferris <[email protected]>
1 parent e7b20bd commit 65730c8

File tree

2 files changed

+45
-13
lines changed

2 files changed

+45
-13
lines changed

docs/source/chaincode4ade.rst

+17-13
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Chaincode API
2424
-------------
2525

2626
Every chaincode program must implement the
27-
`Chaincode interface <https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L28>`_
27+
`Chaincode interface <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`_
2828
whose methods are called in response to received transactions.
2929
In particular the ``Init`` method is called when a
3030
chaincode receives an ``instantiate`` or ``upgrade`` transaction so that the
@@ -33,7 +33,7 @@ application state. The ``Invoke`` method is called in response to receiving an
3333
``invoke`` transaction to process transaction proposals.
3434

3535
The other interface in the chaincode "shim" APIs is the
36-
`ChaincodeStubInterface <https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L42>`_
36+
`ChaincodeStubInterface <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub>`_
3737
which is used to access and modify the ledger, and to make invocations between
3838
chaincodes.
3939

@@ -72,10 +72,11 @@ Housekeeping
7272
^^^^^^^^^^^^
7373

7474
First, let's start with some housekeeping. As with every chaincode, it implements the
75-
`Chaincode interface` <https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/interfaces.go#L28>_,
75+
`Chaincode interface <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`_
7676
in particular, ``Init`` and ``Invoke`` functions. So, let's add the go import
7777
statements for the necessary dependencies for our chaincode. We'll import the
78-
chaincode shim package and the peer protobuf package.
78+
chaincode shim package and the
79+
`peer protobuf package <http://godoc.org/github.com/hyperledger/fabric/protos/peer>`_.
7980

8081
.. code:: go
8182
@@ -106,8 +107,8 @@ Next, we'll implement the ``Init`` function.
106107
no "migration" or nothing to be initialized as part of the upgrade.
107108

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

112113
.. code:: go
113114
@@ -125,9 +126,9 @@ In our case, we are expecting a key-value pair.
125126
126127
Next, now that we have established that the call is valid, we'll store the
127128
initial state in the ledger. To do this, we will call
128-
``ChaincodeStubInterface.PutState`` with the key and value passed in as
129-
the arguments. Assuming all went well, return a peer.Response object that
130-
indicates the initialization was a success.
129+
`ChaincodeStubInterface.PutState <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.PutState>`_
130+
with the key and value passed in as the arguments. Assuming all went well,
131+
return a peer.Response object that indicates the initialization was a success.
131132

132133
.. code:: go
133134
@@ -171,8 +172,9 @@ As with the ``Init`` function above, we need to extract the arguments from the
171172
name of the chaincode application function to invoke. In our case, our application
172173
will simply have two functions: ``set`` and ``get``, that allow the value of an
173174
asset to be set or its current state to be retrieved. We first call
174-
``ChaincodeStubInterface.GetFunctionAndParameters`` to extract the function
175-
name and the parameters to that chaincode application function.
175+
`ChaincodeStubInterface.GetFunctionAndParameters <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetFunctionAndParameters>`_
176+
to extract the function name and the parameters to that chaincode application
177+
function.
176178

177179
.. code:: go
178180
@@ -220,7 +222,8 @@ Implementing the Chaincode Application
220222
As noted, our chaincode application implements two functions that can be
221223
invoked via the ``Invoke`` function. Let's implement those functions now.
222224
Note that as we mentioned above, to access the ledger's state, we will leverage
223-
the ``ChaincodeStubInterface.PutState`` and ``ChaincodeStubInterface.GetState``
225+
the `ChaincodeStubInterface.PutState <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.PutState>`_
226+
and `ChaincodeStubInterface.GetState <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStub.GetState>`_
224227
functions of the chaincode shim API.
225228

226229
.. code:: go
@@ -261,7 +264,8 @@ Pulling it All Together
261264
^^^^^^^^^^^^^^^^^^^^^^^
262265

263266
Finally, we need to add the ``main`` function, which will call the
264-
``shim.Start`` function. Here's the whole chaincode program source.
267+
`shim.Start <http://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Start>`_
268+
function. Here's the whole chaincode program source.
265269

266270
.. code:: go
267271

docs/source/getting_started.rst

+28
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Hyperledger Fabric.
1111

1212
Install Binaries and Docker Images
1313
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
1415
While we work on developing real installers for the Hyperledger Fabric
1516
binaries, we provide a script that will :ref:`binaries` to your system.
1617
The script also will download the Docker images to your local registry.
@@ -22,6 +23,33 @@ We offer a set of sample applications that you may wish to install these
2223
:doc:`samples` before starting with the tutorials as the tutorials leverage
2324
the sample code.
2425

26+
API Documentation
27+
^^^^^^^^^^^^^^^^^
28+
29+
The API documentation for Hyperledger Fabric's Golang APIs can be found on
30+
the godoc site for `Fabric <http://godoc.org/github.com/hyperledger/fabric>`_.
31+
If you plan on doing any development using these APIs, you may want to
32+
bookmark those links now.
33+
34+
Hyperledger Fabric SDKs
35+
^^^^^^^^^^^^^^^^^^^^^^^
36+
37+
Hyperledger Fabric intends to offer a number of SDKs for a wide variety of
38+
programming languages. The first two delivered SDKs are the Node.js and Java
39+
SDKs. We hope to provide Python and Go SDKs soon after the 1.0.0 release.
40+
41+
* `Hyperledger Fabric Node SDK documentation <https://fabric-sdk-node.github.io/>`__.
42+
* `Hyperledger Fabric Java SDK documentation <https://github.com/hyperledger/fabric-sdk-java>`__.
43+
44+
Hyperledger Fabric CA
45+
^^^^^^^^^^^^^^^^^^^^^
46+
47+
Hyperledger Fabric provides an optional
48+
`certificate authority service <http://hyperledger-fabric-ca.readthedocs.io/en/latest>`_
49+
that you may choose to use to generate the certificates and key material
50+
to configure and manage identity in your blockchain network. However, any CA
51+
that can generate ECDSA certificates may be used.
52+
2553
Tutorials
2654
^^^^^^^^^
2755

0 commit comments

Comments
 (0)