Documentation
¶
Index ¶
- Variables
- func AppendStringIfMissing(slice []string, i string) []string
- func AwsType(s string) string
- func Contains(s []string, v string) bool
- func CreateLambdaNetwork() error
- func ExecuteCommand(cmd *cobra.Command, args ...string) (output string, err error)
- func GetFuncName(resourceName, functionName string) string
- func GetList(projectPath, wish string) ([]string, error)
- func GetProjectPath(path string) string
- func GetWorkingDir() (string, error)
- func LoadTemplateFromBox(b *packr.Box, file string) (*template.Template, error)
- func ReadDataFromFile(path string) ([]byte, error)
- func RenderFile(box *packr.Box, fName, tPath, folder string, data map[string]interface{}) error
- func RunCmd(name string, args ...string) error
- func RunCmdWithEnv(envs []string, name string, args ...string) error
- func StartLocalDynamoDB() error
Constants ¶
This section is empty.
Variables ¶
var ( // SchemaBox is the packr box containing the resource file templates SchemaBox = packr.New("schema", "../../templates/schema") // ResourceBox is the packr box containing the resource file templates ResourceBox = packr.New("resource", "../../templates/resource") // FunctionBox is the packr box containing the function file templates FunctionBox = packr.New("function", "../../templates/function") // MakeBox is the packr box containing the Makefile template MakeBox = packr.New("make", "../../templates/make") // RemoveBox is the packr box containing the schema template to be rerender when a resource is removed RemoveBox = packr.New("remove", "../../templates/remove") )
Functions ¶
func AppendStringIfMissing ¶
AppendStringIfMissing appends an element to a slice, if it doesn't contain the element already
func CreateLambdaNetwork ¶
func CreateLambdaNetwork() error
CreateLambdaNetwork spins up a lambda network for dynamodb and AWS SAM to interact with one another
func ExecuteCommand ¶
ExecuteCommand executes a command from anywhere
func GetFuncName ¶
GetFuncName returns the generated function name for a given resource/ function group name and a functionName
func GetProjectPath ¶
GetProjectPath gets the OS path of the project
func GetWorkingDir ¶
GetWorkingDir get the directory the current command is run out of
func LoadTemplateFromBox ¶
LoadTemplateFromBox loads a *text/template.Template from a packr.Box
func ReadDataFromFile ¶
ReadDataFromFile reads the contents of a file at the given path
func RenderFile ¶
RenderFile renders a template to the file at folder/fName with the given data
func RunCmdWithEnv ¶
RunCmdWithEnv will run an OS command with the given arguments and an environment
func StartLocalDynamoDB ¶
func StartLocalDynamoDB() error
StartLocalDynamoDB spins up the dynamodb-local docker image
Types ¶
This section is empty.