external

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteBytesToPackage

func WriteBytesToPackage(raw []byte, packagepath string, tw *tar.Writer) error

WriteBytesToPackage writes a file to a tar stream.

Types

type Platform

type Platform struct{}

Platform for external chaincodes

func (*Platform) GetDeploymentPayload

func (p *Platform) GetDeploymentPayload(codepath string, replacer replacer.Func) ([]byte, error)

GetDeploymentPayload creates a gzip compressed tape archive that contains the required assets to build and run go chaincode.

NOTE: this is only used at the _client_ side by the peer CLI.

func (*Platform) Name

func (p *Platform) Name() string

Name returns the name of this platform.

func (*Platform) NormalizePath

func (p *Platform) NormalizePath(rawPath string) (string, error)

NormalizePath is used to extract a relative module path from a module root. This should not impact legacy GOPATH chaincode.

NOTE: this is only used at the _client_ side by the peer CLI.

func (*Platform) ValidateCodePackage

func (p *Platform) ValidateCodePackage(code []byte) error

ValidateCodePackage examines the chaincode archive to ensure it is valid.

NOTE: this code is used in some transaction validation paths but can be changed post 2.0.

func (*Platform) ValidatePath

func (p *Platform) ValidatePath(rawPath string) error

ValidatePath is used to ensure that path provided points to something that looks like go chainccode.

NOTE: this is only used at the _client_ side by the peer CLI.

Jump to

Keyboard shortcuts

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