cmd

package
v0.0.0-...-67f6d5d Latest Latest
Warning

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

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

Documentation

Overview

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 IBM Corporation and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const APIVersionV1 = "v1"
View Source
const ConfigFile = ".appsody-config.yaml"
View Source
const LatestVersionURL = "https://github.com/appsody/appsody/releases/latest"

Variables

View Source
var CONTROLLERVERSION string
View Source
var VERSION string

Functions

func AddLocalFileRepo

func AddLocalFileRepo(repoName string, repoFilePath string, config *RootCommandConfig) (string, error)

func ApplyTemplating

func ApplyTemplating(stackPath string, templateMetadata interface{}) error

ApplyTemplating - walks through the copied folder directory and applies a template using the previously created templateMetada to all files in the target directory

func BuildahBuild

func BuildahBuild(config *RootCommandConfig, args []string, logger appsodylogger) error

func CheckPrereqs

func CheckPrereqs(config *RootCommandConfig) error

CheckPrereqs checks the prerequisites to run the CLI

func CheckStackRequirements

func CheckStackRequirements(log *LoggingConfig, requirementArray map[string]string, buildah bool) error

Compares the minimum requirements of a stack against the user to determine whether they can use the stack or not.

func CheckValidSemver

func CheckValidSemver(version string) error

func ConvertLabelToKubeFormat

func ConvertLabelToKubeFormat(key string) (string, error)

func ConvertToValidProjectName

func ConvertToValidProjectName(projectDir string) (string, error)

ConvertToValidProjectName takes an existing string or directory path and returns a name that conforms to isValidContainerName rules

func CopyDir

func CopyDir(log *LoggingConfig, fromDir string, toDir string) error

CopyDir Copies folder from source destination to target destination

func CopyFile

func CopyFile(log *LoggingConfig, source string, dest string) error

CopyFile uses OS commands to copy a file from a source to a destination

func CreateLabelPairs

func CreateLabelPairs(labels map[string]string) []string

func CreateTemplateMap

func CreateTemplateMap(labels map[string]string, stackYaml StackYaml, imageNamespace string, imageRegistry string) (map[string]interface{}, error)

CreateTemplateMap - uses the git labels, stack.yaml, stackID and imageNamespace to create a map with all the necessary data needed for the template

func DockerBuild

func DockerBuild(config *RootCommandConfig, args []string, logger appsodylogger) error

func DockerRunAndListen

func DockerRunAndListen(config *RootCommandConfig, args []string, logger appsodylogger, interactive bool) (*exec.Cmd, error)

DockerRunAndListen runs a Docker command with arguments in args This function does NOT override the image registry (uses args as is)

func DockerRunBashCmd

func DockerRunBashCmd(options []string, image string, bashCmd string, config *RootCommandConfig) (string, error)

DockerRunBashCmd issues a shell command in a docker image, overriding its entrypoint Assume this is only used for Stack images

func Execute

func Execute(version string, controllerVersion string)

func ExecuteE

func ExecuteE(version string, controllerVersion string, projectDir string, outWriter, errWriter io.Writer, args []string) error

func Exists

func Exists(path string) (bool, error)

Checks whether an inode (it does not bother about file or folder) exists or not.

func ExtractDockerEnvFile

func ExtractDockerEnvFile(envFileName string) (map[string]string, error)

ExtractDockerEnvFile returns a map with the env vars specified in docker env file

func ExtractDockerEnvVars

func ExtractDockerEnvVars(dockerOptions string) (map[string]string, error)

ExtractDockerEnvVars returns a map with the env vars specified in docker options

func GenDeploymentYaml

func GenDeploymentYaml(log *LoggingConfig, appName string, imageName string, controllerImageName string, ports []string, pdir string, dockerMounts []string, dockerEnvVars map[string]string, depsMount string, dryrun bool) (fileName string, err error)

GenDeploymentYaml generates a simple yaml for a plaing K8S deployment

func GenRouteYaml

func GenRouteYaml(log *LoggingConfig, appName string, pdir string, port int, dryrun bool) (fileName string, err error)

