Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*option)
Option defines a functional option for configuring settings.
func WithParameter ¶
WithParameter adds a parameter to replace in the template.
func WithTemplate ¶
WithTemplate sets the template string for the nginx server configuration.
type ReverseProxy ¶
type ReverseProxy interface { // Exists returns whether the site configuration exists. Exists() (bool, error) // Enabled returns whether the site exists and is currently enabled. Enabled() (bool, error) // Disable disables the site. Disable() error // Enable enables the site. Enable() error // Install sets up the site configuration. // If override is false and the site already exists, it returns false. Install(override bool) (bool, error) // Uninstall removes the site configuration. Uninstall() error }
ReverseProxy represents a NGINX reverse proxy manager.
func NewReverseProxy ¶
func NewReverseProxy(name, port string, domains []string, options ...Option) ReverseProxy
NewReverseProxy creates a new ReverseProxy instance with the given name, port, domains and options.
type ServerBlock ¶
type ServerBlock interface { // Exists returns whether the site configuration exists. Exists() (bool, error) // Enabled returns whether the site exists and is currently enabled. Enabled() (bool, error) // Disable disables the site. Disable() error // Enable enables the site. Enable() error // Install sets up the site configuration. // If override is false and the site already exists, it returns false. Install(override bool) (bool, error) // Uninstall removes the site configuration. Uninstall() error }
ServerBlock represents a NGINX server block manager.
func NewServerBlock ¶
func NewServerBlock(name, template string, options ...Option) ServerBlock
NewServerBlock creates a new ServerBlock instance with the given name, template and options.
Click to show internal directories.
Click to hide internal directories.