platforms

package
v0.0.0-...-667e438 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 WritePackage(spec *pb.ChaincodeSpec, out io.Writer) (string, error)

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

func Find

func Find(chaincodeType pb.ChaincodeSpec_Type) (Platform, error)

Find returns the platform interface for the given platform type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL