Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultRegion = "us-east-1"
DefaultRegion describes default region in aws
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetData ¶
type AssetData struct {
File io.ReadCloser `json:"-"`
Key string `json:"key"`
}
type Client ¶
type Client interface {
GetS3(bucket, item string) ([]byte, error)
InvokeLambda(name string, invocationType string, payload []byte) ([]byte, error)
CreateLambda(zipFile io.Reader, function, handler, runtime, resource string) error
CreateOrUpdateLambda(zipFile io.Reader, function, handler, runtime, resource string) error
MakeLambdaFunctionDefaultPolicy() (string, error)
CreateS3Bucket(bucket string) error
UploadS3(bucket, key string, body io.Reader) error
ExistsS3Bucket(name string) (bool, error)
ProvisionAppFromFile(path string, shouldUpdate bool) error
}
Client is an authenticated client for interacting with AWS resources.
type FunctionData ¶
type FunctionData struct {
Bundle io.ReadCloser `json:"-"`
Name string `json:"name"`
Handler string `json:"handler"`
Runtime string `json:"runtime"`
}
type ProvisionData ¶
type ProvisionData struct {
// StaticFiles key is the name of the static file in the /static folder
// Staticfiles value is the S3 Key where file should be provisioned
StaticFiles map[string]AssetData `json:"static_files"`
// LambdaFunctions key is the name of the lambda function zip bundle
// LambdaFunctions value contains info for provisioning a function in the AWS.
// LambdaFunctions value's Name field contains functions name in the AWS.
LambdaFunctions map[string]FunctionData `json:"lambda_functions"`
Manifest *apps.Manifest `json:"-"`
ManifestKey string `json:"manifest_key"`
}
ProvisionData contains all the necessary data for provisioning an app
func GetProvisionDataFromFile ¶
func GetProvisionDataFromFile(path string, log Logger) (*ProvisionData, error)
func (*ProvisionData) IsValid ¶
func (pd *ProvisionData) IsValid() error
Click to show internal directories.
Click to hide internal directories.