Documentation
¶
Index ¶
- Variables
- func DefaultVersionForRuntime(r Runtime) string
- func ToContext(ctx context.Context, answers *Answers) context.Context
- type Answers
- type DepManager
- type Runtime
- type RuntimeList
- type RuntimeType
- type Service
- type ServiceDisk
- type ServiceName
- type ServiceNameList
- type ServiceType
- type SocketFamily
- type Stack
- type StackList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LanguageTypeVersions = map[Runtime][]string{ DotNet: {"8.0", "7.0", "6.0"}, Elixir: {"1.18", "1.15", "1.14"}, Golang: {"1.25", "1.24", "1.23", "1.22", "1.21", "1.20"}, Java: {"21", "19", "18", "17", "11", "8"}, NodeJS: {"24", "22", "20"}, PHP: {"8.4", "8.3", "8.2", "8.1"}, Python: {"3.13", "3.12", "3.11", "3.10", "3.9", "3.8"}, Ruby: {"3.4", "3.3", "3.2", "3.1", "3.0"}, Rust: {"1"}, } ServiceTypeVersions = map[ServiceName][]string{ ChromeHeadless: {"120", "113", "95", "91"}, ClickHouse: {"25.3", "24.3", "23.8"}, InfluxDB: {"2.7", "2.3"}, Kafka: {"3.7", "3.6", "3.4", "3.2"}, MariaDB: {"11.8", "11.4", "10.11", "10.6"}, Memcached: {"1.6", "1.5", "1.4"}, MySQL: {"11.8", "11.4", "10.11", "10.6"}, NetworkStorage: {"1.0"}, OpenSearch: {"3", "2"}, OracleMySQL: {"8.0", "5.7"}, PostgreSQL: {"18", "17", "16", "15", "14", "13", "12"}, RabbitMQ: {"4.1", "4.0", "3.13", "3.12"}, Redis: {"8.0", "7.2"}, RedisPersistent: {"8.0", "7.2"}, Solr: {"9.9", "9.6", "9.4", "9.2", "9.1", "8.11"}, Varnish: {"7.6", "7.3", "7.2", "6.0"}, VaultKMS: {"1.12"}, } )
View Source
var ( Runtimes = RuntimeList{ DotNet, Elixir, Golang, Java, NodeJS, PHP, Python, Ruby, Rust, } )
View Source
var ( ServiceDisks = []ServiceDisk{ D1024, D2048, D3072, D4096, D5120, } )
View Source
var ( ServiceNames = ServiceNameList{ MariaDB, MySQL, PostgreSQL, Redis, RedisPersistent, Memcached, OpenSearch, Solr, Varnish, Kafka, VaultKMS, RabbitMQ, InfluxDB, ChromeHeadless, NetworkStorage, OracleMySQL, } )
View Source
var ( Stacks = StackList{ GenericStack, Django, Laravel, NextJS, Strapi, Flask, Express, Rails, } )
Functions ¶
func DefaultVersionForRuntime ¶ added in v0.1.2
Types ¶
type Answers ¶
type Answers struct {
Stack Stack `json:"stack"`
Flavor string `json:"flavor"`
Type RuntimeType `json:"type"`
Name string `json:"name"`
ApplicationRoot string `json:"application_root"`
Environment map[string]string `json:"environment"`
BuildSteps []string `json:"build_steps"`
WebCommand string `json:"web_command"`
SocketFamily SocketFamily `json:"socket_family"`
DeployCommand []string `json:"deploy_command"`
DependencyManagers []DepManager `json:"dependency_managers"`
Dependencies map[string]map[string]string `json:"dependencies"`
BuildFlavor string `json:"build_flavor"`
Disk string `json:"disk"`
Mounts map[string]map[string]string `json:"mounts"`
Services []Service `json:"services"`
WorkingDirectory string `json:"working_directory"`
HasGit bool `json:"has_git"`
FilesCreated []string `json:"files_created"`
Locations map[string]map[string]interface{} `json:"locations"`
}
func FromContext ¶
FromContext returns the answers value stored in ctx, if any.
func NewAnswers ¶
func NewAnswers() *Answers
func (*Answers) ToUserInput ¶
func (a *Answers) ToUserInput() *platformifier.UserInput
type DepManager ¶
type DepManager string
const ( GenericDepManager DepManager = "generic" Pip DepManager = "pip" Poetry DepManager = "poetry" Pipenv DepManager = "pipenv" Composer DepManager = "composer" Yarn DepManager = "yarn" Npm DepManager = "npm" Bundler DepManager = "bundler" )
func (DepManager) String ¶
func (m DepManager) String() string
func (DepManager) Title ¶
func (m DepManager) Title() string
type RuntimeList ¶
type RuntimeList []Runtime
func (RuntimeList) AllTitles ¶
func (r RuntimeList) AllTitles() []string
func (RuntimeList) RuntimeByTitle ¶
func (r RuntimeList) RuntimeByTitle(title string) (Runtime, error)
type RuntimeType ¶
func (RuntimeType) MarshalJSON ¶
func (t RuntimeType) MarshalJSON() ([]byte, error)
func (RuntimeType) String ¶
func (t RuntimeType) String() string
type Service ¶
type Service struct {
Name string `json:"name"`
Type ServiceType `json:"type"`
TypeVersions []string `json:"type_versions"`
Disk ServiceDisk `json:"disk,omitempty"`
DiskSizes []ServiceDisk `json:"disk_sizes"`
}
type ServiceDisk ¶
type ServiceDisk string
const ( D1024 ServiceDisk = "1024" D2048 ServiceDisk = "2048" D3072 ServiceDisk = "3072" D4096 ServiceDisk = "4096" D5120 ServiceDisk = "5120" )
func (ServiceDisk) String ¶
func (s ServiceDisk) String() string
func (ServiceDisk) Title ¶
func (s ServiceDisk) Title() string
type ServiceName ¶
type ServiceName string
const ( ChromeHeadless ServiceName = "chrome-headless" ClickHouse ServiceName = "clickhouse" InfluxDB ServiceName = "influxdb" Kafka ServiceName = "kafka" MariaDB ServiceName = "mariadb" Memcached ServiceName = "memcached" MySQL ServiceName = "mysql" NetworkStorage ServiceName = "network-storage" OpenSearch ServiceName = "opensearch" OracleMySQL ServiceName = "oracle-mysql" PostgreSQL ServiceName = "postgresql" RabbitMQ ServiceName = "rabbitmq" Redis ServiceName = "redis" RedisPersistent ServiceName = "redis-persistent" Solr ServiceName = "solr" Varnish ServiceName = "varnish" VaultKMS ServiceName = "vault-kms" )
func (ServiceName) IsPersistent ¶
func (s ServiceName) IsPersistent() bool
func (ServiceName) String ¶
func (s ServiceName) String() string
func (ServiceName) Title ¶
func (s ServiceName) Title() string
type ServiceNameList ¶
type ServiceNameList []ServiceName
func (*ServiceNameList) AllTitles ¶
func (s *ServiceNameList) AllTitles() []string
func (*ServiceNameList) ServiceByTitle ¶
func (s *ServiceNameList) ServiceByTitle(title string) (ServiceName, error)
func (*ServiceNameList) WriteAnswer ¶
func (s *ServiceNameList) WriteAnswer(_ string, value interface{}) error
type ServiceType ¶
func (ServiceType) MarshalJSON ¶
func (t ServiceType) MarshalJSON() ([]byte, error)
func (ServiceType) String ¶
func (t ServiceType) String() string
type SocketFamily ¶
type SocketFamily string
const ( TCP SocketFamily = "tcp" UnixSocket SocketFamily = "unix" )
func (SocketFamily) String ¶
func (i SocketFamily) String() string
func (SocketFamily) Title ¶
func (i SocketFamily) Title() string
Click to show internal directories.
Click to hide internal directories.