site

package
v0.0.0-...-0144dd1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultType = "site"

Variables

This section is empty.

Functions

func Command

func Command(name string, arg ...string) *exec.Cmd

func Load

func Load(site *Site, kanaSettings *settings.Settings)

Types

type PluginInfo

type PluginInfo struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Update  string `json:"update"`
	Version string `json:"version"`
}

type Site

type Site struct {
	Named bool
	// contains filtered or unexported fields
}

func (*Site) EnsureDocker

func (s *Site) EnsureDocker(consoleOutput *console.Console) error

EnsureDocker Ensures Docker is available for commands that need it.

func (*Site) ExportDatabase

func (s *Site) ExportDatabase(args []string, consoleOutput *console.Console) (string, error)

func (*Site) ExportSiteConfig

func (s *Site) ExportSiteConfig(consoleOutput *console.Console) error

ExportSiteSConfig Saves the current running config to a file.

func (s *Site) GetSiteLink() (string, error)

GetSiteLink returns the link to the site.

func (*Site) GetSiteList

func (s *Site) GetSiteList(checkRunningStatus bool) ([]SiteInfo, error)

GetSiteList Returns a list of all Kana sites, their location and whether they're running.

func (*Site) ImportDatabase

func (s *Site) ImportDatabase(file string, preserve bool, replaceDomain string, consoleOutput *console.Console) error

func (*Site) IsSiteRunning

func (s *Site) IsSiteRunning() bool

IsSiteRunning Returns true if the site is up and running in Docker or false. Does not verify other errors.

func (*Site) IsXdebugRunning

func (s *Site) IsXdebugRunning(consoleOutput *console.Console) bool

IsXdebugRunning returns true if Xdebug is already running or false if not.

func (*Site) OpenSite

func (s *Site) OpenSite(openDatabaseFlag, openMailpitFlag, openSiteFlag, openAdminFlag bool, consoleOutput *console.Console) error

OpenSite Opens the current site in a browser if it is running.

func (*Site) StartSite

func (s *Site) StartSite(consoleOutput *console.Console) error

StartSite Starts a site, including Traefik if needed.

func (*Site) StartXdebug

func (s *Site) StartXdebug(consoleOutput *console.Console) error

StartXdebug installs and starts xdebug in the site's PHP container.

func (*Site) StopSite

func (s *Site) StopSite() error

StopSite Stops a full site, including Traefik if needed.

func (*Site) StopXdebug

func (s *Site) StopXdebug(consoleOutput *console.Console) error

StopXdebug stops Xdebug by restarting the WordPress containers.

func (*Site) WPCli

func (s *Site) WPCli(command []string, interactive bool, consoleOutput *console.Console) (statusCode int64, output string, err error)

RunWPCli Runs a wp-cli command returning it's output and any errors.

func (*Site) WordPress

func (s *Site) WordPress(command string, restart, root bool) (docker.ExecResult, error)

runCli Runs an arbitrary CLI command against the site's WordPress container.

type SiteInfo

type SiteInfo struct {
	Name, Path string
	Running    bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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