qa

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyseCode

func AnalyseCode(rootDir string, check *ServerlessCheck) error

func CheckFunctionDefinitions

func CheckFunctionDefinitions(rootDir string) (string, error)

func CheckLocalBuild

func CheckLocalBuild(rootDir string) (string, error)

func CheckResourceDefinitions added in v0.21.0

func CheckResourceDefinitions(rootDir string) (string, error)

func CheckUnusedZips

func CheckUnusedZips(rootDir string) (string, error)

func CheckYmlFiles

func CheckYmlFiles(rootDir string) (string, error)

func ExtractZipPath

func ExtractZipPath(line string) (string, error)

ExtractZipPath extracts the zip path from a makefile line.

func ReadYMLDefinitions

func ReadYMLDefinitions(dir string, definitions map[string]DefinitionInfo) error

Types

type DefinitionInfo

type DefinitionInfo struct {
	Path     string
	File     string
	Errors   []string
	Warnings []string
	Def      ServerlessYML
}

type FunctionInfo

type FunctionInfo struct {
	Path string
	File string
}

type ResourceInfo added in v0.21.0

type ResourceInfo struct {
	Path string
	File string
}

type ServerlessCheck

type ServerlessCheck struct {
	Definitions map[string]DefinitionInfo
	MissingVars map[string][]string
}

func ServerlessQA

func ServerlessQA(rootDir string, warnLevels WarnLevels) (ServerlessCheck, error)

type ServerlessFunctionDefinition

type ServerlessFunctionDefinition struct {
	MemorySize  int                         `yaml:"memorySize"`
	Timeout     int                         `yaml:"timeout"`
	Handler     string                      `yaml:"handler"`
	Package     ServerlessPackageDefinition `yaml:"package"`
	Events      []interface{}               `yaml:"events"`
	Environment map[string]string           `yaml:"environment"`
}

type ServerlessPackageDefinition

type ServerlessPackageDefinition struct {
	Artifact string `yaml:"artifact"`
}

type ServerlessProviderDefinition

type ServerlessProviderDefinition struct {
	Name         string            `yaml:"name"`
	Stage        string            `yaml:"stage"`
	Runtime      string            `yaml:"runtime"`
	Architecture string            `yaml:"architecture"`
	Region       string            `yaml:"region"`
	Environment  map[string]string `yaml:"environment"`
}

type ServerlessResource added in v0.21.0

type ServerlessResource struct {
	Definitions map[string]ServerlessResourceDefinition `yaml:"Resources"`
}

type ServerlessResourceDefinition added in v0.21.0

type ServerlessResourceDefinition struct {
	Type       string         `yaml:"Type"`
	Properties map[string]any `yaml:"Properties"`
}

type ServerlessYML

type ServerlessYML struct {
	FrameworkVersion string                                  `yaml:"frameworkVersion"`
	Provider         ServerlessProviderDefinition            `yaml:"provider"`
	Functions        map[string]ServerlessFunctionDefinition `yaml:"functions"`
	Resources        ServerlessResource                      `yaml:"resources"`
}

type Task

type Task struct {
	Path string
}

type WarnLevels

type WarnLevels struct {
	FunctionsMemorySize int
}

type ZipPath

type ZipPath struct {
	Path string
	File string
}

Jump to

Keyboard shortcuts

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