fabric: github.com/hyperledger/fabric/core/chaincode/platforms/golang Index | Files

package golang

import "github.com/hyperledger/fabric/core/chaincode/platforms/golang"


Package Files

list.go platform.go

type CodeDescriptor Uses

type CodeDescriptor struct {
    Source       string // absolute path of the source to package
    MetadataRoot string // absolute path META-INF
    Path         string // import path of the package
    Module       bool   // does this represent a go module

CodeDescriptor describes the code we're packaging.

func DescribeCode Uses

func DescribeCode(path string) (*CodeDescriptor, error)

DescribeCode returns GOPATH and package information.

type ModuleInfo Uses

type ModuleInfo struct {
    Dir        string
    GoMod      string
    ImportPath string
    ModulePath string

type PackageInfo Uses

type PackageInfo struct {
    ImportPath     string
    Dir            string
    GoFiles        []string
    Goroot         bool
    CFiles         []string
    CgoFiles       []string
    HFiles         []string
    SFiles         []string
    IgnoredGoFiles []string
    Incomplete     bool

PackageInfo is the subset of data from `go list -deps -json` that's necessary to calculate chaincode package dependencies.

func (PackageInfo) Files Uses

func (p PackageInfo) Files() []string

type Platform Uses

type Platform struct{}

Platform for chaincodes written in Go

func (*Platform) DockerBuildOptions Uses

func (p *Platform) DockerBuildOptions(path string) (util.DockerBuildOptions, error)

func (*Platform) GenerateDockerfile Uses

func (p *Platform) GenerateDockerfile() (string, error)

func (*Platform) GetDeploymentPayload Uses

func (p *Platform) GetDeploymentPayload(codepath string) ([]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 Uses

func (p *Platform) Name() string

Name returns the name of this platform.

func (*Platform) NormalizePath Uses

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 Uses

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 Uses

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.

type SourceDescriptor Uses

type SourceDescriptor struct {
    Name string
    Path string

type SourceMap Uses

type SourceMap map[string]SourceDescriptor

func (SourceMap) Directories Uses

func (s SourceMap) Directories() []string

func (SourceMap) Sources Uses

func (s SourceMap) Sources() Sources

type Sources Uses

type Sources []SourceDescriptor

func (Sources) Len Uses

func (s Sources) Len() int

func (Sources) Less Uses

func (s Sources) Less(i, j int) bool

func (Sources) Swap Uses

func (s Sources) Swap(i, j int)

Package golang imports 22 packages (graph) and is imported by 51 packages. Updated 2020-07-10. Refresh now. Tools for package owners.