application

package
v0.0.0-...-4eef74f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeScriptControllerLanguage = "typescript"
	GoControllerLanguage         = "go"
	DotNetControllerLanguage     = "dotnet"
)

Variables

View Source
var (
	// Config
	ApplicationConfigPath = "config"

	// Directories
	ApplicationFolder = "app"
	ControllersFolder = "controllers"

	// File template paths
	FileTemplatePath = "/pkg/application/file_templates"
	LocalPackagePath = "/lib"

	// TypeScript
	TypeScriptFileTemplatesDirectoryName = "typescript"
	TypeScriptTSConfigFileName           = "tsconfig.json"
	TypeScriptTSConfigTemplateName       = "tsconfig_json.tmpl"
	TypeScriptPackageJSONFileName        = "package.json"
	TypeScriptPackageJSONTemplateName    = "package_json.tmpl"
	TypesScriptUtilsDirectory            = "stevie-utils"

	// Go
	GoFileTemplatesDirectoryName = "go"
	GoGoModName                  = "go.mod"
	GoGoSumName                  = "go.sum"

	// Dotnet
	DotNetFileTemplateDirectoryName = "dotnet"
)

Functions

func BuildAPIRoutes

func BuildAPIRoutes(ctx *pulumi.Context, projectName, environment string, routes []auto_pulumi.APIRoute) error

BuildAPIRoutes builds the API Routes.

func CreateAPIRoute

func CreateAPIRoute(name, route, pathToFiles string, corsEnabled bool) auto_pulumi.APIRoute

CreateAPIRoute creates an API Route.

func CreateNewController

func CreateNewController(name string, methods []string, language string) (string, error)

CreateNewController creates a new controller.

func CreateProjectStructure

func CreateProjectStructure(name, description string) error

func RunTypeScriptRoutesLocally

func RunTypeScriptRoutesLocally(routes []auto_pulumi.APIRoute, port int) error

RunTypeScriptRoutesLocally runs the API routes locally.

Types

type DotNetControllerFileArgs

type DotNetControllerFileArgs struct {
	Route        string
	Method       string
	FunctionName string
}

type GoControllerFileArgs

type GoControllerFileArgs struct {
	Method string
	Route  string
}

type PackageJsonArgs

type PackageJsonArgs struct {
	Name        string
	Description string
}

PackageJsonArgs define the args need to generate a package.json file.

type TypeScriptControllerFileArgs

type TypeScriptControllerFileArgs struct {
	FunctionName string
	HandlerName  string
}

Jump to

Keyboard shortcuts

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