settings

package
v0.0.0-...-97b3e3e Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: GPL-3.0 Imports: 25 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 AddStartFlags

func AddStartFlags(cmd *cobra.Command, settings *Settings)

func EnsureKanaPlugin

func EnsureKanaPlugin(siteDirectory, version, siteName string) error

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

func EnsureSSLCerts

func EnsureSSLCerts(appDirectory string, useSSL bool, consoleOutput *console.Console) error

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

func GetDefaultFilePermissions

func GetDefaultFilePermissions() (dirPerms, filePerms int)

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

func GetHtaccess

func GetHtaccess(multisite string) string

GetHtaccess Returns the correct .htaccess file for the multisite type.

func ListSettings

func ListSettings(settings *Settings, consoleOutput *console.Console)

ListSettings Lists all settings for the config command.

func Load

func Load(kanaSettings *Settings, version string, cmd *cobra.Command) error

func PrintSingleSetting

func PrintSingleSetting(name string, kanaSettings *Settings, consoleOutput *console.Console)

func TrustSSL

func TrustSSL(rootCert string, 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 {
	LocalPath   string
	Name        string
	Permissions os.FileMode
	Template    string
}

File represents template information for files that need to be placed by Kana.

type Koanf

type Koanf interface {
	Load(p koanf.Provider, pa koanf.Parser, opts ...koanf.Option) error
	Exists(path string) bool
	Bool(path string) bool
	Int64(path string) int64
	Strings(path string) []string
	String(path string) string
	Set(key string, val interface{}) error
}

type PluginVersion

type PluginVersion struct {
	SiteName string
	Version  string
}

PluginVersion represents the name and version of a plugin to allow for better templating.

type Setting

type Setting struct {
	// contains filtered or unexported fields
}

An individual setting and its associated data.

type Settings

type Settings struct {
	// contains filtered or unexported fields
}

A collection of all settings values used by Kana.

func (*Settings) Get

func (s *Settings) Get(name string) string

func (*Settings) GetAll

func (s *Settings) GetAll(settingsType string) map[string]interface{}

func (*Settings) GetBool

func (s *Settings) GetBool(name string) bool

func (*Settings) GetDomain

func (s *Settings) GetDomain() string

func (*Settings) GetInt

func (s *Settings) GetInt(name string) int64

func (*Settings) GetProtocol

func (s *Settings) GetProtocol() string

func (*Settings) GetSlice

func (s *Settings) GetSlice(name string) []string

func (*Settings) GetURL

func (s *Settings) GetURL() string

func (*Settings) Set

func (s *Settings) Set(name string, value interface{}, setVars ...bool) error

func (*Settings) WriteLocalSettings

func (s *Settings) WriteLocalSettings(localSettings map[string]interface{}) error

type StartFlag

type StartFlag struct {
	ShortName     string
	Usage         string
	NoOptDefValue string
}

StartFlag represents the data needed to programmatically create a start flag.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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