Documentation
¶
Index ¶
Constants ¶
View Source
const ServerlessFile = "serverless.yml"
Default serverless configuration file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶ added in v0.6.0
type Definition struct {
Service string
Description string
Provider struct {
Name string // see `providers` variable for supported providers
Registry string
Envs map[string]string
Environment map[string]string // legacy entry
Secrets []string
EnvSecrets []string `yaml:"env-secrets"` // legacy entry
Annotations map[string]string
}
Functions map[string]struct {
Handler string
Source string
Runtime string
Description string
Labels []string
Envs map[string]string
Environment map[string]string // legacy entry
Secrets []string
EnvSecrets []string `yaml:"env-secrets"` // legacy entry
Annotations map[string]string
}
}
type Deployer ¶ added in v0.6.0
type Deployer interface {
DeployDryRun() (string, error)
Deploy(ctx context.Context) (string, error)
}
Deployer is an interface that we use to perform a serverless deployment
type Function ¶
type Function struct {
Name string // Function name
Service string // Function service name
Directory string // Function base directory
Handler string
Image string // Source or destination image
Runtime string // Function runtime address
Description string
Labels []string
Secrets []string
Envs map[string]string
Annotations map[string]string
}
type Manifest ¶ added in v0.6.0
type Manifest struct {
Definition
}
Manifest represents serverless file format
func NewServerlessConfig ¶ added in v0.6.0
NewServerlessConfig returns a new serverless config struct
func NewServerlessConfigYAML ¶ added in v0.6.0
NewServerlessConfigYAML parses a serverless config file
func (Manifest) BaseDirectory ¶ added in v0.6.0
Returns a current working directory that is a config base
func (Manifest) ToFunctions ¶ added in v0.6.0
ToFunctions returns definitions of functions from the serverless configuration
Click to show internal directories.
Click to hide internal directories.