Versions in this module Expand all Collapse all v2 v2.0.2 Jan 16, 2024 Changes in this version + const VolumeAccessModeReadOnly + const VolumeAccessModeReadWrite + func EnvVar(key string) string + func EnvVarInDocker(key string) string + func GetDockerfileTemplate(d Dockerfile) string + type DockerCompose struct + Services Services + Version string + func NewDockerCompose() *DockerCompose + func (dc DockerCompose) AddService(name string, s *Service) *DockerCompose + type Dockerfile struct + Add map[string]string + Cmd []string + EntryPoint []string + Env map[string]string + Expose []string + From string + Image string + Label map[string]string + Run string + Volume []string + WorkDir string + func (d *Dockerfile) String() string + func (d Dockerfile) AddContent(from string, to string) *Dockerfile + func (d Dockerfile) AddEnv(key string, value string) *Dockerfile + func (d Dockerfile) AddLabel(label string, content string) *Dockerfile + func (d Dockerfile) WithCmd(cmd ...string) *Dockerfile + func (d Dockerfile) WithExpose(exposes ...string) *Dockerfile + func (d Dockerfile) WithVolume(volumes ...string) *Dockerfile + func (d Dockerfile) WithWorkDir(dir string) *Dockerfile + type Image struct + Name string + Version string + func ParseImageString(s string) (*Image, error) + func (i *Image) UnmarshalYAML(unmarshal func(interface{}) error) error + func (i Image) MarshalYAML() (interface{}, error) + func (i Image) String() string + func (image Image) IsZero() bool + type Link struct + Host string + Service string + func ParseLinkString(s string) (*Link, error) + func (link *Link) UnmarshalYAML(unmarshal func(interface{}) error) error + func (link Link) MarshalYAML() (interface{}, error) + func (link Link) String() string + type MaybeListString struct + func MaybeListStringFromStringList(list ...string) MaybeListString + func (v *MaybeListString) UnmarshalYAML(unmarshal func(interface{}) error) error + func (v MaybeListString) IsZero() bool + func (v MaybeListString) MarshalYAML() (interface{}, error) + func (v MaybeListString) Value() []string + type Port struct + ContainerPort int16 + Port int16 + Protocol Protocol + func ParsePortString(s string) (*Port, error) + func (port *Port) UnmarshalYAML(unmarshal func(interface{}) error) error + func (port Port) MarshalYAML() (interface{}, error) + func (port Port) String() string + type Protocol string + const ProtocolTCP + const ProtocolUDP + type Service struct + Command MaybeListString + Dns []string + DnsSearch []string + EntryPoint MaybeListString + Environment map[string]string + ExternalLinks []Link + Image Image + Labels map[string]string + Links []Link + MemLimit *int64 + MemReservation *int64 + MemSwapLimit *int64 + Ports []Port + TTY *bool + Volumes []Volume + VolumesFrom []Volume + WorkingDir string + func NewService(image string) *Service + func (service Service) AddDns(dns string, dnsSearch string) *Service + func (service Service) AddExternalLink(s string, host string) *Service + func (service Service) AddLink(s string, host string) *Service + func (service Service) AddROVolume(nameOrLocalPath string, mountPath string) *Service + func (service Service) AddRWVolume(nameOrLocalPath string, mountPath string) *Service + func (service Service) AddTCPPort(port int16, containerPort int16) *Service + func (service Service) AddUDPPort(port int16, containerPort int16) *Service + func (service Service) AddVolumeFrom(name string, accessMode VolumeAccessMode) *Service + func (service Service) EnableTTY() *Service + func (service Service) Merge(nextService *Service) *Service + func (service Service) SetCommand(commands ...string) *Service + func (service Service) SetEnvironment(key string, value string) *Service + func (service Service) SetLabel(key string, value string) *Service + func (service Service) WithImage(image string) *Service + type Services map[string]*Service + func (v *Services) UnmarshalYAML(unmarshal func(interface{}) error) error + type Volume struct + AccessMode VolumeAccessMode + LocalPath string + MountPath string + Name string + func ParseVolumeString(s string) (*Volume, error) + func (v *Volume) UnmarshalYAML(unmarshal func(interface{}) error) error + func (v Volume) IsMountFromLocal() bool + func (v Volume) IsMountFromStorage() bool + func (v Volume) IsProvider() bool + func (v Volume) MarshalYAML() (interface{}, error) + func (v Volume) ReadOnly() bool + func (v Volume) String() string + type VolumeAccessMode string Other modules containing this package gitee.com/eden-framework/eden-framework