builder

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 5 Imported by: 6

Documentation

Overview

Package builder helps with generating zip files for AWS Lambda functions. The builder package assumes that running "go build" will suffice to build the executable and will create a zipfile with the same name as the parent folder.

Index

Constants

View Source
const (

	// UnknownRuntimeErr is the error returned when the runtime is unknown
	UnknownRuntimeErr = "unknown runtime %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory is the main struct to create new zip files.

func NewFactory

func NewFactory() *Factory

NewFactory returns a new Factory pointer that can be chained with builder methods to set multiple configuration values inline without using pointers.

func (*Factory) Build

func (f *Factory) Build() error

Build runs go build in the folder set by the Factory

func (*Factory) MustBuild

func (f *Factory) MustBuild()

MustBuild is like Build but panics if an error is returned

func (*Factory) MustZip

func (f *Factory) MustZip()

MustZip is like Zip but panics if an error is returned

func (*Factory) WithFolder

func (f *Factory) WithFolder(folder string) *Factory

WithFolder sets the root folder to use and returns a pointer to the existing resource to allow chaining.

func (*Factory) Zip

func (f *Factory) Zip() error

Zip runs the zip command in the folder set by the Factory

Jump to

Keyboard shortcuts

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