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"` }
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 (*Resource) AddIntegration ¶
func (r *Resource) AddIntegration(method string, ig *Integration)
func (*Resource) DeleteIntegration ¶
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 StorageObject ¶
func NewStorageObject ¶
func NewStorageObject(key string, info os.FileInfo) *StorageObject
func (*StorageObject) Load ¶
func (s *StorageObject) Load(path string) (err error)
Click to show internal directories.
Click to hide internal directories.