Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) ChooseFunction() string
- func (c *Config) ChooseResource() string
- func (c *Config) ChooseScheduler() string
- func (c *Config) DeleteFunction(name string) error
- func (c *Config) DeleteResource(path string) error
- func (c *Config) DeleteScheduler(name string) error
- func (c *Config) DeleteStage(name string) error
- func (c *Config) Exists() bool
- func (c *Config) FindSubResources(prefix string) []*entity.Resource
- func (c *Config) LoadAllFunctions() ([]*entity.Function, error)
- func (c *Config) LoadAllSchedulers() ([]*entity.Scheduler, error)
- func (c *Config) LoadAllStages() ([]*entity.Stage, error)
- func (c *Config) LoadFunction(name string) (*entity.Function, error)
- func (c *Config) LoadResource(path string) (*entity.Resource, error)
- func (c *Config) LoadScheduler(name string) (*entity.Scheduler, error)
- func (c *Config) LoadStage(name string) (*entity.Stage, error)
- func (c *Config) SortResources()
- func (c *Config) Write()
Constants ¶
This section is empty.
Variables ¶
View Source
var ResourceNotFound = errors.New("Resource not found")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Root string `toml:"-"` Path string `toml:"-"` FunctionPath string `toml:"-"` LibPath string `toml:"-"` StoragePath string `toml:"-"` StagePath string `toml:"-"` SchedulerPath string `toml:"-"` RestApiId string `toml:"rest_api_id"` ProjectName string `toml:"project_name"` Profile string `toml:"profile"` Region string `toml:"region"` DefaultLambdaRole string `toml:"default_lambda_role"` S3BucketName string `toml:"s3_bucket_name"` DeployHookCommand string `toml:"deploy_hook_command"` Resources []*entity.Resource `toml:"resources"` Queue map[string]*entity.Function `toml:"-"` // contains filtered or unexported fields }
Config is the struct which maps configuration file into this. Ensure call Write() to update configuration.
func Load ¶
func Load() *Config
Load loads configuration and map to Config struct. this function always returns although the config file didn't exist. Then you can confirm as Exists() on config file exists or not.
func (*Config) ChooseFunction ¶
func (*Config) ChooseResource ¶
func (*Config) ChooseScheduler ¶
func (*Config) DeleteFunction ¶
func (*Config) DeleteResource ¶
func (*Config) DeleteScheduler ¶
func (*Config) DeleteStage ¶
func (*Config) FindSubResources ¶
func (*Config) LoadAllSchedulers ¶
func (*Config) LoadScheduler ¶
func (*Config) SortResources ¶
func (c *Config) SortResources()
Sort resources by shorter path to access by shorter resource
Click to show internal directories.
Click to hide internal directories.