Documentation
¶
Index ¶
- Variables
- func CmdEnv() []string
- func CopyFiles(ctx context.Context, client *client.Client, override []string)
- func CreateCert()
- func DumpDB(ctx context.Context, client *client.Client, tables []string)
- func ExtractArchive(ctx context.Context, path string) error
- func FormatIgnoredPath() string
- func IsEnvExampleFileExists() bool
- func IsEnvFileExists() bool
- func LoadEnv()
- func TraefikRule(domains []DomainMapping) string
- func WebserverConfigDir(networkName string) string
- type CallMethod
- type DBSettings
- type DomainMapping
- type SSHClient
Constants ¶
This section is empty.
Variables ¶
var Domains []DomainMapping
Domains project domain model, derived from the DOMAINS variable
var Env *viper.Viper
Env Project variables
Functions ¶
func ExtractArchive ¶
ExtractArchive unzip the archive
func IsEnvExampleFileExists ¶
func IsEnvExampleFileExists() bool
IsEnvExampleFileExists checking for the existence of .env.example file
func IsEnvFileExists ¶
func IsEnvFileExists() bool
IsEnvFileExists checking for the existence of .env file
func TraefikRule ¶
func TraefikRule(domains []DomainMapping) string
TraefikRule build the traefik routing rule covering every domain of the project: the local domain and its subdomains, the nip.io domain and its subdomains.
The rule is passed to compose as the value of TRAEFIK_RULE, so backslashes are written once here: unlike the labels in the compose templates, the value is not re-parsed as YAML.
func WebserverConfigDir ¶
WebserverConfigDir directory holding the generated web server configuration of a project
Types ¶
type CallMethod ¶
type CallMethod struct{}
CallMethod to dynamically determine the function name
func (*CallMethod) BitrixAccess ¶
func (a *CallMethod) BitrixAccess()
BitrixAccess Change bitrix database accesses
func (*CallMethod) WordpressAccess ¶
func (a *CallMethod) WordpressAccess()
WordpressAccess Change WordPress database accesses
type DBSettings ¶
DBSettings database settings
func (DBSettings) DumpDataParams ¶
func (d DBSettings) DumpDataParams() string
DumpDataParams options for data dump
func (DBSettings) DumpDataTablesParams ¶
func (d DBSettings) DumpDataTablesParams() string
DumpDataTablesParams options for only tables dump
func (DBSettings) DumpTablesParams ¶
func (d DBSettings) DumpTablesParams() string
DumpTablesParams table dump options
func (DBSettings) FormatIgnoredTables ¶
func (d DBSettings) FormatIgnoredTables() string
FormatIgnoredTables Exclude tables from dump
type DomainMapping ¶
DomainMapping a single project domain and the document root it serves
func ParseDomains ¶
func ParseDomains(domains, hostName, defaultRoot, localIP string) ([]DomainMapping, error)
ParseDomains parse the DOMAINS variable into the project domain model. Every entry is either "<name>" or "<name>:<document-root>"; entries without an explicit document root inherit defaultRoot. An empty domains value yields a single entry built from hostName and defaultRoot, which keeps projects without DOMAINS working as before.