GenRouteYaml returns the file name of a generated K8S Service yaml

func GenServiceYaml

func GenServiceYaml(log *LoggingConfig, appName string, ports []string, pdir string, dryrun bool) (fileName string, err error)

GenServiceYaml returns the file name of a generated K8S Service yaml

func GetEnvVar

func GetEnvVar(searchEnvVar string, config *RootCommandConfig) (string, error)

GetEnvVar obtains a Stack environment variable from the Stack image

func GetLabelsForStackImage

func GetLabelsForStackImage(stackID string, buildImage string, stackYaml StackYaml, config *RootCommandConfig) (map[string]string, error)

GetLabelsForStackImage - Gets labels associated with the stack image

func GetUpdateString

func GetUpdateString(osName string, version string, latest string) string

GetUpdateString Returns a format string to advise the user how to upgrade

func ImagePush

func ImagePush(log *LoggingConfig, imageToPush string, buildah bool, dryrun bool) error

ImagePush pushes a docker image to a docker registry (assumes that the user has done docker login)

func InitConfig

func InitConfig(config *RootCommandConfig) error

func IsEmptyDir

func IsEmptyDir(name string) bool

func IsValidKubernetesLabelValue

func IsValidKubernetesLabelValue(value string) (bool, error)

func IsValidProjectName

func IsValidProjectName(name string) (bool, error)

IsValidProjectName tests the given string against Appsody name rules. This common set of name rules for Appsody must comply to Kubernetes resource name, Kubernetes label value, and Docker container name rules. The current rules are: 1. Must start with a lowercase letter 2. Must contain only lowercase letters, digits, and dashes 3. Must end with a letter or digit 4. Must be 68 characters or less

func KubeApply

func KubeApply(log *LoggingConfig, fileToApply string, namespace string, dryrun bool) error

KubeApply issues kubectl apply -f <filename>

func KubeDelete

func KubeDelete(log *LoggingConfig, fileToApply string, namespace string, dryrun bool) error

KubeDelete issues kubectl delete -f <filename>

func KubeGet

func KubeGet(log *LoggingConfig, args []string, namespace string, dryrun bool) (string, error)

KubeGet issues kubectl get <arg>

func KubeGetDeploymentURL

func KubeGetDeploymentURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)

KubeGetDeploymentURL searches for an exposed hostname and port for the deployed service

func KubeGetKnativeURL

func KubeGetKnativeURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)

KubeGetKnativeURL issues kubectl get rt <service> -o jsonpath="{.status.url}" and prints the return URL

func KubeGetNodePortURL

func KubeGetNodePortURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)

KubeGetNodePortURL kubectl get svc <service> -o jsonpath=http://{.status.loadBalancer.ingress[0].hostname}:{.spec.ports[0].nodePort} and prints the return URL

func KubeGetRouteURL

func KubeGetRouteURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)

KubeGetRouteURL issues kubectl get svc <service> -o jsonpath=http://{.status.loadBalancer.ingress[0].hostname}:{.spec.ports[0].nodePort} and prints the return URL

func MoveDir

func MoveDir(log *LoggingConfig, fromDir string, toDir string) error

MoveDir moves a directory to another directory, even if they are on different partitions

func NormalizeImageName

func NormalizeImageName(imageName string) (string, error)

NormalizeImageName is a temporary fix for buildah workaround #676

func OverrideStackRegistry

func OverrideStackRegistry(override string, imageName string) (string, error)

OverrideStackRegistry allows you to change the image registry URL

func RunAppsodyCmdExec

func RunAppsodyCmdExec(args []string, workingDir string, rootConfig *RootCommandConfig) (string, error)

RunAppsodyCmdExec runs the appsody CLI with the given args in a new process The stdout and stderr are captured, printed, and returned args will be passed to the appsody command workingDir will be the directory the command runs in

func RunBuildahCommandAndListen

func RunBuildahCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, interactive bool) (*exec.Cmd, error)

func RunCommandAndListen

func RunCommandAndListen(config *RootCommandConfig, commandValue string, args []string, logger appsodylogger, interactive bool) (*exec.Cmd, error)

func RunDockerCmdExec

func RunDockerCmdExec(args []string) (string, error)

RunDockerCmdExec runs the docker command with the given args in a new process The stdout and stderr are captured, printed, and returned args will be passed to the docker command workingDir will be the directory the command runs in

func RunDockerCommandAndListen

func RunDockerCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, interactive bool) (*exec.Cmd, error)

func RunDockerCommandAndWait

func RunDockerCommandAndWait(config *RootCommandConfig, args []string, logger appsodylogger) error

func RunDockerInspect

func RunDockerInspect(log *LoggingConfig, imageName string) (string, error)

RunDockerInspect -TODO - this function should be removed. No one uses it, except the test. We are using inspectImage

func RunDockerVolumeList

func RunDockerVolumeList(log *LoggingConfig, volName string) (string, error)

RunDockerVolumeList lists all the volumes containing a certain string

func RunGit

func RunGit(log *LoggingConfig, workDir string, kargs []string, dryrun bool) (string, error)

RunGit runs a generic git

func RunGitConfigLocalRemoteOriginURL

func RunGitConfigLocalRemoteOriginURL(log *LoggingConfig, workDir string, upstream string, dryrun bool) (string, error)

RunGitConfigLocalRemoteOriginURL

func RunGitVersion

func RunGitVersion(log *LoggingConfig, workDir string, dryrun bool) (string, error)

RunGitVersion

func RunKube

func RunKube(log *LoggingConfig, kargs []string, dryrun bool) (string, error)

RunKube runs a generic kubectl command

func RunKubeCommandAndListen

func RunKubeCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, interactive bool) (*exec.Cmd, error)

func RunKubeDelete

func RunKubeDelete(log *LoggingConfig, args []string, dryrun bool) (string, error)

RunKubeDelete issues kubectl delete <args>

func RunKubeExec

func RunKubeExec(log *LoggingConfig, args []string, dryrun bool) (string, error)

RunKubeExec issues kubectl exec <arg>

func RunKubeGet

func RunKubeGet(log *LoggingConfig, args []string, dryrun bool) (string, error)

RunKubeGet issues kubectl get <arg>

func SeparateOutput

func SeparateOutput(cmd *exec.Cmd) (string, error)

func Targz

func Targz(log *LoggingConfig, source, target string) error

tar and zip a directory into .tar.gz

func TestBuild

func TestBuild(log *LoggingConfig, stack string, template string, projectDir string, rootConfig *RootCommandConfig) error

Simple test for appsody build command. A future enhancement would be to verify the image that gets built.

func TestInit

func TestInit(log *LoggingConfig, stack string, template string, projectDir string, rootConfig *RootCommandConfig) error

Simple test for appsody init command

func TestRun

func TestRun(log *LoggingConfig, stack string, template string, projectDir string, rootConfig *RootCommandConfig) error

Simple test for appsody run command. A future enhancement would be to verify the image that gets built.

func TestTest

func TestTest(log *LoggingConfig, stack string, template string, projectDir string, rootConfig *RootCommandConfig) error

Simple test for appsody build command. A future enhancement would be to verify the image that gets built.

func UserHomeDir

func UserHomeDir(log *LoggingConfig) string

UserHomeDir returns the current user's home directory or '.'

func ValidateHostNameAndPort

func ValidateHostNameAndPort(hostNameAndPort string) (bool, error)

ValidateHostNameAndPort validates that hostNameAndPort conform to the DNS naming conventions

Types

type CommitInfo

type CommitInfo struct {
	Author         string
	AuthorEmail    string
	Committer      string
	CommitterEmail string
	SHA            string
	Date           string
	URL            string
	Message        string
	// contains filtered or unexported fields
}

func RunGitGetLastCommit

func RunGitGetLastCommit(URL string, config *RootCommandConfig) (CommitInfo, error)

RunGitLog issues git log

type GitInfo

type GitInfo struct {
	Branch    string
	Upstream  string
	RemoteURL string

	ChangesMade bool
	Commit      CommitInfo
}

func GetGitInfo

func GetGitInfo(config *RootCommandConfig) (GitInfo, error)

RunGitFindBranch issues git status

type IndexOutputFormat

type IndexOutputFormat struct {
	APIVersion   string                   `yaml:"apiVersion" json:"apiVersion"`
	Generated    time.Time                `yaml:"generated" json:"generated"`
	Repositories []RepositoryOutputFormat `yaml:"repositories" json:"repositories"`
}

Type for outputting stacks of a repository in JSON and YAML

type IndexYaml

type IndexYaml struct {
	APIVersion string `yaml:"apiVersion"`
	Stacks     []IndexYamlStack
}

type IndexYamlStack

type IndexYamlStack struct {
	ID              string `yaml:"id"`
	Name            string `yaml:"name"`
	Version         string `yaml:"version"`
	Description     string `yaml:"description"`
	License         string `yaml:"license"`
	Language        string `yaml:"language"`
	Maintainers     []Maintainer
	DefaultTemplate string `yaml:"default-template"`
	Templates       []IndexYamlStackTemplate
	Requirements    StackRequirement `yaml:"requirements,omitempty"`
}

type IndexYamlStackTemplate

type IndexYamlStackTemplate struct {
	ID  string `yaml:"id"`
	URL string `yaml:"url"`
}

type LoggingConfig

type LoggingConfig struct {
	// define the logging levels
	Info       appsodylogger
	Warning    appsodylogger
	Error      appsodylogger
	Debug      appsodylogger
	Container  appsodylogger
	InitScript appsodylogger
	DockerLog  appsodylogger
	BuildahLog appsodylogger
}

func (*LoggingConfig) InitLogging

func (config *LoggingConfig) InitLogging(outWriter, errWriter io.Writer)

InitLogging initializes the logging configuration for a given RootCommandConfig. The initialization of klog is global and will only be performed once.

type Maintainer

type Maintainer struct {
	Name     string `yaml:"name"`
	Email    string `yaml:"email"`
	GithubID string `yaml:"github-id" mapstructure:"github-id"`
}

type NotAnAppsodyProject

type NotAnAppsodyProject string

func (NotAnAppsodyProject) Error

func (e NotAnAppsodyProject) Error() string

type OwnerReference

type OwnerReference struct {
	APIVersion         string `yaml:"apiVersion"`
	Kind               string `yaml:"kind"`
	BlockOwnerDeletion bool   `yaml:"blockOwnerDeletion"`
	Controller         bool   `yaml:"controller"`
	Name               string `yaml:"name"`
	UID                string `yaml:"uid"`
}

type ProjectConfig

type ProjectConfig struct {
	Stack           string
	ProjectName     string `mapstructure:"project-name"`
	ApplicationName string `mapstructure:"application-name"`
	Version         string
	Description     string
	License         string
	Maintainers     []Maintainer
}

type ProjectVersion

type ProjectVersion struct {
	APIVersion      string           `yaml:"apiVersion"`
	ID              string           `yaml:"id,omitempty"`
	Created         time.Time        `yaml:"created"`
	Name            string           `yaml:"name"`
	Home            string           `yaml:"home"`
	Version         string           `yaml:"version"`
	Description     string           `yaml:"description"`
	Keywords        []string         `yaml:"keywords"`
	Maintainers     []interface{}    `yaml:"maintainers"`
	Requirements    StackRequirement `yaml:"requirements,omitempty"`
	Icon            string           `yaml:"icon"`
	Digest          string           `yaml:"digest"`
	URLs            []string         `yaml:"urls"` //V1
	Templates       []Template       `yaml:"templates,omitempty"`
	DefaultTemplate string           `yaml:"default-template"`
}

type ProjectVersions

type ProjectVersions []*ProjectVersion

type RepoIndex

type RepoIndex struct {
	APIVersion string                     `yaml:"apiVersion"`
	Generated  time.Time                  `yaml:"generated"`
	Projects   map[string]ProjectVersions `yaml:"projects"`
	Stacks     []ProjectVersion           `yaml:"stacks"`
}

