render

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const DOCKER = "DOCKER"
View Source
const DOCKER_COMPOSE = "DOCKER_COMPOSE"
View Source
const KUBERNETES = "KUBERNETES"

Variables

This section is empty.

Functions

func Render

func Render(document *proto.Document) ([]byte, error)

Types

type CopyInstruction

type CopyInstruction struct {
	*proto.CopyInstruction
	Runtime         Runtime
	TaskInstruction *TaskInstruction
}

func (*CopyInstruction) ContainerName

func (t *CopyInstruction) ContainerName() string

func (*CopyInstruction) ToContainer

func (t *CopyInstruction) ToContainer() bool

type DockerfileInstruction

type DockerfileInstruction struct {
	*proto.DockerfileInstruction
	TaskInstruction *TaskInstruction
}

func (*DockerfileInstruction) DeriveTargetImage

func (t *DockerfileInstruction) DeriveTargetImage() string

type Document

type Document struct {
	*proto.Document
	AnchorIds map[string]bool
}

func NewDocument

func NewDocument(document *proto.Document) *Document

func (*Document) DockerTaskGroups

func (t *Document) DockerTaskGroups() []*SingleRuntimeTaskGroup

func (*Document) HasReferences

func (t *Document) HasReferences() bool

func (*Document) KubernetesTaskGroups

func (t *Document) KubernetesTaskGroups() []*SingleRuntimeTaskGroup

func (*Document) NeedsGcloud

func (t *Document) NeedsGcloud() bool

func (*Document) PortReference

func (t *Document) PortReference() *PortReference

type ExecInstruction

type ExecInstruction struct {
	*proto.ExecInstruction
	Runtime         Runtime
	TaskInstruction *TaskInstruction
}

func (*ExecInstruction) ContainerName

func (t *ExecInstruction) ContainerName() string

func (*ExecInstruction) Interactive

func (t *ExecInstruction) Interactive() bool

type PortReference

type PortReference struct {
	*proto.PortReference
}

func (*PortReference) Ports

func (t *PortReference) Ports() []*PortReference_PortInfo

type PortReference_PortInfo

type PortReference_PortInfo struct {
	*proto.PortReference_PortInfo
}

func (*PortReference_PortInfo) UppercasedProtocol

func (t *PortReference_PortInfo) UppercasedProtocol() string

type RunInstruction

type RunInstruction struct {
	*proto.RunInstruction
	Runtime         Runtime
	TaskInstruction *TaskInstruction
}

func (*RunInstruction) AllEmptyPersistentVolumes

func (t *RunInstruction) AllEmptyPersistentVolumes() []*RunInstruction_MountedVolume

AllEmptyPersistentVolumes returns empty persistent volumes across the main service and all dependencies.

func (*RunInstruction) AllSingleFileVolumes

func (t *RunInstruction) AllSingleFileVolumes() []*RunInstruction_MountedVolume

SingleFileVolumes returns single file volumes across the main service and all dependencies.

func (*RunInstruction) AllVolumes

func (t *RunInstruction) AllVolumes() []*RunInstruction_MountedVolume

AllVolumes returns volumes across the main service and all dependencies.

func (*RunInstruction) ConcatArguments

func (t *RunInstruction) ConcatArguments() string

func (*RunInstruction) ContainerName

func (t *RunInstruction) ContainerName() string

ContainerName constructs the name for a stand-alone docker container or k8s pod.

func (*RunInstruction) Dependencies

func (t *RunInstruction) Dependencies() []*RunInstruction_Dependency

func (*RunInstruction) DependenciesWithLinkAlias

func (t *RunInstruction) DependenciesWithLinkAlias() []*RunInstruction_Dependency

func (*RunInstruction) DependenciesWithoutLinkAlias

func (t *RunInstruction) DependenciesWithoutLinkAlias() []*RunInstruction_Dependency

func (*RunInstruction) DockerComposeEnvironment

func (t *RunInstruction) DockerComposeEnvironment() map[string]string

func (*RunInstruction) DockerEnvironment

func (t *RunInstruction) DockerEnvironment() map[string]string

func (*RunInstruction) ExposedPorts

func (t *RunInstruction) ExposedPorts() []*RunInstruction_ExposedPort

func (*RunInstruction) KubernetesEnvironment

func (t *RunInstruction) KubernetesEnvironment() map[string]string

func (*RunInstruction) MappedExposedPorts

func (t *RunInstruction) MappedExposedPorts() []*RunInstruction_ExposedPort

func (*RunInstruction) RunType

func (*RunInstruction) Volumes

type RunInstruction_Dependency

type RunInstruction_Dependency struct {
	*proto.RunInstruction_Dependency
	Runtime Runtime
}

func (*RunInstruction_Dependency) ContainerName

func (t *RunInstruction_Dependency) ContainerName() string

func (*RunInstruction_Dependency) DockerComposeEnvironment

func (t *RunInstruction_Dependency) DockerComposeEnvironment() map[string]string

func (*RunInstruction_Dependency) DockerEnvironment

func (t *RunInstruction_Dependency) DockerEnvironment() map[string]string

func (*RunInstruction_Dependency) KubernetesEnvironment

func (t *RunInstruction_Dependency) KubernetesEnvironment() map[string]string

func (*RunInstruction_Dependency) Volumes

type RunInstruction_ExposedPort

type RunInstruction_ExposedPort struct {
	*proto.RunInstruction_ExposedPort
}

func (*RunInstruction_ExposedPort) DockerPortMappingProtocol

func (t *RunInstruction_ExposedPort) DockerPortMappingProtocol() string

func (*RunInstruction_ExposedPort) NamingPort

func (t *RunInstruction_ExposedPort) NamingPort() string

type RunInstruction_MountedVolume

type RunInstruction_MountedVolume struct {
	*proto.RunInstruction_MountedVolume
}

func (*RunInstruction_MountedVolume) GetEmptyPersistentVolume

func (*RunInstruction_MountedVolume) GetSingleFile

func (*RunInstruction_MountedVolume) KubernetesClaimName

func (t *RunInstruction_MountedVolume) KubernetesClaimName() string

func (*RunInstruction_MountedVolume) KubernetesName

func (t *RunInstruction_MountedVolume) KubernetesName() string

type RunInstruction_MountedVolume_EmptyPersistentVolume

type RunInstruction_MountedVolume_EmptyPersistentVolume struct {
	*proto.RunInstruction_MountedVolume_EmptyPersistentVolume
	Volume *RunInstruction_MountedVolume
}

func (*RunInstruction_MountedVolume_EmptyPersistentVolume) HostPath

type RunInstruction_MountedVolume_SingleFile

type RunInstruction_MountedVolume_SingleFile struct {
	*proto.RunInstruction_MountedVolume_SingleFile
	Volume *RunInstruction_MountedVolume
}

func (*RunInstruction_MountedVolume_SingleFile) ConfigMapName

func (*RunInstruction_MountedVolume_SingleFile) HostFile

func (*RunInstruction_MountedVolume_SingleFile) HostFileBaseName

func (t *RunInstruction_MountedVolume_SingleFile) HostFileBaseName() string

type RunInstruction_RunType

type RunInstruction_RunType proto.RunInstruction_RunType

func (RunInstruction_RunType) AutoremovedContainer

func (t RunInstruction_RunType) AutoremovedContainer() bool

func (RunInstruction_RunType) DetachedContainer

func (t RunInstruction_RunType) DetachedContainer() bool

func (RunInstruction_RunType) Interactive

func (t RunInstruction_RunType) Interactive() bool

func (RunInstruction_RunType) LongRunning

func (t RunInstruction_RunType) LongRunning() bool

func (RunInstruction_RunType) Oneshot

func (t RunInstruction_RunType) Oneshot() bool

type Runtime

type Runtime proto.Runtime

func (Runtime) AnchorIdSuffix

func (t Runtime) AnchorIdSuffix() string

func (Runtime) IsDocker

func (t Runtime) IsDocker() bool

func (Runtime) IsKubernetes

func (t Runtime) IsKubernetes() bool

func (Runtime) String

func (t Runtime) String() string

type SingleRuntimeTask

type SingleRuntimeTask struct {
	*proto.Task
	Runtime  Runtime
	Document *Document
}

SingleRuntimeTask wraps a Task proto whose instructions are applicable to only one specific Runtime.

func NewSingleRuntimeTask

func NewSingleRuntimeTask(task *proto.Task, runtime Runtime, document *Document) *SingleRuntimeTask

func (*SingleRuntimeTask) AnchorId

func (t *SingleRuntimeTask) AnchorId() string

func (*SingleRuntimeTask) Instructions

func (t *SingleRuntimeTask) Instructions() []*TaskInstruction

type SingleRuntimeTaskGroup

type SingleRuntimeTaskGroup struct {
	*proto.TaskGroup
	Runtime  Runtime
	Document *Document
}

SingleRuntimeTaskGroup wraps a TaskGroup proto whose tasks are only applicable to one specific Runtime.

func (*SingleRuntimeTaskGroup) AnchorId

func (t *SingleRuntimeTaskGroup) AnchorId() string

func (*SingleRuntimeTaskGroup) Tasks

type Task

type Task struct {
	*proto.Task
	Document *Document
}

func (*Task) ForRuntime

func (t *Task) ForRuntime(runtime proto.Runtime) *SingleRuntimeTask

func (*Task) HasRuntime

func (t *Task) HasRuntime(runtime proto.Runtime) bool

type TaskGroup

type TaskGroup struct {
	*proto.TaskGroup
	Document *Document
}

func (*TaskGroup) ForRuntime

func (tg *TaskGroup) ForRuntime(runtime proto.Runtime) *SingleRuntimeTaskGroup

type TaskInstruction

type TaskInstruction struct {
	*proto.TaskInstruction
	Runtime  Runtime
	Document *Document
}

func (*TaskInstruction) Description

func (t *TaskInstruction) Description() string

func (*TaskInstruction) GetCopy

func (t *TaskInstruction) GetCopy() *CopyInstruction

func (*TaskInstruction) GetDockerfile

func (t *TaskInstruction) GetDockerfile() *DockerfileInstruction

func (*TaskInstruction) GetExec

func (t *TaskInstruction) GetExec() *ExecInstruction

func (*TaskInstruction) GetRun

func (t *TaskInstruction) GetRun() *RunInstruction

Jump to

Keyboard shortcuts

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