golang

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRuntimeFile

func AddRuntimeFile(unit *core.ExecutionUnit, templateData any, path string, content []byte) error

func NewFile

func NewFile(path string, content io.Reader) (f *core.SourceFile, err error)

func UpdateGoModWithHandlerRequirements

func UpdateGoModWithHandlerRequirements(unit *core.ExecutionUnit) error

func UpdateImportWithHandlerRequirements

func UpdateImportWithHandlerRequirements(oldFileContent string, imports *sitter.Node, f *core.SourceFile) string

func UpdateListenWithHandlerCode

func UpdateListenWithHandlerCode(oldFileContent string, nodeToComment string, appName string) string

UpdateListenWithHandlerCode takes the old http.ListenAndServe string and comments it out. Then it appends the the lambda handler code right after. Dependencies are not added at this stage

Types

type AddExecRuntimeFiles

type AddExecRuntimeFiles struct {
	// contains filtered or unexported fields
}

func (*AddExecRuntimeFiles) Name

func (p *AddExecRuntimeFiles) Name() string

func (*AddExecRuntimeFiles) Transform

func (p *AddExecRuntimeFiles) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type Expose

type Expose struct{}

func (*Expose) Name

func (p *Expose) Name() string

func (Expose) Transform

func (p Expose) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type GoMod

type GoMod struct {
	// contains filtered or unexported fields
}

func NewGoMod

func NewGoMod(path string, content io.Reader) (*GoMod, error)

func (*GoMod) AddLine

func (pf *GoMod) AddLine(text string)

func (*GoMod) Clone

func (pf *GoMod) Clone() core.File

func (*GoMod) Path

func (pf *GoMod) Path() string

func (*GoMod) WriteTo

func (pf *GoMod) WriteTo(out io.Writer) (int64, error)

type GoPlugins

type GoPlugins struct {
	Plugins []core.Plugin
}

func NewGoPlugins

func NewGoPlugins(cfg *config.Application, runtime Runtime) *GoPlugins

func (GoPlugins) Name

func (c GoPlugins) Name() string

func (GoPlugins) Transform

func (c GoPlugins) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type GolangExecutable

type GolangExecutable struct {
}

func (GolangExecutable) Name

func (l GolangExecutable) Name() string

func (GolangExecutable) Transform

func (l GolangExecutable) Transform(result *core.CompilationResult, dependencies *core.Dependencies) error

type Runtime

type Runtime interface {
	AddExecRuntimeFiles(unit *core.ExecutionUnit, result *core.CompilationResult, deps *core.Dependencies) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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