type RepoIndices

type RepoIndices map[string]*RepoIndex

RepoIndices maps repos to their RepoIndex (i.e. the projects in a repo)

type RepositoryEntry

type RepositoryEntry struct {
	Name      string `yaml:"name" json:"name"`
	URL       string `yaml:"url" json:"url"`
	IsDefault bool   `yaml:"default,omitempty" json:"default,omitempty"`
}

type RepositoryFile

type RepositoryFile struct {
	APIVersion   string             `yaml:"apiVersion" json:"apiVersion"`
	Generated    time.Time          `yaml:"generated" json:"generated"`
	Repositories []*RepositoryEntry `yaml:"repositories" json:"repositories"`
}

func NewRepoFile

func NewRepoFile() *RepositoryFile

func (*RepositoryFile) Add

func (r *RepositoryFile) Add(re ...*RepositoryEntry)

func (*RepositoryFile) GetDefaultRepoName

func (r *RepositoryFile) GetDefaultRepoName(rootConfig *RootCommandConfig) (string, error)

func (*RepositoryFile) GetIndices

func (r *RepositoryFile) GetIndices(log *LoggingConfig) (RepoIndices, error)

func (*RepositoryFile) GetRepo

func (r *RepositoryFile) GetRepo(name string) *RepositoryEntry

func (*RepositoryFile) Has

func (r *RepositoryFile) Has(name string) bool

func (*RepositoryFile) HasURL

func (r *RepositoryFile) HasURL(url string) bool

func (*RepositoryFile) Remove

func (r *RepositoryFile) Remove(name string, log *LoggingConfig)

func (*RepositoryFile) SetDefaultRepoName

func (r *RepositoryFile) SetDefaultRepoName(name string, defaultRepoName string, rootConfig *RootCommandConfig) (string, error)

func (*RepositoryFile) WriteFile

func (r *RepositoryFile) WriteFile(path string) error

type RepositoryOutputFormat

type RepositoryOutputFormat struct {
	Name   string  `yaml:"repositoryName" json:"repositoryName"`
	Stacks []Stack `yaml:"stacks" json:"stacks"`
}

type RootCommandConfig

type RootCommandConfig struct {
	*LoggingConfig

	CfgFile          string
	Dryrun           bool
	Verbose          bool
	CliConfig        *viper.Viper
	Buildah          bool
	ProjectConfig    *ProjectConfig
	ProjectDir       string
	UnsupportedRepos []string
	StackRegistry    string
	// contains filtered or unexported fields
}

type Stack

type Stack struct {
	ID          string     `yaml:"id,omitempty" json:"id,omitempty"`
	Version     string     `yaml:"version" json:"version"`
	Description string     `yaml:"description" json:"description"`
	Templates   []Template `yaml:"templates,omitempty" json:"templates,omitempty"`
	// contains filtered or unexported fields
}

type StackContainer

type StackContainer struct {
	ID string
	// contains filtered or unexported fields
}

StackContainer is our internal representation of the attributes of stack based container

type StackRequirement

type StackRequirement struct {
	Docker  string `yaml:"docker-version,omitempty"`
	Appsody string `yaml:"appsody-version,omitempty"`
	Buildah string `yaml:"buildah-version,omitempty"`
}

type StackYaml

type StackYaml struct {
	Name            string `yaml:"name"`
	Version         string `yaml:"version"`
	Description     string `yaml:"description"`
	License         string `yaml:"license"`
	Language        string `yaml:"language"`
	Maintainers     []Maintainer
	DefaultTemplate string            `yaml:"default-template"`
	TemplatingData  map[string]string `yaml:"templating-data"`
	Requirements    StackRequirement  `yaml:"requirements,omitempty"`
}

structs for parsing the yaml files

type Template

type Template struct {
	ID        string `yaml:"id" json:"id"`
	URL       string `yaml:"url" json:"url"`
	IsDefault bool   `yaml:"default,omitempty" json:"default,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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