Documentation
¶
Index ¶
- Constants
- func BoxLabelSelector() string
- func PortFormatPadding(ports []BoxPort) int
- func SplitEnvironmentVariable(keyValue string) (string, string, error)
- func ToBoxTemplateName(boxName string) string
- type BoxClientOptions
- type BoxDetails
- type BoxEnv
- type BoxInfo
- type BoxLabels
- func (l BoxLabels) AddGitLabels(size ResourceSize, path string, commit string) BoxLabels
- func (l BoxLabels) AddLocalLabels(size ResourceSize, path string) BoxLabels
- func (l BoxLabels) ToCachedTemplateInfo() *CachedTemplateInfo
- func (l BoxLabels) ToGitTemplateInfo() *GitTemplateInfo
- func (l BoxLabels) ToSize() (ResourceSize, error)
- type BoxPort
- type BoxProvider
- type BoxProviderInfo
- type BoxStreams
- type BoxTemplateInfo
- type BoxV1
- func (box *BoxV1) EnvironmentVariableValues() []BoxEnv
- func (box *BoxV1) EnvironmentVariables() map[string]BoxEnv
- func (box *BoxV1) GenerateName() string
- func (box *BoxV1) HasPorts() bool
- func (box *BoxV1) ImageName() string
- func (box *BoxV1) ImageVersion() string
- func (box *BoxV1) NetworkPortValues(includeVirtual bool) []BoxPort
- func (box *BoxV1) NetworkPorts(includeVirtual bool) map[string]BoxPort
- func (box *BoxV1) Pretty() string
- type CachedTemplateInfo
- type CloudBoxOptions
- type CommonBoxOptions
- type ConnectOptions
- type CreateOptions
- type DockerBoxOptions
- type DockerProviderInfo
- type GitTemplateInfo
- type KubeBoxOptions
- type KubeProviderInfo
- type ResourceSize
Constants ¶
View Source
const ( BoxPrefixName = "box-" BoxShellNone = "none" // distroless BoxPortNone = "none" // runtime only when tunnelling )
View Source
const ( LabelSchemaKind = "com.hckops.schema.kind" LabelTemplateLocal = "com.hckops.template.local" LabelTemplateGit = "com.hckops.template.git" LabelTemplateGitUrl = "com.hckops.template.git.url" LabelTemplateGitRevision = "com.hckops.template.git.revision" LabelTemplateGitCommit = "com.hckops.template.git.commit" LabelTemplateGitDir = "com.hckops.template.git.dir" LabelTemplateGitName = "com.hckops.template.git.name" LabelTemplateCachePath = "com.hckops.template.cache.path" LabelBoxSize = "com.hckops.box.size" )
Variables ¶
This section is empty.
Functions ¶
func BoxLabelSelector ¶ added in v0.8.1
func BoxLabelSelector() string
func PortFormatPadding ¶ added in v0.8.0
func SplitEnvironmentVariable ¶ added in v0.8.1
func ToBoxTemplateName ¶
ToBoxTemplateName returns the strictly validated template name, or the original trimmed name
Types ¶
type BoxClientOptions ¶ added in v0.8.0
type BoxClientOptions struct {
Provider BoxProvider
DockerOpts *DockerBoxOptions
KubeOpts *KubeBoxOptions
CloudOpts *CloudBoxOptions
}
type BoxDetails ¶ added in v0.8.0
type BoxDetails struct {
Info BoxInfo
TemplateInfo *BoxTemplateInfo
ProviderInfo *BoxProviderInfo
Size ResourceSize
Env []BoxEnv // TODO map[string]BoxEnv
Ports []BoxPort // TODO map[string]BoxPort
Created time.Time
}
type BoxLabels ¶ added in v0.8.0
func NewGitLabels ¶ added in v0.8.0
func NewLocalLabels ¶ added in v0.8.0
func NewLocalLabels() BoxLabels
func (BoxLabels) AddGitLabels ¶ added in v0.8.0
func (l BoxLabels) AddGitLabels(size ResourceSize, path string, commit string) BoxLabels
func (BoxLabels) AddLocalLabels ¶ added in v0.8.0
func (l BoxLabels) AddLocalLabels(size ResourceSize, path string) BoxLabels
func (BoxLabels) ToCachedTemplateInfo ¶ added in v0.8.0
func (l BoxLabels) ToCachedTemplateInfo() *CachedTemplateInfo
func (BoxLabels) ToGitTemplateInfo ¶ added in v0.8.0
func (l BoxLabels) ToGitTemplateInfo() *GitTemplateInfo
func (BoxLabels) ToSize ¶ added in v0.8.0
func (l BoxLabels) ToSize() (ResourceSize, error)
type BoxPort ¶
type BoxProvider ¶
type BoxProvider string
const ( Docker BoxProvider = "docker" Kubernetes BoxProvider = "kube" Cloud BoxProvider = "cloud" )
func (BoxProvider) String ¶ added in v0.7.0
func (p BoxProvider) String() string
type BoxProviderInfo ¶ added in v0.8.0
type BoxProviderInfo struct {
Provider BoxProvider
DockerProvider *DockerProviderInfo
KubeProvider *KubeProviderInfo
}
type BoxStreams ¶
type BoxStreams struct {
In io.ReadCloser
Out io.Writer
Err io.Writer
IsTty bool // tty is false only for ssh tunnel
}
func NewDefaultStreams ¶ added in v0.8.0
func NewDefaultStreams(tty bool) *BoxStreams
type BoxTemplateInfo ¶ added in v0.8.0
type BoxTemplateInfo struct {
CachedTemplate *CachedTemplateInfo
GitTemplate *GitTemplateInfo
}
func (*BoxTemplateInfo) IsCached ¶ added in v0.8.0
func (info *BoxTemplateInfo) IsCached() bool
type BoxV1 ¶
type BoxV1 struct {
Kind string
Name string
Tags []string
Image struct {
Repository string
Version string
}
Shell string
Env []string
Network struct {
Ports []string
}
}
func (*BoxV1) EnvironmentVariableValues ¶ added in v0.8.1
func (*BoxV1) EnvironmentVariables ¶ added in v0.8.1
TODO return error validation?
func (*BoxV1) GenerateName ¶
func (*BoxV1) ImageVersion ¶
func (*BoxV1) NetworkPortValues ¶ added in v0.8.1
func (*BoxV1) NetworkPorts ¶
TODO return error validation?
type CachedTemplateInfo ¶ added in v0.8.0
type CachedTemplateInfo struct {
Path string
}
type CloudBoxOptions ¶ added in v0.8.0
type CommonBoxOptions ¶ added in v0.8.0
func NewCommonBoxOpts ¶ added in v0.8.0
func NewCommonBoxOpts() *CommonBoxOptions
type ConnectOptions ¶ added in v0.8.0
type CreateOptions ¶ added in v0.8.0
type CreateOptions struct {
Template *BoxV1
Size ResourceSize
Labels BoxLabels
}
type DockerBoxOptions ¶ added in v0.8.0
type DockerProviderInfo ¶ added in v0.8.0
type GitTemplateInfo ¶ added in v0.8.0
type KubeBoxOptions ¶ added in v0.8.0
type KubeProviderInfo ¶ added in v0.8.0
type KubeProviderInfo struct {
Namespace string
}
type ResourceSize ¶ added in v0.8.0
type ResourceSize uint
const ( ExtraSmall ResourceSize = iota Small Medium Large ExtraLarge )
func ExistResourceSize ¶ added in v0.8.0
func ExistResourceSize(value string) (ResourceSize, error)
func (ResourceSize) String ¶ added in v0.8.0
func (size ResourceSize) String() string
func (ResourceSize) ToKubeResource ¶ added in v0.8.0
func (size ResourceSize) ToKubeResource() *kubernetes.KubeResource
Click to show internal directories.
Click to hide internal directories.