Documentation
¶
Index ¶
- Constants
- func AddBoxSize(labels commonModel.Labels, size ResourceSize) commonModel.Labels
- func BoxLabelSelector() string
- func NewBoxLabels() commonModel.Labels
- func PortFormatPadding(ports []BoxPort) int
- func ToBoxTemplateName(boxName string) string
- func ToEnvironmentVariables(values []string) map[string]BoxEnv
- type BoxClientOptions
- type BoxDetails
- type BoxEnv
- type BoxInfo
- type BoxPort
- type BoxProvider
- type BoxProviderInfo
- 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) MainContainerName() string
- func (box *BoxV1) NetworkPortValues(includeVirtual bool) []BoxPort
- func (box *BoxV1) NetworkPorts(includeVirtual bool) map[string]BoxPort
- func (box *BoxV1) Pretty() string
- type CommonBoxOptions
- type ConnectOptions
- type CreateOptions
- type ResourceSize
Constants ¶
View Source
const ( BoxPrefixName = "box-" BoxShellNone = "none" // distroless BoxPortNone = "none" // runtime only when tunnelling )
View Source
const (
LabelBoxSize = "com.hckops.box.size"
)
Variables ¶
This section is empty.
Functions ¶
func AddBoxSize ¶ added in v0.9.0
func AddBoxSize(labels commonModel.Labels, size ResourceSize) commonModel.Labels
func BoxLabelSelector ¶ added in v0.8.1
func BoxLabelSelector() string
func NewBoxLabels ¶ added in v0.9.0
func NewBoxLabels() commonModel.Labels
func PortFormatPadding ¶ added in v0.8.0
func ToBoxTemplateName ¶
ToBoxTemplateName returns the strictly validated template name, or the original trimmed name
func ToEnvironmentVariables ¶ added in v0.9.0
Types ¶
type BoxClientOptions ¶ added in v0.8.0
type BoxClientOptions struct { Provider BoxProvider DockerOpts *commonModel.DockerOptions KubeOpts *commonModel.KubeOptions CloudOpts *commonModel.CloudOptions }
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 BoxPort ¶
type BoxProvider ¶
type BoxProvider string
const ( Docker BoxProvider = model.DockerProvider Kubernetes BoxProvider = model.KubernetesProvider Cloud BoxProvider = model.CloudProvider )
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 *commonModel.DockerProviderInfo KubeProvider *commonModel.KubeProviderInfo }
type BoxTemplateInfo ¶ added in v0.8.0
type BoxTemplateInfo struct { CachedTemplate *commonModel.CachedTemplateInfo GitTemplate *commonModel.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 commonModel.Image Shell string Env []string Network struct { Ports []string } }
func (*BoxV1) EnvironmentVariableValues ¶ added in v0.8.1
func (*BoxV1) EnvironmentVariables ¶ added in v0.8.1
func (*BoxV1) GenerateName ¶
func (*BoxV1) MainContainerName ¶ added in v0.12.1
func (*BoxV1) NetworkPortValues ¶ added in v0.8.1
func (*BoxV1) NetworkPorts ¶
TODO return error validation?
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 ConnectOptions struct { Template *BoxV1 StreamOpts *commonModel.StreamOptions Name string DisableExec bool DisableTunnel bool DeleteOnExit bool OnInterruptCallback func(func()) }
type CreateOptions ¶ added in v0.8.0
type CreateOptions struct { Template *BoxV1 Labels commonModel.Labels CommonInfo commonModel.CommonInfo Size ResourceSize }
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 ToBoxSize ¶ added in v0.9.0
func ToBoxSize(labels commonModel.Labels) (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.