project

package
v0.0.0-...-ca49289 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Domains []DomainMapping

Domains project domain model, derived from the DOMAINS variable

Env Project variables

Functions

func CmdEnv

func CmdEnv() []string

CmdEnv Getting variables in the "key=value" format

func CopyFiles

func CopyFiles(ctx context.Context, client *client.Client, override []string)

CopyFiles Copying files from the server

func CreateCert

func CreateCert()

CreateCert create a certificate and key for the project

func DumpDB

func DumpDB(ctx context.Context, client *client.Client, tables []string)

DumpDB Database import from server

func ExtractArchive

func ExtractArchive(ctx context.Context, path string) error

ExtractArchive unzip the archive

func FormatIgnoredPath

func FormatIgnoredPath() string

FormatIgnoredPath Exclude path from tar

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 LoadEnv

func LoadEnv()

LoadEnv Get variables from .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

func WebserverConfigDir(networkName string) string

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

type DBSettings struct {
	Host, DataBase, Login, Password, Port string
	ExcludedTables                        []string
}

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

type DomainMapping struct {
	Name         string
	DocumentRoot string
	LocalDomain  string
	NipDomain    string
}

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.

type SSHClient

type SSHClient struct {
	*client.Client
}

SSHClient client ssh

func (SSHClient) ImportDB

func (c SSHClient) ImportDB(ctx context.Context) error

ImportDB Importing a database into a local container

Jump to

Keyboard shortcuts

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