Documentation
¶
Overview ¶
Copyright © 2022 Shane Moore shane@shanemoore.me
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 © 2022 Shane Moore shane@shanemoore.me
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 © 2022 Shane Moore shane@shanemoore.me
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 © 2022 Shane Moore shane@shanemoore.me
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 ¶
- type AppPort
- type Build
- type CommandSlice
- type DevcontainerManifest
- func (m DevcontainerManifest) AbsDockerBuildContext() string
- func (m DevcontainerManifest) AbsDockerfile() string
- func (m DevcontainerManifest) Command() []string
- func (m DevcontainerManifest) ContainerCreateArgs(imageID string, workingDir string) []string
- func (m DevcontainerManifest) ContainerEnvSlice() []string
- func (m DevcontainerManifest) ContainerExecUser() string
- func (m DevcontainerManifest) ContainerName() string
- func (m DevcontainerManifest) ExposedPorts() nat.PortSet
- func (m DevcontainerManifest) ForwardedPorts() []uint16
- func (m DevcontainerManifest) GpgMounts() []string
- func (m DevcontainerManifest) ImageBuildArgs() []string
- func (m DevcontainerManifest) ImageTag() string
- func (manifest DevcontainerManifest) Mounts(workingDir string) []string
- func (m DevcontainerManifest) NetworkName() string
- func (m DevcontainerManifest) PodName() string
- func (m DevcontainerManifest) PortBindings() nat.PortMap
- func (m DevcontainerManifest) RemoteEnvSlice() []string
- func (m DevcontainerManifest) ShortHash() string
- func (m DevcontainerManifest) SocatContainerName() string
- func (m DevcontainerManifest) SshMounts() []string
- func (m DevcontainerManifest) WorkingDir(sublimeTextCompat bool) string
- type ForwardPorts
- type OnAutoForward
- type PortAttributes
- type Protocol
- type ShutdownAction
- type UserEnvProbe
- type WaitFor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandSlice ¶
type CommandSlice []string
func (*CommandSlice) UnmarshalJSON ¶
func (commandSlice *CommandSlice) UnmarshalJSON(bytes []byte) error
type DevcontainerManifest ¶
type DevcontainerManifest struct {
// Image or Dockerfile specific properties
Image string `json:"image"`
Dockerfile string `json:"dockerFile"`
Context string `json:"context"`
Build Build `json:"build"`
AppPort AppPort `json:"appPort"`
ContainerEnv map[string]string `json:"containerEnv"`
ContainerUser string `json:"containerUser"`
MountStrings []string `json:"mounts"`
WorkspaceMount string `json:"workspaceMount"`
WorkspaceFolder string `json:"workspaceFolder"`
RunArgs []string `json:"runArgs"`
// Docker compose specific properties
DockerComposeFile strslice.StrSlice `json:"dockerComposeFile"`
Service string `json:"service"`
RunServices string `json:"runServices"`
// General properties
Name string `json:"name"`
ForwardPorts ForwardPorts `json:"forwardPorts"`
PortsAttributes map[string]PortAttributes `json:"portsAttributes"`
OtherPortsAttributes map[string]PortAttributes `json:"otherPortsAttributes"`
RemoteEnv map[string]string `json:"remoteEnv"`
RemoteUser string `json:"remoteUser"`
UpdateRemoteUserUID bool `json:"updateRemoteUserUID"`
UserEnvProbe UserEnvProbe `json:"userEnvProbe"`
OverrideCommand bool `json:"overrideCommand"`
ShutdownAction ShutdownAction `json:"shutdownAction"`
//features -- currently in preview
// Lifecycle scripts
InitializeCommand CommandSlice `json:"initializeCommand"`
OnCreateCommand CommandSlice `json:"onCreateCommand"`
UpdateContentCommand CommandSlice `json:"updateContentCommand"`
PostCreateCommand CommandSlice `json:"postCreateCommand"`
PostStartCommand CommandSlice `json:"postStartCommand"`
PostAttachCommand CommandSlice `json:"postAttachCommand"`
WaitFor WaitFor `json:"waitFor"`
// Metadata (manually assigned, not marshalled)
ParentDirectory string
}
func (DevcontainerManifest) AbsDockerBuildContext ¶
func (m DevcontainerManifest) AbsDockerBuildContext() string
func (DevcontainerManifest) AbsDockerfile ¶
func (m DevcontainerManifest) AbsDockerfile() string
func (DevcontainerManifest) Command ¶
func (m DevcontainerManifest) Command() []string
func (DevcontainerManifest) ContainerCreateArgs ¶
func (m DevcontainerManifest) ContainerCreateArgs(imageID string, workingDir string) []string
func (DevcontainerManifest) ContainerEnvSlice ¶
func (m DevcontainerManifest) ContainerEnvSlice() []string
Might want to make this an Unmarshaler?
func (DevcontainerManifest) ContainerExecUser ¶
func (m DevcontainerManifest) ContainerExecUser() string
func (DevcontainerManifest) ContainerName ¶
func (m DevcontainerManifest) ContainerName() string
func (DevcontainerManifest) ExposedPorts ¶
func (m DevcontainerManifest) ExposedPorts() nat.PortSet
func (DevcontainerManifest) ForwardedPorts ¶
func (m DevcontainerManifest) ForwardedPorts() []uint16
func (DevcontainerManifest) GpgMounts ¶
func (m DevcontainerManifest) GpgMounts() []string
func (DevcontainerManifest) ImageBuildArgs ¶
func (m DevcontainerManifest) ImageBuildArgs() []string
func (DevcontainerManifest) ImageTag ¶
func (m DevcontainerManifest) ImageTag() string
func (DevcontainerManifest) Mounts ¶
func (manifest DevcontainerManifest) Mounts(workingDir string) []string
func (DevcontainerManifest) NetworkName ¶
func (m DevcontainerManifest) NetworkName() string
func (DevcontainerManifest) PodName ¶
func (m DevcontainerManifest) PodName() string
func (DevcontainerManifest) PortBindings ¶
func (m DevcontainerManifest) PortBindings() nat.PortMap
func (DevcontainerManifest) RemoteEnvSlice ¶
func (m DevcontainerManifest) RemoteEnvSlice() []string
Might want to make this an Unmarshaler?
func (DevcontainerManifest) ShortHash ¶
func (m DevcontainerManifest) ShortHash() string
func (DevcontainerManifest) SocatContainerName ¶
func (m DevcontainerManifest) SocatContainerName() string
func (DevcontainerManifest) SshMounts ¶
func (m DevcontainerManifest) SshMounts() []string
func (DevcontainerManifest) WorkingDir ¶
func (m DevcontainerManifest) WorkingDir(sublimeTextCompat bool) string
type ForwardPorts ¶
type ForwardPorts []string
func (*ForwardPorts) UnmarshalJSON ¶
func (forwardPorts *ForwardPorts) UnmarshalJSON(bytes []byte) error
type OnAutoForward ¶
type OnAutoForward string
const ( OnAutoForwardUndefined OnAutoForward = "" OnAutoForwardNotify OnAutoForward = "notify" OnAutoForwardOpenBrowser OnAutoForward = "openBrowser" OnAutoForwardOpenPreview OnAutoForward = "openPreview" OnAutoForwardSilent OnAutoForward = "silent" OnAutoForwardIgnore OnAutoForward = "ignore" )
type PortAttributes ¶
type PortAttributes struct {
Label string `json:"label"`
Protocol Protocol `json:"protocol"`
OnAutoForward OnAutoForward `json:"onAutoForward"`
RequireLocalPort bool `json:"requireLocalPort"`
ElevateIfNeeded bool `json:"elevateIfNeeded"`
}
type ShutdownAction ¶
type ShutdownAction string
const ( ShutdownActionUndefined ShutdownAction = "" ShutdownActionNone ShutdownAction = "none" ShutdownActionStopContainer ShutdownAction = "stopContainer" ShutdownActionStopCompose ShutdownAction = "stopCompose" )
type UserEnvProbe ¶
type UserEnvProbe string
const ( UserEnvProbeUndefined UserEnvProbe = "" UserEnvProbeNone UserEnvProbe = "none" UserEnvProbeInteractiveShell UserEnvProbe = "interactiveShell" UserEnvProbeLoginShell UserEnvProbe = "loginShell" UserEnvProbeLoginInteractiveShell UserEnvProbe = "loginInteractiveShell" )