...

Package golang

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

Overview ▾

type CodeDescriptor

type CodeDescriptor struct {
    Gopath, Pkg string
    Cleanup     func()
}

type Env

type Env map[string]string

type Paths

type Paths map[string]bool

type Platform

Platform for chaincodes written in Go

type Platform struct {
}

func (*Platform) GenerateDockerBuild

func (goPlatform *Platform) GenerateDockerBuild(path string, code []byte, tw *tar.Writer) error

func (*Platform) GenerateDockerfile

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

func (*Platform) GetDeploymentPayload

func (goPlatform *Platform) GetDeploymentPayload(path string) ([]byte, error)

Generates a deployment payload for GOLANG as a series of src/$pkg entries in .tar.gz format

func (*Platform) GetMetadataProvider

func (goPlatform *Platform) GetMetadataProvider(code []byte) platforms.MetadataProvider

GetMetadataProvider fetches metadata provider given deployment spec

func (*Platform) Name

func (goPlatform *Platform) Name() string

Name returns the name of this platform

func (*Platform) ValidateCodePackage

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

func (*Platform) ValidatePath

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

ValidateSpec validates Go chaincodes

type SourceDescriptor

type SourceDescriptor struct {
    Name, Path string
    IsMetadata bool
    Info       os.FileInfo
}

type SourceMap

type SourceMap map[string]SourceDescriptor

type Sources

type Sources []SourceDescriptor

func (Sources) Len

func (s Sources) Len() int

func (Sources) Less

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

func (Sources) Swap

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