Documentation ¶
Index ¶
- Variables
- func AddAssets(dataFilePath, networkName, connProfilePath string, query QueryType, ...) error
- func AddData(filename string, connProfilePath string, networkName string, query QueryType, ...) error
- func CheckIfFileOrDirectoryExists(path string) (bool, error)
- func Contains(list []string, value string) bool
- func FabricHelper(gni GatewayNetworkInterface, ...) (*gateway.Gateway, *gateway.Contract, *gateway.Wallet, error)
- func GenerateAccessControl(...) error
- func GenerateMembership(channel, contractName, connProfilePath, networkName, mspId, userString string) error
- func GenerateSHA256HashInBase64Form(preimage string) string
- func GenerateVerificationPolicy(...) error
- func GetCredentialPath() string
- func GetCurrentNetworkCredentialPath(networkId string) string
- func GetIdentityFromWallet(wallet *gateway.Wallet, userString string) (*gateway.X509Identity, error)
- func GetKeyAndCertForRemoteRequestbyUserName(wallet *gateway.Wallet, username string) (string, string, error)
- func Invoke(query QueryType, connProfilePath string, networkName string, mspId string, ...) ([]byte, error)
- func Query(query QueryType, connProfilePath string, networkName string, mspId string, ...) ([]byte, error)
- func SetLogLevel(lvl log.Level)
- func WalletSetup(connProfilePath, networkName, mspId, username, userPwd string, register bool) (*gateway.Wallet, error)
- type AccessControlPolicy
- type GatewayNetworkInterface
- type Identifier
- type IdentifierAccessPolicy
- type Member
- type Membership
- type NetworkConfig
- type QueryType
- type Rule
- type VerificationPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigKeys = []string{
"connProfilePath",
"relayEndpoint",
}
Valid keys for config
View Source
var ValidKeys = []string{
"DEFAULT_CHANNEL",
"DEFAULT_CHAINCODE",
"MEMBER_CREDENTIAL_FOLDER",
"LOCAL",
"DEFAULT_APPLICATION_CHAINCODE",
"CONFIG_PATH",
}
Valid keys for .env
Functions ¶
func FabricHelper ¶
func GenerateAccessControl ¶
func GenerateMembership ¶
func GenerateSHA256HashInBase64Form ¶
function to generate a "SHA256" hash in base64 format for a given preimage
func GetCredentialPath ¶
func GetCredentialPath() string
func GetIdentityFromWallet ¶
func SetLogLevel ¶
Types ¶
type AccessControlPolicy ¶
type GatewayNetworkInterface ¶
type GatewayNetworkInterface interface {
GetNetwork(*gateway.Gateway, string) (*gateway.Network, error)
}
func NewGatewayNetworkInterface ¶
func NewGatewayNetworkInterface() GatewayNetworkInterface
type Identifier ¶
type Identifier struct { Pattern string `json:"pattern"` Policy IdentifierAccessPolicy `json:"policy"` }
type IdentifierAccessPolicy ¶
type Membership ¶
type NetworkConfig ¶
type NetworkConfig struct { RelayEndPoint string `json:"relayEndPoint"` ConnProfilePath string `json:"connProfilePath"` MspId string `json:"mspId"` ChannelName string `json:"channelName"` Chaincode string `json:"chaincode"` }
func GetNetworkConfig ¶
func GetNetworkConfig(networkId string) (NetworkConfig, error)
type VerificationPolicy ¶
type VerificationPolicy struct { SecurityDomain string `json:"securityDomain"` Identifiers []Identifier `json:"identifiers"` }
Click to show internal directories.
Click to hide internal directories.