occam

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheVolumeNames

func CacheVolumeNames(name string) []string

func RandomName

func RandomName() (string, error)

func Source added in v0.0.11

func Source(path string) (string, error)

Types

type BuildpackStore added in v0.0.12

type BuildpackStore struct {
	Get BuildpackStoreGet
}

func NewBuildpackStore added in v0.0.12

func NewBuildpackStore() BuildpackStore

func (BuildpackStore) WithCacheManager added in v0.0.12

func (bs BuildpackStore) WithCacheManager(manager CacheManager) BuildpackStore

func (BuildpackStore) WithLocalFetcher added in v0.0.12

func (bs BuildpackStore) WithLocalFetcher(fetcher LocalFetcher) BuildpackStore

func (BuildpackStore) WithRemoteFetcher added in v0.0.12

func (bs BuildpackStore) WithRemoteFetcher(fetcher RemoteFetcher) BuildpackStore

type BuildpackStoreGet added in v0.0.12

type BuildpackStoreGet struct {
	// contains filtered or unexported fields
}

func (BuildpackStoreGet) Execute added in v0.0.12

func (g BuildpackStoreGet) Execute(url string) (string, error)

func (BuildpackStoreGet) WithOfflineDependencies added in v0.0.12

func (g BuildpackStoreGet) WithOfflineDependencies() BuildpackStoreGet

func (BuildpackStoreGet) WithVersion added in v0.0.12

func (g BuildpackStoreGet) WithVersion(version string) BuildpackStoreGet

type CacheManager added in v0.0.12

type CacheManager interface {
	Get(key string) (freezer.CacheEntry, bool, error)
	Set(key string, cachedEntry freezer.CacheEntry) error
	Dir() string
	Open() error
	Close() error
}

type Container

type Container struct {
	ID    string
	Ports map[string]string
	Env   map[string]string
}

func NewContainerFromInspectOutput

func NewContainerFromInspectOutput(output []byte) (Container, error)

func (Container) HostPort

func (c Container) HostPort(value string) string

type Docker

type Docker struct {
	Image struct {
		Inspect DockerImageInspect
		Remove  DockerImageRemove
	}

	Container struct {
		Inspect DockerContainerInspect
		Logs    DockerContainerLogs
		Run     DockerContainerRun
		Remove  DockerContainerRemove
		Stop    DockerContainerStop
	}

	Volume struct {
		Remove DockerVolumeRemove
	}
}

func NewDocker

func NewDocker() Docker

func (Docker) WithExecutable

func (d Docker) WithExecutable(executable Executable) Docker

type DockerContainerInspect

type DockerContainerInspect struct {
	// contains filtered or unexported fields
}

func (DockerContainerInspect) Execute

func (i DockerContainerInspect) Execute(containerID string) (Container, error)

type DockerContainerLogs

type DockerContainerLogs struct {
	// contains filtered or unexported fields
}

func (DockerContainerLogs) Execute

func (l DockerContainerLogs) Execute(containerID string) (fmt.Stringer, error)

type DockerContainerRemove

type DockerContainerRemove struct {
	// contains filtered or unexported fields
}

func (DockerContainerRemove) Execute

func (r DockerContainerRemove) Execute(containerID string) error

type DockerContainerRun

type DockerContainerRun struct {
	// contains filtered or unexported fields
}

func (DockerContainerRun) Execute

func (r DockerContainerRun) Execute(imageID string) (Container, error)

func (DockerContainerRun) WithCommand

func (r DockerContainerRun) WithCommand(command string) DockerContainerRun

func (DockerContainerRun) WithEntrypoint added in v0.0.18

func (r DockerContainerRun) WithEntrypoint(entrypoint string) DockerContainerRun

func (DockerContainerRun) WithEnv

func (DockerContainerRun) WithMemory

func (r DockerContainerRun) WithMemory(memoryLimit string) DockerContainerRun

func (DockerContainerRun) WithPublish added in v0.0.21

