commands

package
v0.3.24-beta Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ShellCommand is the command which is called in the ShellContainer.
	ShellCommand []string

	// DefaultShellCommand is the default shell for the container (the first element in ShellCommand).
	DefaultShellCommand string

	// ShellContainer is the container used for shell command.
	ShellContainer string

	// ShellUser represents the user of the container.
	ShellUser string
)

Functions

func BlackfireCmd

func BlackfireCmd(cmd *cobra.Command, args []string) error

BlackfireCmd represents the blackfire command.

func BootstrapCmd

func BootstrapCmd() error

BootstrapCmd represents the bootstrap command.

func CheckAndCreateLocalAppDirs

func CheckAndCreateLocalAppDirs() error

func CheckAndInstallMutagen

func CheckAndInstallMutagen() error

CheckAndInstallMutagen checks if mutagen is available. If not, it's going to install mutagen.

func CheckIfInstalled

func CheckIfInstalled() error

CheckIfInstalled returns an error if the application is not yet installed.

func DBBuildDockerComposeCommand

func DBBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)

DBBuildDockerComposeCommand builds up the docker-compose command's templates.

func DBConnectCmd

func DBConnectCmd(cmd *cobra.Command, args []string) error

DBConnectCmd connects to the environment's database container.

func DBDumpCmd

func DBDumpCmd(cmd *cobra.Command, args []string) error

DBDumpCmd dumps the database from the environment's database container.

func DBImportCmd

func DBImportCmd(cmd *cobra.Command, args []string) error

DBImportCmd imports a database from stdin to the environment's database container.

func DBRunDockerCompose

func DBRunDockerCompose(args []string, suppressOsStdOut ...bool) error

DBRunDockerCompose function is a wrapper around the docker-compose command.

It appends the current directory and current project name to the args.
It also changes the output if the OS StdOut is suppressed.

func DBRunDockerComposeCommandModifyStdin

func DBRunDockerComposeCommandModifyStdin(args []string, suppressOsStdOut ...bool) (string, error)

DBRunDockerComposeCommandModifyStdin runs the passed parameters with docker-compose and returns the output.

func DBRunDockerComposeWithConfig

func DBRunDockerComposeWithConfig(
	args []string, details compose.ConfigDetails, suppressOsStdOut ...bool,
) (string, error)

DBRunDockerComposeWithConfig calls docker-compose with the previously built docker-compose configuration.

func DebugCmd

func DebugCmd(cmd *cobra.Command, args []string) error

DebugCmd opens a shell in the debug container.

func EnvBuildDockerComposeCommand

func EnvBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)

EnvBuildDockerComposeCommand builds up the docker-compose command by passing it the previously built templates.

func EnvBuildDockerComposeTemplate

func EnvBuildDockerComposeTemplate(t *template.Template, templateList *list.List) error

EnvBuildDockerComposeTemplate builds the templates which are used to invoke docker-compose.

func EnvCheck

func EnvCheck() error

EnvCheck returns an error if the env name is empty (.env file does not contain an env name).

func EnvCmd

func EnvCmd(args []string) error

EnvCmd build up the contents for the env command.

func EnvInitCmd

func EnvInitCmd(cmd *cobra.Command, args []string) error

EnvInitCmd creates a .env file for envType based on envName.

func EnvRunDockerCompose

func EnvRunDockerCompose(args []string, suppressOsStdOut ...bool) error

EnvRunDockerCompose function is a wrapper around the docker-compose command.

It appends the current directory and current project name to the args.
It also changes the output if the OS StdOut is suppressed.

func InstallCmd

func InstallCmd() error

InstallCmd represents the install command.

func InstallMutagen

func InstallMutagen() error

InstallMutagen installs mutagen.

func InstallMutagenForWindows

func InstallMutagenForWindows() error

InstallMutagenForWindows installs mutagen for Windows.

func IsContainerChanged

func IsContainerChanged(container string) bool

IsContainerChanged returns true if the container's state is not "running" or the container's ID is changed since

the last sync session.

func SelfUpdateCmd

func SelfUpdateCmd(cmd *cobra.Command) error

SelfUpdateCmd represents the self-update command.

func SetDefaultShellCommand

func SetDefaultShellCommand(containerName string)

SetDefaultShellCommand changes the command invoked by reward shell command.

func SetShellContainer

func SetShellContainer(envType string)

SetShellContainer changes the container used for the reward shell command.

func SetShellUser

func SetShellUser(containerName string)

SetShellUser changes the user of the reward shell command.

func SetSyncSettings

func SetSyncSettings()

SetSyncSettings sets the settings for synchronization.

func SetSyncedContainer

func SetSyncedContainer(name string)

SetSyncedContainer sets the synced container.

func SetSyncedDir

func SetSyncedDir(s string)

SetSyncedDir sets the directory to be synchronized with mutagen.

func ShellCmd

func ShellCmd(cmd *cobra.Command, args []string) error

ShellCmd opens a shell in the environment's default application container.

func SignCertificateCmd

func SignCertificateCmd(args []string, dontAskRecreate ...bool) error

SignCertificateCmd represents the sign-certificate command.

func SvcBuildDockerComposeCommand

func SvcBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)

SvcBuildDockerComposeCommand builds up the docker-compose command by passing it the previously built templates for the common services..

func SvcBuildDockerComposeTemplate

func SvcBuildDockerComposeTemplate(t *template.Template, templateList *list.List) error

SvcBuildDockerComposeTemplate builds the templates which are used to invoke docker-compose for the common services.

func SvcCmd

func SvcCmd(args []string) error

SvcCmd builds up the contents for the svc command.

func SvcGenerateTraefikConfig

func SvcGenerateTraefikConfig() error

SvcGenerateTraefikConfig generates the default traefik configuration.

func SvcGenerateTraefikDynamicConfig

func SvcGenerateTraefikDynamicConfig() error

SvcGenerateTraefikDynamicConfig generates the dynamic traefik configuration.

func SvcRunDockerCompose

func SvcRunDockerCompose(args []string, suppressOsStdOut ...bool) error

SvcRunDockerCompose function is a wrapper around the docker-compose command.

It appends the current directory and current project name to the args.
It also changes the output if the OS StdOut is suppressed.

func SyncCheck

func SyncCheck() error

SyncCheck checks if mutagen configuration is ok. If it doesn't exist, this function is going to generate one.

func SyncFlushCmd

func SyncFlushCmd() error

SyncFlushCmd represents the sync flush command.

func SyncListCmd

func SyncListCmd(suppressOsStdOut ...bool) (string, error)

SyncListCmd represents the sync list command.

func SyncMonitorCmd

func SyncMonitorCmd() error

SyncMonitorCmd represents the sync monitor command.

func SyncPauseCmd

func SyncPauseCmd() error

SyncPauseCmd represents the sync pause command.

func SyncResetCmd

func SyncResetCmd() error

SyncResetCmd represents the sync reset command.

func SyncResumeCmd

func SyncResumeCmd() error

SyncResumeCmd represents the sync resume command.

func SyncStartCmd

func SyncStartCmd() error

SyncStartCmd represents the sync start command.

func SyncStopCmd

func SyncStopCmd() error

SyncStopCmd represents the sync stop command.

func SyncedContainer

func SyncedContainer() string

SyncedContainer returns the name of the container which is used for syncing.

func SyncedDir

func SyncedDir() string

SyncedDir returns the directory which is synchronized with mutagen.

func ValidEnvTypes

func ValidEnvTypes() []string

ValidEnvTypes return a list of valid environment types based on the predefined EnvTypes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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