config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Nginx is text user can specify to request Nginx Web Server
	Nginx = "nginx"

	// ApacheHttpd is text user can specify to request Apache Web Server
	ApacheHttpd = "httpd"

	// PhpWebServer is text user can specify to use PHP's built-in Web Server
	PhpWebServer = "php-server"
)
View Source
const HttpdConfTemplate = `` /* 4369-byte string literal not displayed */

HttpdConfTemplate is the template string for a httpd.conf file

View Source
const NginxConfTemplate = `` /* 7991-byte string literal not displayed */

NginxConfTemplate is the template string for a nginx.conf file

View Source
const PhpFpmConfTemplate = `` /* 21991-byte string literal not displayed */

PhpFpmConfTemplate is the template string for a php-fpm.conf file

View Source
const PhpIniTemplate = `` /* 71458-byte string literal not displayed */

PhpIniTemplate is the template string for a php.ini file

Variables

View Source
var (
	// DefaultCliScripts is the script used when one is not provided in buildpack.yml
	DefaultCliScripts = []string{"app.php", "main.php", "run.php", "start.php"}
)

Functions

func PickWebDir

func PickWebDir(buildpackYAML BuildpackYAML) string

func ProcessTemplateToFile

func ProcessTemplateToFile(templateBody string, outputPath string, data interface{}) error

ProcessTemplateToFile writes out a specific template to the given file name

func SearchForWebApp

func SearchForWebApp(appRoot string, webdir string) (bool, error)

SearchForWebApp looks to see if this application is a PHP web app

func WarnBuildpackYAML added in v0.1.4

func WarnBuildpackYAML(logger logger.Logger, version, appRoot string) error

Types

type BuildpackYAML

type BuildpackYAML struct {
	Config Config `yaml:"php"`
}

BuildpackYAML represents user specified config options through `buildpack.yml`

func LoadBuildpackYAML

func LoadBuildpackYAML(appRoot string) (BuildpackYAML, error)

LoadBuildpackYAML reads `buildpack.yml` and PHP specific config options in it

type Config

type Config struct {
	Version             string    `yaml:"version"`
	WebServer           string    `yaml:"webserver"`
	WebDirectory        string    `yaml:"webdirectory"`
	LibDirectory        string    `yaml:"libdirectory"`
	Script              string    `yaml:"script"`
	ServerAdmin         string    `yaml:"serveradmin"`
	EnableHTTPSRedirect bool      `yaml:"enable_https_redirect"`
	Redis               Redis     `yaml:"redis"`
	Memcached           Memcached `yaml:"memcached"`
}

Config represents PHP specific configuration options for BuildpackYAML

type HttpdConfig

type HttpdConfig struct {
	ServerAdmin          string
	DisableHTTPSRedirect bool
	AppRoot              string
	WebDirectory         string
	FpmSocket            string
}

HttpdConfig supplies values for templated httpd.conf

type Memcached

type Memcached struct {
	SessionStoreServiceName string `yaml:"session_store_service_name"`
}

Memcached represents PHP Memcached specific configuration options for `buildpack.yml`

type NginxConfig

type NginxConfig struct {
	DisableHTTPSRedirect bool
	AppRoot              string
	WebDirectory         string
	FpmSocket            string
}

NginxConfig supplies values for templated nginx.conf

type PhpFpmConfig

type PhpFpmConfig struct {
	PhpHome string
	PhpAPI  string
	Include string
	Listen  string
}

PhpFpmConfig supplies values for templated php-fpm.conf

type PhpIniConfig

type PhpIniConfig struct {
	AppRoot        string
	LibDirectory   string
	PhpHome        string
	PhpAPI         string
	Extensions     []string
	ZendExtensions []string
}

PhpIniConfig supplies values for templated php.ini

type Redis

type Redis struct {
	SessionStoreServiceName string `yaml:"session_store_service_name"`
}

Redis represents PHP Redis specific configuration options for `buildpack.yml`

Jump to

Keyboard shortcuts

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