Documentation
¶
Index ¶
- Constants
- func PortFormatPadding(ports []BoxPort) int
- 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
- 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 PortFormatPadding ¶ added in v0.8.0
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
CommonOpts *CommonBoxOptions
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
Ports []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 uint
const ( Docker BoxProvider = iota Kubernetes 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
Network struct {
Ports []string
}
}
func (*BoxV1) GenerateName ¶
func (*BoxV1) ImageVersion ¶
func (*BoxV1) NetworkPorts ¶
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.