mwdd

package
v0.0.0-...-e1fd696 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mwdd is used to interact a mwdd v2 setup

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

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAndGroupForDockerExecution

func UserAndGroupForDockerExecution() string

UserAndGroupForDockerExecution gets a user and group id combination for the current user that can be used for execution

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

func (m MWDD) Directory() string

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

func (m MWDD) DockerComposeProjectName() string

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) EnsureReady

func (m MWDD) EnsureReady()

EnsureReady ...

func (MWDD) Env

func (m MWDD) Env() env.DotFile

Env ...

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL