Documentation ¶
Index ¶
Constants ¶
View Source
const ( ComposeConfigFilename = "compose_config" ComposeConfigLinkDstFilename = ".env" ComposeNameKey = "COMPOSE_NAME" )
View Source
const ( DockerComposeFileName = "docker-compose.yml" DockerComposeVolumeDelimiter = ":" )
View Source
const ( SeedFilename = "seed.yml" DevContainerFileName string = "devcontainer.json" )
View Source
const ( SkeletonFilename = "skeleton.yml" DockerFileDirectory = "./docker" )
View Source
const ( COMMON_COLLECTION_NAME_KEY = "common" ARGUMENTS_KEY = "arguments" VSCODE_DEVCONTAINER_KEY = ARGUMENTS_KEY + ".vscode_devcontainer" DEVCONTAINER_PROJECT_NAME_KEY = VSCODE_DEVCONTAINER_KEY + ".project_name" DEVCONTAINER_ATTACH_SERVICE_KEY = VSCODE_DEVCONTAINER_KEY + ".attach_service" DEVCONTAINER_SOURCE_PATH_KEY = VSCODE_DEVCONTAINER_KEY + ".source_path" DOCKER_COMPOSE_KEY = ARGUMENTS_KEY + ".docker_compose" DOCKER_COMPOSE_PROJECT_PREFIX_KEY = DOCKER_COMPOSE_KEY + ".project_prefix" DOCKER_COMPOSE_FILES_KEY = DOCKER_COMPOSE_KEY + ".files" VSCODE_EXTENSION_VOLUMES_KEY = DOCKER_COMPOSE_KEY + ".vscode_extension_volumes" VSCODE_NORMAL_EXTENSION_VOLUME_NAME_KEY = VSCODE_EXTENSION_VOLUMES_KEY + ".normal" VSCODE_INSIDER_EXTENSION_VOLUME_NAME_KEY = VSCODE_EXTENSION_VOLUMES_KEY + ".insider" )
TODO: rename const names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments yaml.Node
func (*Arguments) GetAttachServiceName ¶
func (*Arguments) UnmarshalYAML ¶
type Collection ¶
type Collections ¶
type Collections struct { Path string `yaml:"path"` List []Collection `yaml:"list"` }
type Configs ¶
type Configs struct { VSCodeDevcontainer yaml.Node `yaml:"vscode_devcontainer"` DockerCompose yaml.Node `yaml:"docker_compose,omitempty"` }
type DockerCompose ¶
type DockerCompose struct { Version string `yaml:"version"` Services map[string]DockerComposeService `yaml:"services"` Volumes DockerComposeRootVolume `yaml:"volumes,omitempty"` }
func ConvertDockerComposeYamlToStruct ¶
func ConvertDockerComposeYamlToStruct(root *yaml.Node) (*DockerCompose, error)
func (*DockerCompose) ConvertRelPathToAbs ¶
func (self *DockerCompose) ConvertRelPathToAbs(dirPath string) (*DockerCompose, error)
func (*DockerCompose) Write ¶
func (self *DockerCompose) Write(dirPath string) error
type DockerComposeConfig ¶
type DockerComposeConfig struct {
ComposeName string
}
func CreateComposeConfig ¶
func CreateComposeConfig(composeName string) *DockerComposeConfig
func (*DockerComposeConfig) GetFilepath ¶
func (self *DockerComposeConfig) GetFilepath(dirPath string) string
func (*DockerComposeConfig) Write ¶
func (self *DockerComposeConfig) Write(dirPath string) error
type DockerComposeRootVolume ¶
type DockerComposeService ¶
type DockerComposeService struct { Build DockerComposeServiceBuild `yaml:"build,omitempty"` WorkingDir string `yaml:"working_dir,omitempty"` Volumes []DockerComposeServiceVolume `yaml:"volumes,omitempty"` EntryPoint string `yaml:"entrypoint,omitempty"` Command string `yaml:"command,omitempty"` User string `yaml:"user,omitempty"` }
type DockerComposeServiceVolume ¶
type DockerComposeServiceVolume string
type Seed ¶
type Seed struct { Version string `yaml:"version"` Variables yaml.Node `yaml:"variables"` Configs Configs `yaml:"configs"` }
func GetCommonSeedData ¶
func (*Seed) FilterDockerCompose ¶
func (self *Seed) FilterDockerCompose()
func (*Seed) GetComposeProjectPrefix ¶
func (*Seed) WriteDevcontainer ¶
func (*Seed) WriteDockerCompose ¶
func (*Seed) WriteToFile ¶
type Skeleton ¶
type Skeleton struct { Version string `yaml:"version"` Arguments Arguments `yaml:"arguments"` Collections Collections `yaml:"collections"` }
func LoadSkeleton ¶
Click to show internal directories.
Click to hide internal directories.