Documentation
¶
Index ¶
- Variables
- func GetArgsAndEnv(spec *pb.ChaincodeSpec, netID string, clispec *config.ClientSpec) (args []string, envs []string, err error)
- func GetSystemEnvArgsAndEnv(spec *pb.ChaincodeSpec) (args []string)
- func ValidateSpec(spec *pb.ChaincodeSpec) error
- func WritePackage(spec *pb.ChaincodeSpec, out io.Writer) (string, error)
- func WriteRunTime(spec *pb.ChaincodeSpec, clispec *config.ClientSpec, tw *tar.Writer) error
- type Platform
Constants ¶
This section is empty.
Variables ¶
View Source
var ArchivePath = "ccfile"
archive for each file in a directory, in archive all files are put under a magic directory "ccfile"
Functions ¶
func GetArgsAndEnv ¶
func GetArgsAndEnv(spec *pb.ChaincodeSpec, netID string, clispec *config.ClientSpec) (args []string, envs []string, err error)
func GetSystemEnvArgsAndEnv ¶
func GetSystemEnvArgsAndEnv(spec *pb.ChaincodeSpec) (args []string)
func ValidateSpec ¶
func ValidateSpec(spec *pb.ChaincodeSpec) error
func WritePackage ¶
func WriteRunTime ¶
func WriteRunTime(spec *pb.ChaincodeSpec, clispec *config.ClientSpec, tw *tar.Writer) error
Types ¶
type Platform ¶
type Platform interface {
ValidateSpec(spec *pb.ChaincodeSpec) error
//for step 1: codepath is divided into two parts, the packpath part is reserved in
//the chaincode bytecode
//shouldclean indicate the code path should be remove after being used
//the path argument MUST be the chaincodeID.Path in corresponding spec
GetCodePath(string) (rootpath string, packpath string, shouldclean bool, err error)
//for step 2: this suppose we have an archive of codes under the "ccfile" (magic string)
//directory and platform should provided extra resources into the archive and a dockerfile
//template which can correctly build the chaincode
WriteDockerRunTime(spec *pb.ChaincodeSpec, tw *tar.Writer) (string, error)
}
Interface for validating the specification and and writing the package for the given platform
Click to show internal directories.
Click to hide internal directories.