예제 #1
0
func main() {
	apiStage := sparta.NewStage("v1")
	apiGateway := sparta.NewAPIGateway("SpartaImagerAPI", apiStage)
	apiGateway.CORSEnabled = true
	funcs, err := imagerFunctions(apiGateway)
	if err == nil {
		sparta.Main("SpartaImager", "This is a sample Sparta application", funcs, apiGateway, nil)
	}
}
예제 #2
0
////////////////////////////////////////////////////////////////////////////////
// Main
func main() {
	// Deploy it
	var lambdaFunctions []*sparta.LambdaAWSInfo
	lambdaFunctions = appendDynamicS3BucketLambda(lambdaFunctions)

	sparta.Main("SpartaDiscovery",
		fmt.Sprintf("Test sparta.Discover() function"),
		lambdaFunctions,
		nil,
		nil)
}
예제 #3
0
func main() {
	stage := sparta.NewStage("prod")
	apiGateway := sparta.NewAPIGateway("MySpartaAPI", stage)
	apiGateway.CORSEnabled = true

	stackName := "SpartaApplication"
	sparta.Main(stackName,
		"Simple Sparta application",
		spartaLambdaData(apiGateway),
		apiGateway,
		nil)
}
예제 #4
0
////////////////////////////////////////////////////////////////////////////////
// Main
func main() {

	lambdaFn := sparta.NewLambda(sparta.IAMRoleDefinition{},
		helloWorld,
		nil)

	var lambdaFunctions []*sparta.LambdaAWSInfo
	lambdaFunctions = append(lambdaFunctions, lambdaFn)
	err := sparta.Main("SpartaHelloWorld",
		fmt.Sprintf("Test HelloWorld resource command"),
		lambdaFunctions,
		nil,
		nil)
	if err != nil {
		os.Exit(1)
	}
}