config

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigDirPath added in v0.9.0

func GetDefaultConfigDirPath() (string, error)

Returns the path to the configuration directory.

Types

type Config added in v0.4.0

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

Config contains all configuration options for the application.

func New added in v0.4.0

func New() (*Config, error)

Create a new Config instance with the default configuration.

func NewTesting added in v0.4.0

func NewTesting(testingConfigDir string) *Config

Create a new Config instance with the given configuration directory. Used for testing purposes.

func (*Config) AddNginxConfig added in v0.4.0

func (c *Config) AddNginxConfig(name string, port int64) error

Add a new Nginx configuration file with the given name and port.

func (*Config) GetConfigDir added in v0.4.0

func (c *Config) GetConfigDir() string

Returns the path to the configuration directory.

func (*Config) GetDatabasePath added in v0.9.0

func (c *Config) GetDatabasePath() string

Returns the path of the sqlite3 database file.

func (*Config) GetNginxConfigDir added in v0.4.0

func (c *Config) GetNginxConfigDir() string

Returns the path to the nginx configuration directory.

func (*Config) InitNginx added in v0.4.0

func (c *Config) InitNginx() error

Initialize the Nginx configuration directory.

func (*Config) IsTesting added in v0.4.0

func (c *Config) IsTesting() bool

Returns whether the application is in testing mode.

func (*Config) NginxAddDomainAlias added in v0.7.0

func (c *Config) NginxAddDomainAlias(name string, domainAlias string) error

Add a domain alias to a Nginx configuration file.

func (*Config) NginxRemoveDomainAlias added in v0.7.0

func (c *Config) NginxRemoveDomainAlias(name string, domainAlias string) error

Remove a domain alias from a Nginx configuration file.

func (*Config) RemoveNginxConfig added in v0.4.0

func (c *Config) RemoveNginxConfig(name string) error

Remove a Nginx configuration file with the given name.

func (*Config) RenameNginxConfig added in v0.6.0

func (c *Config) RenameNginxConfig(oldName string, newName string) error

Rename a Nginx configuration file with the given old and new name.

func (*Config) UpdateNginxConfig added in v0.6.0

func (c *Config) UpdateNginxConfig(name string, port int64) error

Update a Nginx configuration file with the given name and port.

Jump to

Keyboard shortcuts

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