entity

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	Name        string             `toml:"name"`
	Arn         string             `toml:"arn"`
	MemorySize  int64              `toml:"memory_size"`
	Timeout     int64              `toml:"timeout"`
	Role        string             `toml:"role"`
	Schedule    *string            `toml:"schedule"`
	VPC         *VPC               `toml:"vpc"`
	Environment map[string]*string `toml:"environment"`
}

Function is the entity struct which maps from configuration.

type Integration

type Integration struct {
	Id              string  `toml:"resource_id"`
	IntegrationType string  `toml:"type"`
	LambdaFunction  *string `toml:"lambda_function"`
	Path            string  `toml:"path"`
	BucketPath      *string `toml:"bucket_path"`
	ProxyResourceId *string `toml:"proxy_resource_id"`
}

Integration is the struct which maps api.resources.integration field. Integration type accepts on "lambda" or "s3":

If IntegrationType is "s3", Bucket field must not be empty.
If IntegrationType is "lambda", LambdaFunction must not be empty.

func NewIntegration

func NewIntegration(iType, value, path string) *Integration

func (*Integration) String

func (i *Integration) String() string

type Resource

type Resource struct {
	Id           string                  `toml:"id"`
	Path         string                  `toml:"path"`
	Integrations map[string]*Integration `toml:"integrations"`
	UserDefined  bool                    `toml:"user_defined"`
}

Resource is the entity struct which maps 'api.resources' slice in configuration.

func NewResource

func NewResource(id, path string) *Resource

func (*Resource) AddIntegration

func (r *Resource) AddIntegration(method string, ig *Integration)

func (*Resource) DeleteIntegration

func (r *Resource) DeleteIntegration(method string)

func (*Resource) GetIntegration

func (r *Resource) GetIntegration(method string) *Integration

func (*Resource) GetIntegrations

func (r *Resource) GetIntegrations() map[string]*Integration

type Scheduler

type Scheduler struct {
	Name       string   `toml:"name"`
	Arn        string   `toml:"arn"`
	Enable     bool     `toml:"enable"`
	Expression string   `toml:"expression"`
	Functions  []string `toml:"functions"`
}

Scheduler is the entity struct which maps from configuration.

type Stage

type Stage struct {
	Name      string            `toml:"name"`
	Variables map[string]string `toml:"variables"`
}

type StorageObject

type StorageObject struct {
	Data     []byte
	Key      string
	MimeType string
	Info     os.FileInfo
}

func NewStorageObject

func NewStorageObject(key string, info os.FileInfo) *StorageObject

func (*StorageObject) Load

func (s *StorageObject) Load(path string) (err error)

type VPC added in v0.8.0

type VPC struct {
	Subnets        []string `toml:"subnets"`
	SecurityGroups []string `toml:"security_groups"`
}

Jump to

Keyboard shortcuts

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