Documentation
¶
Index ¶
- Variables
- func AppendEnvironmentTemplates(t *template.Template, templateList *list.List, partialName string) error
- func AppendMutagenTemplates(t *template.Template, templateList *list.List, partialName string) error
- func AppendTemplatesFromPaths(t *template.Template, templateList *list.List, paths []string) error
- func AppendTemplatesFromPathsStatic(t *template.Template, templateList *list.List, paths []string) error
- func ArgumentRequiredError(op string) error
- func AskForConfirmation(msg string, suppressMessage ...bool) bool
- func BlackfireCmd(cmd *cobra.Command, args []string) error
- func BootstrapCmd() error
- func CannotFindContainerError(op string) error
- func CheckAndInstallMutagen() error
- func CheckCaCertificateExistInDir(caDir string, dontAskRecreate ...bool) bool
- func CheckDocker() error
- func CheckDockerNetworkExist(networkName string) (bool, error)
- func CheckExitCodeOfCommand(command string) int
- func CheckFileExists(file string) bool
- func CheckFileExistsAndRecreate(file string) bool
- func CheckIfInstalled() error
- func CheckRegexInFile(regex, filePath string) (bool, error)
- func CheckRegexInString(regex, str string) bool
- func Cleanup() error
- func ContainsString(slice []string, val string) bool
- func ConvertTemplateToComposeConfig(t *template.Template, templateList *list.List) (compose.ConfigDetails, error)
- func CreateCaCertificate(caDir string) error
- func CreateDir(dir string, perms ...int) error
- func CreateDirAndWriteBytesToFile(bytes []byte, file string, perms ...int) error
- func CreatePrivKeyAndCertificate(certDir string, certName string, dnsNames []string, ...) error
- func CreateSignedCertificate(c certificateComponents) ([]byte, error)
- func DBBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)
- func DBConnectCmd(cmd *cobra.Command, args []string) error
- func DBDumpCmd(cmd *cobra.Command, args []string) error
- func DBImportCmd(cmd *cobra.Command, args []string) error
- func DBRunDockerCompose(args []string, suppressOsStdOut ...bool) error
- func DBRunDockerComposeCommandModifyStdin(args []string, suppressOsStdOut ...bool) (string, error)
- func DBRunDockerComposeWithConfig(args []string, details compose.ConfigDetails, suppressOsStdOut ...bool) (string, error)
- func DebugCmd(cmd *cobra.Command, args []string) error
- func DockerComposeCompleter() ...
- func DockerComposeVersionMismatchError(op string) error
- func DockerPeeredServices(action, networkName string) error
- func DockerVersionMismatchError(op string) error
- func EncodeRSAPrivateKeyToPEM(privateKey *rsa.PrivateKey) ([]byte, error)
- func EnvBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)
- func EnvBuildDockerComposeTemplate(t *template.Template, templateList *list.List) error
- func EnvCheck() error
- func EnvCmd(args []string) error
- func EnvInitCmd(cmd *cobra.Command, args []string) error
- func EnvRunDockerCompose(args []string, suppressOsStdOut ...bool) error
- func EvalSymlinkPath(file string) (string, error)
- func ExecuteTemplate(t *template.Template, buffer io.Writer) error
- func ExtractUnknownArgs(flags *pflag.FlagSet, args []string) []string
- func FileNotFoundError(op string) error
- func GenerateAndSaveSSHKeys(bitSize int, pathToSave string) error
- func GenerateMutagenTemplateFileIfNotExist() error
- func GenerateRSAPrivateKey(bitSize int) (*rsa.PrivateKey, error)
- func GenerateSSHPublicKey(publicKey *rsa.PublicKey) ([]byte, error)
- func GetAppHomeDir() string
- func GetAppVersion() *version.Version
- func GetBlackfireCommand() string
- func GetBlackfireContainer() string
- func GetCaCertificateFilePath(caDir string) (string, error)
- func GetCaPrivKeyFilePath(caDir string) (string, error)
- func GetContainerIDByName(containerName string) (string, error)
- func GetContainerStateByName(containerName string) (string, error)
- func GetCwd() string
- func GetDBCommand() string
- func GetDBContainer() string
- func GetDBDumpCommand() string
- func GetEnvName() string
- func GetEnvNetworkName() string
- func GetEnvType() string
- func GetHomeDir() string
- func GetMagentoBackendFrontname() string
- func GetMagentoVersion() *version.Version
- func GetMagentoVersionFromViper() *version.Version
- func GetMutagenSyncFile() string
- func GetMutagenSyncIgnore() string
- func GetOSDistro() string
- func GetServiceDomain() string
- func GetSyncedContainer() string
- func GetSyncedDir() string
- func GetTraefikDomain() string
- func GetTraefikFullDomain() string
- func GetTraefikSubdomain() string
- func GetValidEnvTypes() []string
- func GetWebRoot() string
- func InsertStringAfterOccurrence(args []string, insertStr, searchStr string) []string
- func InsertStringBeforeOccurrence(args []string, insertStr, searchStr string) []string
- func InstallCmd() error
- func InstallMutagen() error
- func InstallMutagenForWindows() error
- func IsAdmin() bool
- func IsAllowedSuperuser() bool
- func IsBlackfireEnabled() bool
- func IsCommandAvailable(name string) bool
- func IsContainerChanged(container string) bool
- func IsContainerRunning(container string) bool
- func IsDBEnabled() bool
- func IsDebug() bool
- func IsMutagenSyncEnabled() bool
- func IsServiceEnabled(service string) bool
- func IsSingleWebContainer() bool
- func IsWSL2DirectMount() bool
- func LookupContainerAddressInNetwork(containerName, networkName string) (string, error)
- func LookupContainerGatewayInNetwork(containerName, networkName string) (string, error)
- func NewDockerClient() (*client.Client, error)
- func Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error)
- func ResolveDomainToTraefik() bool
- func RunDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)
- func RunDockerComposeWithConfig(args []string, details compose.ConfigDetails, suppressOsStdOut ...bool) (string, error)
- func RunMeElevated()
- func RunOsCommand(args string, suppressOsStdOut ...bool) (string, error)
- func SelfUpdateCmd(cmd *cobra.Command) error
- func SetDefaultShellCommand(s string)
- func SetShellContainer(s string)
- func SetSyncSettingsByEnvType()
- func SetSyncedContainer(s string)
- func SetSyncedDir(s string)
- func ShellCmd(cmd *cobra.Command, args []string) error
- func SignCertificateCmd(args []string, dontAskRecreate ...bool) error
- func SvcBuildDockerComposeCommand(args []string, suppressOsStdOut ...bool) (string, error)
- func SvcBuildDockerComposeTemplate(t *template.Template, templateList *list.List) error
- func SvcCmd(args []string) error
- func SvcEnabledPermissive(s string) bool
- func SvcEnabledStrict(name string) bool
- func SvcGenerateTraefikConfig() error
- func SvcGenerateTraefikDynamicConfig() error
- func SvcRunDockerCompose(args []string, suppressOsStdOut ...bool) error
- func SyncCheck() error
- func SyncFlushCmd() error
- func SyncListCmd(suppressOsStdOut ...bool) (string, error)
- func SyncMonitorCmd() error
- func SyncPauseCmd() error
- func SyncResetCmd() error
- func SyncResumeCmd() error
- func SyncStartCmd() error
- func SyncStopCmd() error
Constants ¶
This section is empty.
Variables ¶
var ( // FS is a Memory Map Filesystem. FS = afero.NewOsFs() // AFS is the implementation of Afero Filesystem. AFS = &afero.Afero{Fs: FS} )
var ( // ErrEmptyDirName occurs when directory name is empty. ErrEmptyDirName = errors.New("empty directory name") // ErrFileWithThisDirNameExist occurs when file already exist. ErrFileWithThisDirNameExist = errors.New("file with the same name exists") // ErrFileNotFound occurs when file is not found. ErrFileNotFound = errors.New("file not found") // ErrUnknownEnvType occurs when an unknown environment type is specified. ErrUnknownEnvType = errors.New("unknown env type") // ErrUnknownAction occurs when an unknown actions is called. ErrUnknownAction = errors.New("unknown action error") // ErrDockerIsNotRunning occurs when Docker is not running or Docker version is too old and the application cannot // call Docker API. ErrDockerIsNotRunning = errors.New("docker is not running or docker version is too old") // ErrDockerVersionMismatch occurs when Docker version is too old. ErrDockerVersionMismatch = errors.New("docker version is too old") // ErrDockerComposeVersionMismatch occurs when docker-compose version is too old. ErrDockerComposeVersionMismatch = errors.New("docker-compose version is too old") // ErrEnvNameIsInvalid occurs when the environment name is invalid. It should be a valid hostname. ErrEnvNameIsInvalid = errors.New("environment name is invalid, it should match RFC1178") // ErrEnvIsEmpty occurs when environment name is empty. ErrEnvIsEmpty = fmt.Errorf("env name is empty. please run `%v env-init`", AppName) // ErrCaCertDoesNotExist occurs when the Signing CA Certificate is not yet created. ErrCaCertDoesNotExist = fmt.Errorf( "the root CA certificate is missing, please run '%v install' and try again", AppName) // ErrCannotFindContainer occurs when the application cannot find the requested container. ErrCannotFindContainer = errors.New("container cannot be found") // ErrArgumentRequired occurs when the function is called without a required argument. ErrArgumentRequired = errors.New("argument required") // ErrInvokedAsRootUser occurs when the Application was called by Root user. ErrInvokedAsRootUser = errors.New("In most cases, you should not run " + AppName + " as root user except for `self-update`. " + "If you are sure you want to do this, use " + strings.ToUpper(AppName) + "_ALLOW_SUPERUSER=1.") )
var ( // ShellCommand is the command which is called in the ShellContainer. ShellCommand []string // ShellContainer is the container used for shell command. ShellContainer string )
var ( // AppName is the lowercase Application Name, used globally. AppName = strings.ToLower(appname) )
Functions ¶
func AppendEnvironmentTemplates ¶
func AppendEnvironmentTemplates(t *template.Template, templateList *list.List, partialName string) error
AppendEnvironmentTemplates tries to look up all the templates dedicated for an environment type.
func AppendMutagenTemplates ¶
func AppendMutagenTemplates(t *template.Template, templateList *list.List, partialName string) error
AppendMutagenTemplates is going to add mutagen configuration templates.
func AppendTemplatesFromPaths ¶
AppendTemplatesFromPaths appends templates to t from templateList list searching them in paths path list. If it cannot find templates it's not going to fail. If a template with the same name already exists, it's going to skip that template.
func AppendTemplatesFromPathsStatic ¶
func AppendTemplatesFromPathsStatic(t *template.Template, templateList *list.List, paths []string) error
AppendTemplatesFromPathsStatic appends templates to t from templateList list searching them in paths path list. This function looks up templates built to the application's binary (static files). If it cannot find templates it's not going to fail. If a template with the same name already exists, it's going to skip that template.
func ArgumentRequiredError ¶
ArgumentRequiredError is a wrapper function for ErrArgumentRequired error.
func AskForConfirmation ¶
AskForConfirmation ask msg from the user and returns the answer.
func BlackfireCmd ¶
BlackfireCmd represents the blackfire command.
func CannotFindContainerError ¶
CannotFindContainerError is a wrapper function for ErrCannotFindContainer error.
func CheckAndInstallMutagen ¶
func CheckAndInstallMutagen() error
CheckAndInstallMutagen checks if mutagen is available. If not, it's going to install mutagen.
func CheckCaCertificateExistInDir ¶
CheckCaCertificateExistInDir checks if the CA Certificate PEM file already exists in Dir.
func CheckDockerNetworkExist ¶
CheckDockerNetworkExist returns true if the docker network exists.
func CheckExitCodeOfCommand ¶
CheckExitCodeOfCommand runs a command and returns its exit code.
func CheckFileExists ¶
CheckFileExists checks if the file already exists and ask the user if he'd like to recreate it.
func CheckFileExistsAndRecreate ¶
CheckFileExistsAndRecreate checks if the file already exists and ask the user if he'd like to recreate it.
If user input is yes - return false (as if the file does not existing).
func CheckIfInstalled ¶
func CheckIfInstalled() error
CheckIfInstalled returns an error if the application is not yet installed.
func CheckRegexInFile ¶
CheckRegexInFile checks if the file contains content.
func CheckRegexInString ¶
CheckRegexInString checks if the string contains content.
func ContainsString ¶
ContainsString checks if a slice of string contains a string.
func ConvertTemplateToComposeConfig ¶
func ConvertTemplateToComposeConfig(t *template.Template, templateList *list.List) (compose.ConfigDetails, error)
ConvertTemplateToComposeConfig iterates through all the templates and converts them to docker-compose configurations.
func CreateCaCertificate ¶
CreateCaCertificate creates a Private Key and a Signed CA Certificate in PEM format and writes to file.
func CreateDirAndWriteBytesToFile ¶
CreateDirAndWriteBytesToFile creates the base directory and writes bytes to a file in it.
func CreatePrivKeyAndCertificate ¶
func CreatePrivKeyAndCertificate(certDir string, certName string, dnsNames []string, caCertFilePath, caPrivKeyFilePath string) error
CreatePrivKeyAndCertificate creates a Private Key and a Certificate signed by caCertificate and writes to file in PEM format.
func CreateSignedCertificate ¶
func DBBuildDockerComposeCommand ¶
DBBuildDockerComposeCommand builds up the docker-compose command's templates.
func DBConnectCmd ¶
DBConnectCmd connects to the environment's database container.
func DBImportCmd ¶
DBImportCmd imports a database from stdin to the environment's database container.
func DBRunDockerCompose ¶
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 ¶
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 DockerComposeCompleter ¶
func DockerComposeCompleter() func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
DockerComposeCompleter returns a completer function for docker-compose.
func DockerComposeVersionMismatchError ¶
DockerComposeVersionMismatchError is a wrapper function for ErrDockerComposeVersionMismatch error.
func DockerPeeredServices ¶
DockerPeeredServices attaches/detaches the common services to the current environment's docker network.
func DockerVersionMismatchError ¶
DockerVersionMismatchError is a wrapper function for ErrDockerVersionMismatch error.
func EncodeRSAPrivateKeyToPEM ¶
func EncodeRSAPrivateKeyToPEM(privateKey *rsa.PrivateKey) ([]byte, error)
EncodeRSAPrivateKeyToPEM encodes Private Key from RSA to PEM format.
func EnvBuildDockerComposeCommand ¶
EnvBuildDockerComposeCommand builds up the docker-compose command by passing it the previously built templates.
func EnvBuildDockerComposeTemplate ¶
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 EnvInitCmd ¶
EnvInitCmd creates a .env file for envType based on envName.
func EnvRunDockerCompose ¶
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 EvalSymlinkPath ¶
EvalSymlinkPath checks if file exists and returns the resolved path if a symlink if file is a symlink,
else it returns the filepath.
func ExecuteTemplate ¶
ExecuteTemplate executes the templates, appending some specific template functions to the execution.
func ExtractUnknownArgs ¶
ExtractUnknownArgs returns []string arguments which are not used by pflags.
func FileNotFoundError ¶
FileNotFoundError is a wrapper function for ErrFileNotFound error.
func GenerateAndSaveSSHKeys ¶
GenerateAndSaveSSHKeys generates and writes SSH keys with bitSize and saves them to pathToSave.
func GenerateMutagenTemplateFileIfNotExist ¶
func GenerateMutagenTemplateFileIfNotExist() error
GenerateMutagenTemplateFileIfNotExist generates mutagen configuration from template if it doesn't exists.
func GenerateRSAPrivateKey ¶
func GenerateRSAPrivateKey(bitSize int) (*rsa.PrivateKey, error)
GenerateRSAPrivateKey creates a RSA Private Key of specified byte size.
func GenerateSSHPublicKey ¶
GenerateSSHPublicKey takes a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ...".
func GetAppHomeDir ¶
func GetAppHomeDir() string
GetAppHomeDir returns the application's home directory.
func GetAppVersion ¶
func GetAppVersion() *version.Version
GetAppVersion returns a version.Version object contains the application version.
func GetBlackfireCommand ¶
func GetBlackfireCommand() string
GetBlackfireCommand returns the command which is called when the application manipulates blackfire.
func GetBlackfireContainer ¶
func GetBlackfireContainer() string
GetBlackfireContainer returns the container name of the Blackfire debug container.
func GetCaCertificateFilePath ¶
GetCaCertificateFilePath returns the CA certificate path based on caDir.
func GetCaPrivKeyFilePath ¶
GetCaPrivKeyFilePath returns the CA privkey path based on caDir.
func GetContainerIDByName ¶
GetContainerIDByName returns a container ID of the containerName running in
the current environment.
func GetContainerStateByName ¶
GetContainerStateByName returns the container state of the containerName running in
the current environment.
func GetDBCommand ¶
func GetDBCommand() string
GetDBCommand returns the command which is called when the application manipulates the database.
func GetDBContainer ¶
func GetDBContainer() string
GetDBContainer returns the name of the database container.
func GetDBDumpCommand ¶
func GetDBDumpCommand() string
GetDBDumpCommand returns the command which is called when the application dumps a database.
func GetEnvName ¶
func GetEnvName() string
GetEnvName returns the environment name in lowercase format.
func GetEnvNetworkName ¶
func GetEnvNetworkName() string
GetEnvNetworkName returns the environments docker network name in lowercase format.
func GetEnvType ¶
func GetEnvType() string
GetEnvType returns the environment type in lowercase format.
func GetMagentoBackendFrontname ¶
func GetMagentoBackendFrontname() string
GetMagentoBackendFrontname returns Magento admin path from Viper settings.
func GetMagentoVersion ¶
func GetMagentoVersion() *version.Version
GetMagentoVersion returns a *version.Version object which contains the Magento version.
func GetMagentoVersionFromViper ¶
func GetMagentoVersionFromViper() *version.Version
GetMagentoVersionFromViper returns a *version.Version object from Viper settings. Note: If it's unset, it will return a dedicated latest version.
func GetMutagenSyncFile ¶
func GetMutagenSyncFile() string
GetMutagenSyncFile returns the file path of the mutagen sync file.
func GetMutagenSyncIgnore ¶
func GetMutagenSyncIgnore() string
GetMutagenSyncIgnore returns the additional mutagen ignored files from Viper settings.
func GetOSDistro ¶
func GetOSDistro() string
GetOSDistro returns the linux distro name if GOOS is linux, else "darwin" or "windows".
func GetServiceDomain ¶
func GetServiceDomain() string
GetServiceDomain returns the application's service domain.
func GetSyncedContainer ¶
func GetSyncedContainer() string
GetSyncedContainer returns the name of the container which is used for syncing.
func GetSyncedDir ¶
func GetSyncedDir() string
GetSyncedDir returns the directory which is synchronized with mutagen.
func GetTraefikDomain ¶
func GetTraefikDomain() string
GetTraefikDomain returns traefik domain from Viper settings.
func GetTraefikFullDomain ¶
func GetTraefikFullDomain() string
GetTraefikFullDomain returns traefik full domain (subdomain + domain merged).
func GetTraefikSubdomain ¶
func GetTraefikSubdomain() string
GetTraefikSubdomain returns traefik subdomain from Viper settings.
func GetValidEnvTypes ¶
func GetValidEnvTypes() []string
GetValidEnvTypes return a list of valid environment types based on the predefined EnvTypes.
func GetWebRoot ¶
func GetWebRoot() string
GetWebRoot returns the content of the WEB_ROOT variable from Viper settings.
func InsertStringAfterOccurrence ¶
InsertStringAfterOccurrence inserts insertStr after the occurrence of searchStr to args and returns args.
If searchStr is not exists it will append to the end of args.
func InsertStringBeforeOccurrence ¶
InsertStringBeforeOccurrence inserts insertStr before occurrence of searchStr (if exist) to args and returns args.
If searchStr is not exists it will append to the end of args.
func InstallMutagenForWindows ¶
func InstallMutagenForWindows() error
InstallMutagenForWindows installs mutagen for Windows.
func IsAllowedSuperuser ¶
func IsAllowedSuperuser() bool
IsAllowedSuperuser returns true if the application is allowed to be invoked by root.
func IsBlackfireEnabled ¶
func IsBlackfireEnabled() bool
IsBlackfireEnabled returns true if the blackfire container is enabled.
func IsCommandAvailable ¶
IsCommandAvailable returns if the parameter can be find in $PATH.
func IsContainerChanged ¶
IsContainerChanged returns true if the container's state is not "running" or the container's ID is changed since
the last sync session.
func IsContainerRunning ¶
IsContainerRunning returns true if container is running.
func IsDBEnabled ¶
func IsDBEnabled() bool
IsDBEnabled returns true if the database service is enabled for the current environment.
func IsMutagenSyncEnabled ¶
func IsMutagenSyncEnabled() bool
IsMutagenSyncEnabled returns true for macOS and Windows (if the WSL2 Direct Mount option is disabled).
func IsServiceEnabled ¶
IsServiceEnabled returns true if service is enabled in Viper settings.
func IsSingleWebContainer ¶
func IsSingleWebContainer() bool
IsSingleWebContainer returns true if Single Web Container setting is enabled in Viper settings.
func IsWSL2DirectMount ¶
func IsWSL2DirectMount() bool
IsWSL2DirectMount returns true if WSL2 Direct Mount setting is enabled in Viper settings.
func LookupContainerAddressInNetwork ¶
LookupContainerAddressInNetwork returns the container IP address in the specific network.
func LookupContainerGatewayInNetwork ¶
LookupContainerGatewayInNetwork returns the container IP address in the specific network.
func NewDockerClient ¶
NewDockerClient creates a docker client and return with it.
func Pipeline ¶
func Pipeline(cmds ...*exec.Cmd) (pipeLineOutput, collectedStandardError []byte, pipeLineError error)
Pipeline runs cmds piped after each other.
func ResolveDomainToTraefik ¶
func ResolveDomainToTraefik() bool
ResolveDomainToTraefik returns true if an environment's service containers should resolve their "main" domains to the Traefik container's address. If this is enabled, the nginx/php containers will be able to reach themselves through the traefik proxy.
func RunDockerComposeCommand ¶
RunDockerComposeCommand runs the passed parameters with docker-compose and returns the output.
func RunDockerComposeWithConfig ¶
func RunDockerComposeWithConfig( args []string, details compose.ConfigDetails, suppressOsStdOut ...bool) (string, error)
RunDockerComposeWithConfig calls docker-compose with the converted configuration settings (from templates).
func RunOsCommand ¶
RunOsCommand is going to run a command depending on the caller's operating system.
func SelfUpdateCmd ¶
SelfUpdateCmd represents the self-update command.
func SetDefaultShellCommand ¶
func SetDefaultShellCommand(s string)
SetDefaultShellCommand changes the command invoked by reward shell command.
func SetShellContainer ¶
func SetShellContainer(s string)
SetShellContainer changes the container used for the reward shell command.
func SetSyncSettingsByEnvType ¶
func SetSyncSettingsByEnvType()
SetSyncSettingsByEnvType sets the settings for synchronization.
func SetSyncedContainer ¶
func SetSyncedContainer(s string)
SetSyncedContainer sets the synced container.
func SetSyncedDir ¶
func SetSyncedDir(s string)
SetSyncedDir sets the directory to be synchronized with mutagen.
func SignCertificateCmd ¶
SignCertificateCmd represents the sign-certificate command.
func SvcBuildDockerComposeCommand ¶
SvcBuildDockerComposeCommand builds up the docker-compose command by passing it the previously built templates for the common services..
func SvcBuildDockerComposeTemplate ¶
SvcBuildDockerComposeTemplate builds the templates which are used to invoke docker-compose for the common services.
func SvcEnabledPermissive ¶
SvcEnabledPermissive returns true if the s service is enabled in Viper settings. This function is also going to return true if the service is not mentioned in Viper settings (defaults to true).
func SvcEnabledStrict ¶
SvcEnabledStrict returns true if the s service is enabled in Viper settings. This function is going to return false if the service is not mentioned in Viper settings (defaults to false).
func SvcGenerateTraefikConfig ¶
func SvcGenerateTraefikConfig() error
SvcGenerateTraefikConfig generates the default traefik configuration.
func SvcGenerateTraefikDynamicConfig ¶
func SvcGenerateTraefikDynamicConfig() error
SvcGenerateTraefikDynamicConfig generates the dynamic traefik configuration.
func SvcRunDockerCompose ¶
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 exists, this function is going to generate one.
func SyncListCmd ¶
SyncListCmd represents the sync list command.
func SyncMonitorCmd ¶
func SyncMonitorCmd() error
SyncMonitorCmd represents the sync monitor command.
Types ¶
This section is empty.