Documentation ¶
Overview ¶
Copyright © 2021 Srihari Vishnu srihari.vishnu@gmail.com
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 © 2021 Srihari Vishnu srihari.vishnu@gmail.com
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 © 2021 Srihari Vishnu srihari.vishnu@gmail.com
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 © 2021 SRIHARI VISHNU srihari.vishnu@gmail.com
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 © 2021 Srihari Vishnu srihari.vishnu@gmail.com
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 © 2021 NAME HERE <EMAIL ADDRESS>
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 CheckError(err error)
- func Execute()
- func GetUserBoolean(prompt string, a ...interface{}) (bool, error)
- func GetUserString(prompt string, a ...interface{}) (string, error)
- func NewCleanCommand(cli dockerClient) *cobra.Command
- func NewCreateCommand(cli dockerClient) *cobra.Command
- func NewEnterCommand(cli dockerClient) *cobra.Command
- func NewListCommand(cli dockerClient) *cobra.Command
- func NewRootCmd(cli dockerClient) *cobra.Command
- func NewTreeCommand(cli dockerClient) *cobra.Command
- func RunCleanCommand(cli dockerClient, cleanOptions CleanOptions) error
- func RunCreateCommand(cli dockerClient, createOptions CreateOptions) error
- func RunEnterCommand(cli dockerClient, enterOptions EnterOptions) error
- func RunListCommand(cli dockerClient, listOptions ListOptions) (string, error)
- func RunTreeCommand(cli dockerClient, treeOptions TreeOptions) error
- func SetUpStreamer(resp types.HijackedResponse) hijackedIOStreamer
- type ByValue
- type CleanOptions
- type CreateOptions
- type EnterOptions
- type ForestPrintOptions
- type Image
- type ImageForest
- type ImageNode
- type ListOptions
- type Pair
- type TreeOptions
Constants ¶
const HIDDEN_DIRECTORY = ".dockbox"
const PREFIX = "dockbox"
Variables ¶
var ExtensionToLanguage = map[string]string{}/* 798 elements not displayed */
https://github.com/jonschlinkert/lang-map/blob/master/lib/exts.json
var IgnoredFilesForAnalysis = []string{".git/*"}
var LanguageToImageMapper = map[string]Image{ "python": { "python:3.8-slim-buster", []string{"pip install -r requirements.txt"}, "/bin/bash", }, "javascript": { "node:14", []string{"npm install"}, "/bin/bash", }, "c++": { "ubuntu:18.04", []string{"apt-get update && apt-get install -y build-essential"}, "/bin/bash", }, "c": { "ubuntu:18.04", []string{"apt-get update && apt-get install -y build-essential"}, "/bin/bash", }, "java": { "openjdk:7", []string{}, "/bin/bash", }, "go": { "golang:1.16.5-buster", []string{}, "/bin/bash", }, "unknown": { "ubuntu:18.04", []string{}, "/bin/bash", }, }
Functions ¶
func CheckError ¶
func CheckError(err error)
func GetUserBoolean ¶
func GetUserString ¶
func NewCleanCommand ¶
func NewCreateCommand ¶
createCmd represents the create command
func NewEnterCommand ¶
enterCmd represents the enter command
func NewListCommand ¶
func NewRootCmd ¶
rootCmd represents the base command when called without any subcommands
func NewTreeCommand ¶
treeCmd represents the tree command
func RunCleanCommand ¶
func RunCleanCommand(cli dockerClient, cleanOptions CleanOptions) error
func RunCreateCommand ¶
func RunCreateCommand(cli dockerClient, createOptions CreateOptions) error
func RunEnterCommand ¶
func RunEnterCommand(cli dockerClient, enterOptions EnterOptions) error
func RunListCommand ¶
func RunListCommand(cli dockerClient, listOptions ListOptions) (string, error)
func RunTreeCommand ¶
func RunTreeCommand(cli dockerClient, treeOptions TreeOptions) error
func SetUpStreamer ¶
func SetUpStreamer(resp types.HijackedResponse) hijackedIOStreamer
Types ¶
type CleanOptions ¶
type CleanOptions struct {
// contains filtered or unexported fields
}
type CreateOptions ¶
type CreateOptions struct {
// contains filtered or unexported fields
}
type EnterOptions ¶
type EnterOptions struct {
// contains filtered or unexported fields
}
type ForestPrintOptions ¶
type ForestPrintOptions struct {
// contains filtered or unexported fields
}
type ImageForest ¶
type ImageForest struct { IDToNode map[string]*ImageNode // contains filtered or unexported fields }
func (*ImageForest) PrintForest ¶
func (forest *ImageForest) PrintForest(printOptions ForestPrintOptions)
type ImageNode ¶
type ImageNode struct { ID string // contains filtered or unexported fields }
func (*ImageNode) PrintTree ¶
func (node *ImageNode) PrintTree(printOptions ForestPrintOptions)
type ListOptions ¶
type ListOptions struct {
// contains filtered or unexported fields
}
type TreeOptions ¶
type TreeOptions struct {
All bool
}