func (r DockerContainerRun) WithPublish(value string) DockerContainerRun

func (DockerContainerRun) WithPublishAll added in v0.0.21

func (r DockerContainerRun) WithPublishAll() DockerContainerRun

func (DockerContainerRun) WithTTY

func (DockerContainerRun) WithVolume added in v0.1.2

func (r DockerContainerRun) WithVolume(volume string) DockerContainerRun

type DockerContainerStop added in v0.0.19

type DockerContainerStop struct {
	// contains filtered or unexported fields
}

func (DockerContainerStop) Execute added in v0.0.19

func (s DockerContainerStop) Execute(containerID string) error

type DockerImageInspect

type DockerImageInspect struct {
	// contains filtered or unexported fields
}

func (DockerImageInspect) Execute

func (i DockerImageInspect) Execute(ref string) (Image, error)

type DockerImageInspectClient

type DockerImageInspectClient interface {
	Execute(ref string) (Image, error)
}

type DockerImageRemove

type DockerImageRemove struct {
	// contains filtered or unexported fields
}

func (DockerImageRemove) Execute

func (r DockerImageRemove) Execute(ref string) error

type DockerVolumeRemove

type DockerVolumeRemove struct {
	// contains filtered or unexported fields
}

func (DockerVolumeRemove) Execute

func (r DockerVolumeRemove) Execute(volumes []string) error

type Executable

type Executable interface {
	Execute(pexec.Execution) error
}

type Image

type Image struct {
	ID         string
	Buildpacks []ImageBuildpackMetadata
	Labels     map[string]string
}

func NewImageFromInspectOutput

func NewImageFromInspectOutput(output []byte) (Image, error)

type ImageBuildpackMetadata

type ImageBuildpackMetadata struct {
	Key    string
	Layers map[string]ImageBuildpackMetadataLayer
}

type ImageBuildpackMetadataLayer

type ImageBuildpackMetadataLayer struct {
	SHA      string
	Build    bool
	Launch   bool
	Cache    bool
	Metadata map[string]interface{}
}

type LocalFetcher added in v0.0.12

type LocalFetcher interface {
	Get(freezer.LocalBuildpack) (string, error)
}

type Pack

type Pack struct {
	Build PackBuild
}

func NewPack

func NewPack() Pack

func (Pack) WithDockerImageInspectClient

func (p Pack) WithDockerImageInspectClient(client DockerImageInspectClient) Pack

func (Pack) WithExecutable

func (p Pack) WithExecutable(executable Executable) Pack

func (Pack) WithNoColor

func (p Pack) WithNoColor() Pack

func (Pack) WithVerbose

func (p Pack) WithVerbose() Pack

type PackBuild

type PackBuild struct {
	// contains filtered or unexported fields
}

func (PackBuild) Execute

func (pb PackBuild) Execute(name, path string) (Image, fmt.Stringer, error)

func (PackBuild) WithBuilder

func (pb PackBuild) WithBuilder(name string) PackBuild

func (PackBuild) WithBuildpacks

func (pb PackBuild) WithBuildpacks(buildpacks ...string) PackBuild

func (PackBuild) WithClearCache

func (pb PackBuild) WithClearCache() PackBuild

func (PackBuild) WithEnv

func (pb PackBuild) WithEnv(env map[string]string) PackBuild

func (PackBuild) WithNetwork

func (pb PackBuild) WithNetwork(name string) PackBuild

func (PackBuild) WithNoPull deprecated

func (pb PackBuild) WithNoPull() PackBuild

Deprecated: Use WithPullPolicy("never") instead.

func (PackBuild) WithPullPolicy added in v0.0.19

func (pb PackBuild) WithPullPolicy(pullPolicy string) PackBuild

func (PackBuild) WithTrustBuilder added in v0.0.18

func (pb PackBuild) WithTrustBuilder() PackBuild

type RemoteFetcher added in v0.0.12

type RemoteFetcher interface {
	Get(freezer.RemoteBuildpack) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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