site

package
v0.0.0-...-b4f33a4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 {
	Settings *settings.Settings
	// 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 (*Site) GetSiteList

func (s *Site) GetSiteList(appDir string, checkRunningStatus bool, consoleOutput *console.Console) ([]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) LoadSite

func (s *Site) LoadSite(cmd *cobra.Command, commandsRequiringSite []string, startFlags settings.StartFlags, flagVerbose bool) error

func (*Site) OpenSite

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

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

func (*Site) RunWPCli

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

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

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.

type SiteInfo

type SiteInfo struct {
	Name, Path string
	Running    bool
}

Jump to

Keyboard shortcuts

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