settings

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DynamicToml string
View Source
var KanaWordPressPlugin string
View Source
var SubDirectoryMultisiteHtaccess string
View Source
var SubDomainMultisiteHtaccess string
View Source
var TraefikToml string

Functions

func GetDefaultPermissions

func GetDefaultPermissions() (dirPerms, filePerms int)

GetDefaultPermissions returns the default directory permissions and the default file permissions.

func TrustSSL

func TrustSSL(consoleOutput *console.Console) error

TrustSSL Adds the Kana certificate to the Apple Keychain.

func VerifySSLTrust

func VerifySSLTrust() error

VerifySSLTrust verifies the SSL certificate has been added to that Apple Keychain.

Types

type File

type File struct {
	Name, Template, LocalPath string
	Permissions               os.FileMode
}

type KanaPluginVars

type KanaPluginVars struct {
	SiteName, Version string
}

type LocalSettings

type LocalSettings struct {
	Local, Mailpit, Xdebug, SSL, WPDebug, Activate bool
	RemoveDefaultPlugins                           bool
	Type, DatabaseClient, Multisite                string
	Plugins                                        []string
}

type Settings

type Settings struct {
	Local, Xdebug, Mailpit, SSL, WPDebug, Activate bool
	RemoveDefaultPlugins                           bool
	ImageUpdateDays                                int
	AdminEmail, AdminPassword, AdminUsername       string
	AppDirectory, SiteDirectory, WorkingDirectory  string
	AppDomain, SiteDomain                          string
	Name                                           string
	PHP                                            string
	MariaDB                                        string
	RootCert, RootKey, SiteCert, SiteKey           string
	URL, Protocol                                  string
	Type                                           string
	DatabaseClient                                 string
	Multisite                                      string
	Plugins                                        []string
	// contains filtered or unexported fields
}

Settings Individual Settings for use throughout the app lifecycle.

func NewSettings

func NewSettings() (*Settings, error)

func (*Settings) EnsureKanaPlugin

func (s *Settings) EnsureKanaPlugin(appDir string) error

EnsureKanaPlugin ensures the Kana plugin file is in place and ready to go.

func (*Settings) EnsureSSLCerts

func (s *Settings) EnsureSSLCerts(consoleOutput *console.Console) error

EnsureSSLCerts Ensures SSL certificates have been generated and are where they need to be.

func (*Settings) EnsureStaticConfigFiles

func (s *Settings) EnsureStaticConfigFiles() error

EnsureStaticConfigFiles Ensures the application's static config files have been generated and are where they need to be.

func (*Settings) GetGlobalSetting

func (s *Settings) GetGlobalSetting(args []string) (string, error)

GetGlobalSetting Retrieves a global setting for the "config" command.

func (*Settings) GetHtaccess

func (s *Settings) GetHtaccess() string

func (*Settings) ListSettings

func (s *Settings) ListSettings(consoleOutput *console.Console)

ListSettings Lists all settings for the config command.

func (*Settings) LoadGlobalSettings

func (s *Settings) LoadGlobalSettings() error

LoadGlobalSettings gets config information that transcends sites such as app and default settings.

func (*Settings) LoadLocalSettings

func (s *Settings) LoadLocalSettings(cmd *cobra.Command) (bool, error)

LoadLocalSettings Loads the config for the current site being called.

func (*Settings) ProcessNameFlag

func (s *Settings) ProcessNameFlag(cmd *cobra.Command) (bool, error)

ProcessNameFlag Processes the name flag on the site resetting all appropriate local variables.

func (*Settings) ProcessStartFlags

func (s *Settings) ProcessStartFlags(cmd *cobra.Command, flags StartFlags)

ProcessStartFlags Process the start flags and save them to the settings object.

func (*Settings) SetGlobalSetting

func (s *Settings) SetGlobalSetting(args []string) error

SetGlobalSetting Sets a global setting for the "config" command.

func (*Settings) WriteLocalSettings

func (s *Settings) WriteLocalSettings(localSettings *LocalSettings) error

WriteLocalSettings Writes all appropriate local settings to the local config file.

type StartFlags

type StartFlags struct {
	Xdebug               bool
	WPDebug              bool
	Mailpit              bool
	Local                bool
	IsTheme              bool
	IsPlugin             bool
	SSL                  bool
	Activate             bool
	RemoveDefaultPlugins bool
	Multisite            string
}

Jump to

Keyboard shortcuts

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