Documentation ¶
Overview ¶
Package mwdd is used to interact a mwdd v2 setup
Copyright © 2020 Addshore ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Package mwdd is used to interact a mwdd v2 setup ¶
Copyright © 2020 Addshore ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func UserAndGroupForDockerExecution() string
- type DockerComposeCommand
- type DockerExecCommand
- type MWDD
- func (m MWDD) Directory() string
- func (m MWDD) DockerCompose(command DockerComposeCommand) error
- func (m MWDD) DockerComposeProjectName() string
- func (m MWDD) DockerComposeTTY(command DockerComposeCommand)
- func (m MWDD) DockerExec(command DockerExecCommand)
- func (m MWDD) DownWithVolumesAndOrphans(options exec.HandlerOptions)
- func (m MWDD) EnsureHostsFile()
- func (m MWDD) EnsureReady()
- func (m MWDD) Env() env.DotFile
- func (m MWDD) Exec(service string, commandAndArgs []string, options exec.HandlerOptions, ...)
- func (m MWDD) ExecNoOutput(service string, commandAndArgs []string, options exec.HandlerOptions) error
- func (m MWDD) Rm(services []string, options exec.HandlerOptions)
- func (m MWDD) RmVolumes(dcVolumes []string, options exec.HandlerOptions)
- func (m MWDD) Start(services []string, options exec.HandlerOptions)
- func (m MWDD) Stop(services []string, options exec.HandlerOptions)
- func (m MWDD) UpDetached(services []string, options exec.HandlerOptions)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerComposeCommand ¶
type DockerComposeCommand struct { Command string CommandArguments []string HandlerOptions exec.HandlerOptions }
DockerComposeCommand results in something like: `docker-compose <automatic project stuff> <command> <commandArguments>`
type DockerExecCommand ¶
type DockerExecCommand struct { DockerComposeService string Command []string WorkingDir string User string HandlerOptions exec.HandlerOptions }
DockerExecCommand to be run with Docker, which directly uses the docker SDK
type MWDD ¶
type MWDD string
MWDD representation of a mwdd v2 setup
func DefaultForUser ¶
func DefaultForUser() MWDD
DefaultForUser returns the default mwdd working directory for the user
func (MWDD) Directory ¶
Directory the directory containing the development environment
func (MWDD) DockerCompose ¶
func (m MWDD) DockerCompose(command DockerComposeCommand) error
DockerCompose runs any docker-compose command for the mwdd project with the correct project settings and all files loaded
func (MWDD) DockerComposeProjectName ¶
DockerComposeProjectName the name of the docker-compose project
func (MWDD) DockerComposeTTY ¶
func (m MWDD) DockerComposeTTY(command DockerComposeCommand)
DockerComposeTTY runs any docker-compose command for the mwdd project with the correct project settings and all files loaded in a TTY
func (MWDD) DockerExec ¶
func (m MWDD) DockerExec(command DockerExecCommand)
DockerExec runs a docker exec command using the docker SDK
func (MWDD) DownWithVolumesAndOrphans ¶
func (m MWDD) DownWithVolumesAndOrphans(options exec.HandlerOptions)
DownWithVolumesAndOrphans runs `docker-compose down --volumes --remove-orphans`
func (MWDD) EnsureHostsFile ¶
func (m MWDD) EnsureHostsFile()
EnsureHostsFile Make sure that a bunch of hosts that we will use are in the hosts file
func (MWDD) Exec ¶
func (m MWDD) Exec(service string, commandAndArgs []string, options exec.HandlerOptions, user string)
Exec runs `docker-compose exec -T <service> <commandAndArgs>`
func (MWDD) ExecNoOutput ¶
func (m MWDD) ExecNoOutput(service string, commandAndArgs []string, options exec.HandlerOptions) error
ExecNoOutput runs `docker-compose exec -T <service> <commandAndArgs>` with not output
func (MWDD) Rm ¶
func (m MWDD) Rm(services []string, options exec.HandlerOptions)
Rm runs `docker-compose rm --stop --force -v <services>`
func (MWDD) RmVolumes ¶
func (m MWDD) RmVolumes(dcVolumes []string, options exec.HandlerOptions)
RmVolumes runs `docker volume rm <volume names with docker-compose project prefixed>`
func (MWDD) Start ¶
func (m MWDD) Start(services []string, options exec.HandlerOptions)
Start runs `docker-compose start <services>`
func (MWDD) Stop ¶
func (m MWDD) Stop(services []string, options exec.HandlerOptions)
Stop runs `docker-compose stop <services>`
func (MWDD) UpDetached ¶
func (m MWDD) UpDetached(services []string, options exec.HandlerOptions)
UpDetached runs `docker-compose up -d <services>`
Directories ¶
Path | Synopsis |
---|---|
Package files for interacting packaged files and their counterparts on disk for a project directory Copyright © 2020 Addshore This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
Package files for interacting packaged files and their counterparts on disk for a project directory Copyright © 2020 Addshore This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |