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 © 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
- Variables
- func AddLocalFileRepo(repoName string, repoFilePath string, config *RootCommandConfig) (string, error)
- func ApplyTemplating(stackPath string, templateMetadata interface{}) error
- func BuildahBuild(config *RootCommandConfig, args []string, logger appsodylogger) error
- func CheckPrereqs(config *RootCommandConfig) error
- func CheckStackRequirements(log *LoggingConfig, requirementArray map[string]string, buildah bool) error
- func CheckValidSemver(version string) error
- func ConvertLabelToKubeFormat(key string) (string, error)
- func ConvertToValidProjectName(projectDir string) (string, error)
- func CopyDir(log *LoggingConfig, fromDir string, toDir string) error
- func CopyFile(log *LoggingConfig, source string, dest string) error
- func CreateLabelPairs(labels map[string]string) []string
- func CreateTemplateMap(labels map[string]string, stackYaml StackYaml, imageNamespace string, ...) (map[string]interface{}, error)
- func DockerBuild(config *RootCommandConfig, args []string, logger appsodylogger) error
- func DockerRunAndListen(config *RootCommandConfig, args []string, logger appsodylogger, ...) (*exec.Cmd, error)
- func DockerRunBashCmd(options []string, image string, bashCmd string, config *RootCommandConfig) (string, error)
- func DockerTag(log *LoggingConfig, imageToTag string, tag string, dryrun bool) error
- func Execute(version string, controllerVersion string)
- func ExecuteE(version string, controllerVersion string, projectDir string, ...) error
- func Exists(path string) (bool, error)
- func ExtractDockerEnvVars(dockerOptions string) map[string]string
- func GenDeploymentYaml(log *LoggingConfig, appName string, imageName string, ...) (fileName string, err error)
- func GenRouteYaml(log *LoggingConfig, appName string, pdir string, port int, dryrun bool) (fileName string, err error)
- func GenServiceYaml(log *LoggingConfig, appName string, ports []string, pdir string, dryrun bool) (fileName string, err error)
- func GetEnvVar(searchEnvVar string, config *RootCommandConfig) (string, error)
- func GetLabelsForStackImage(stackID string, buildImage string, stackYaml StackYaml, ...) (map[string]string, error)
- func GetUpdateString(osName string, version string, latest string) string
- func ImagePush(log *LoggingConfig, imageToPush string, buildah bool, dryrun bool) error
- func InitConfig(config *RootCommandConfig) error
- func IsEmptyDir(name string) bool
- func IsValidKubernetesLabelValue(value string) (bool, error)
- func IsValidProjectName(name string) (bool, error)
- func KubeApply(log *LoggingConfig, fileToApply string, namespace string, dryrun bool) error
- func KubeDelete(log *LoggingConfig, fileToApply string, namespace string, dryrun bool) error
- func KubeGet(log *LoggingConfig, args []string, namespace string, dryrun bool) (string, error)
- func KubeGetDeploymentURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)
- func KubeGetKnativeURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)
- func KubeGetNodePortURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)
- func KubeGetRouteURL(log *LoggingConfig, service string, namespace string, dryrun bool) (url string, err error)
- func MoveDir(log *LoggingConfig, fromDir string, toDir string) error
- func NormalizeImageName(imageName string) (string, error)
- func OverrideStackRegistry(override string, imageName string) (string, error)
- func RunAppsodyCmdExec(args []string, workingDir string) (string, error)
- func RunBuildahCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, ...) (*exec.Cmd, error)
- func RunCommandAndListen(config *RootCommandConfig, commandValue string, args []string, ...) (*exec.Cmd, error)
- func RunDockerCmdExec(args []string) (string, error)
- func RunDockerCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, ...) (*exec.Cmd, error)
- func RunDockerCommandAndWait(config *RootCommandConfig, args []string, logger appsodylogger) error
- func RunDockerInspect(log *LoggingConfig, imageName string) (string, error)
- func RunDockerVolumeList(log *LoggingConfig, volName string) (string, error)
- func RunGit(log *LoggingConfig, workDir string, kargs []string, dryrun bool) (string, error)
- func RunGitConfigLocalRemoteOriginURL(log *LoggingConfig, workDir string, upstream string, dryrun bool) (string, error)
- func RunGitVersion(log *LoggingConfig, workDir string, dryrun bool) (string, error)
- func RunKube(log *LoggingConfig, kargs []string, dryrun bool) (string, error)
- func RunKubeCommandAndListen(config *RootCommandConfig, args []string, logger appsodylogger, ...) (*exec.Cmd, error)
- func RunKubeDelete(log *LoggingConfig, args []string, dryrun bool) (string, error)
- func RunKubeExec(log *LoggingConfig, args []string, dryrun bool) (string, error)
- func RunKubeGet(log *LoggingConfig, args []string, dryrun bool) (string, error)
- func SeparateOutput(cmd *exec.Cmd) (string, error)
- func Targz(log *LoggingConfig, source, target string) error
- func TestBuild(log *LoggingConfig, stack string, template string, projectDir string) error
- func TestInit(log *LoggingConfig, stack string, template string, projectDir string) error
- func TestRun(log *LoggingConfig, stack string, template string, projectDir string) error
- func TestTest(log *LoggingConfig, stack string, template string, projectDir string) error
- func UserHomeDir(log *LoggingConfig) string
- func ValidateHostNameAndPort(hostNameAndPort string) (bool, error)
- type CommitInfo
- type GitInfo
- type IndexOutputFormat
- type IndexYaml
- type IndexYamlStack
- type IndexYamlStackTemplate
- type LoggingConfig
- type Maintainer
- type NotAnAppsodyProject
- type OwnerReference
- type ProjectConfig
- type ProjectVersion
- type ProjectVersions
- type RepoIndex
- type RepoIndices
- type RepositoryEntry
- type RepositoryFile
- func (r *RepositoryFile) Add(re ...*RepositoryEntry)
- func (r *RepositoryFile) GetDefaultRepoName(rootConfig *RootCommandConfig) (string, error)
- func (r *RepositoryFile) GetIndices(log *LoggingConfig) (RepoIndices, error)
- func (r *RepositoryFile) GetRepo(name string) *RepositoryEntry
- func (r *RepositoryFile) Has(name string) bool
- func (r *RepositoryFile) HasURL(url string) bool
- func (r *RepositoryFile) Remove(name string)
- func (r *RepositoryFile) SetDefaultRepoName(name string, defaultRepoName string, rootConfig *RootCommandConfig) (string, error)
- func (r *RepositoryFile) WriteFile(path string) error
- type RepositoryOutputFormat
- type RootCommandConfig
- type Stack
- type StackContainer
- type StackRequirement
- type StackYaml
- type Template
Constants ¶
const APIVersionV1 = "v1"
const ConfigFile = ".appsody-config.yaml"
const LatestVersionURL = "https://github.com/appsody/appsody/releases/latest"
Variables ¶
var CONTROLLERVERSION string
var VERSION string
Functions ¶
func AddLocalFileRepo ¶
func AddLocalFileRepo(repoName string, repoFilePath string, config *RootCommandConfig) (string, error)
func ApplyTemplating ¶
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 ConvertToValidProjectName ¶
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 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 DockerTag ¶
func DockerTag(log *LoggingConfig, imageToTag string, tag string, dryrun bool) error
DockerTag tags a docker image
func ExtractDockerEnvVars ¶
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 ¶
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 IsValidProjectName ¶
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 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 ¶
NormalizeImageName is a temporary fix for buildah workaround #676
func OverrideStackRegistry ¶
OverrideStackRegistry allows you to change the image registry URL
func RunAppsodyCmdExec ¶
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 RunCommandAndListen ¶
func RunDockerCmdExec ¶
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 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 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 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 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) 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) error
Simple test for appsody init command
func TestRun ¶
func TestRun(log *LoggingConfig, stack string, template string, projectDir string) 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) 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 ¶
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 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 NotAnAppsodyProject ¶
type NotAnAppsodyProject string
func (NotAnAppsodyProject) Error ¶
func (e NotAnAppsodyProject) Error() string
type OwnerReference ¶
type ProjectConfig ¶
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 ¶
RepoIndices maps repos to their RepoIndex (i.e. the projects in a repo)
type RepositoryEntry ¶
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)
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 RootCommandConfig ¶
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 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
Source Files ¶
- build.go
- build_delete.go
- build_setup.go
- completion.go
- debug.go
- deploy.go
- deploy_delete.go
- dev_common.go
- docker_commands.go
- docs.go
- extract.go
- git_utils.go
- init.go
- list.go
- operator.go
- operator_install.go
- operator_uninstall.go
- operator_utils.go
- ps.go
- repo.go
- repo_add.go
- repo_list.go
- repo_remove.go
- repo_set_default.go
- root.go
- run.go
- stack.go
- stack_addtorepo.go
- stack_create.go
- stack_lint.go
- stack_lint_dockerfile_stack.go
- stack_package.go
- stack_validate.go
- stack_validate_utils.go
- stack_yaml_lint.go
- stop.go
- test.go
- utils.go
- version.go