From 2d729eecca87d09f402a4a2ab84470bbfc5dc7a8 Mon Sep 17 00:00:00 2001 From: Troy Ronda Date: Wed, 14 Mar 2018 12:18:45 -0400 Subject: [PATCH] [FAB-8862] Basic docs - introduction This change adds an introduction section to the godoc package. Change-Id: I743416f9c71b4139838279036d9e4f9081c6f244 Signed-off-by: Troy Ronda --- doc.go | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/doc.go b/doc.go index ca8845a9f9..f59ef1b19c 100644 --- a/doc.go +++ b/doc.go @@ -4,7 +4,34 @@ Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -/* -Package fabricsdk enables Go developers to build solutions that interact with Hyperledger Fabric. -*/ +// Package fabricsdk enables Go developers to build solutions that interact with Hyperledger Fabric. +// +// Packages for end developer usage +// +// pkg/fabsdk: The main package of the Fabric SDK. This package enables creation of contexts based on +// configuration. These contexts are used by the client packages listed below. +// Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/fabsdk +// +// pkg/client/channel: Provides channel transaction capabilities. +// Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel +// +// pkg/client/ledger: Enables queries to a channel's underlying ledger. +// Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger +// +// pkg/client/resmgmt: Provides resource management capabilities such as installing chaincode. +// Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt +// +// pkg/client/msp: Enables identity management capability. +// Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/msp +// +// Basic workflow +// +// 1) Instantiate a fabsdk instance using a configuration. +// Note: fabsdk maintains caches so you should minimize instances of fabsdk itself. +// 2) Create a context based on a user and organization, using your fabsdk instance. +// Note: A channel context additionally requires the channel ID. +// 3) Create a client instance using its New func, passing the context. +// Note: you create a new client instance for each context you need. +// 4) Use the funcs provided by each client to create your solution! +// 5) Call fabsdk.Close() to release resources and caches. package fabricsdk