platform

package
v0.0.0-...-f47aca1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseDockerLabel = "personal.candy"
View Source
var CommitSHA = "development build"
View Source
var DockerNamespace = "candy"
View Source
var Version = "latest"

Functions

This section is empty.

Types

type CodeDescriptor

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

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

DescribeCode returns GOPATH and package information.

type DockerBuildOptions

type DockerBuildOptions struct {
	Image        string
	Cmd          string
	Env          []string
	InputStream  io.Reader
	OutputStream io.Reader
}

type GolangPlatform

type GolangPlatform struct {
}

func (*GolangPlatform) GenerateDockerBuild

func (p *GolangPlatform) GenerateDockerBuild(cType, path string,
	codePackage io.Reader, client *docker.Client) (io.Reader, error)

----------------------------------------------------------------- generate dockerfile

func (*GolangPlatform) GetDeploymentPayload

func (p *GolangPlatform) GetDeploymentPayload(codePath string) ([]byte, error)

func (*GolangPlatform) NormalizePath

func (p *GolangPlatform) NormalizePath(cType, path string) (string, error)

type ModuleInfo

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

type PackageInfo

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

func (p PackageInfo) Files() []string

type PackageWriter

type PackageWriter interface {
	Write(name string, payload []byte, tw *tar.Writer) error
}

type PackageWriterWrapper

type PackageWriterWrapper func(name string, payload []byte, tw *tar.Writer) error

func (PackageWriterWrapper) Write

func (pw PackageWriterWrapper) Write(name string, payload []byte, tw *tar.Writer) error

type PlatformRegistry

type PlatformRegistry interface {
	GetDeploymentPayload(path string) ([]byte, error)
	NormalizePath(cType, path string) (string, error)
}

type SourceDescriptor

type SourceDescriptor struct {
	Name string
	Path string
}

type SourceMap

type SourceMap map[string]SourceDescriptor

func (SourceMap) Directories

func (s SourceMap) Directories() []string

func (SourceMap) Sources

func (s SourceMap) Sources() Sources

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)

Jump to

Keyboard shortcuts

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