Documentation ¶
Index ¶
- Variables
- func EnrichWithData(data map[string]string, override map[string]string) map[string]string
- func ProcessData(data map[string]string, arguments Arguments, settings TerralessSettings) map[string]string
- func ProcessString(check string, arguments Arguments, settings TerralessSettings) string
- type Arguments
- type Extension
- type ExtensionExecArgs
- type ExtensionPlugin
- type ExtensionRPC
- type ExtensionRPCServer
- type FunctionEvent
- type FunctionEvents
- type GenerateHelperFunctionCommandArgs
- type PermissionData
- type Permissions
- type PluginInfo
- type ProcessUploadArgs
- type Provider
- type ProviderPlugin
- type ProviderRPC
- func (g *ProviderRPC) CanHandle(resourceType string) bool
- func (g *ProviderRPC) FinalizeTemplates(terralessData TerralessData) string
- func (g *ProviderRPC) GenerateHelperFunctionCommand(teamName string, providerName string, roleName string) string
- func (g *ProviderRPC) Info() PluginInfo
- func (g *ProviderRPC) PrepareSession(terralessConfig TerralessConfig) map[string]string
- func (g *ProviderRPC) ProcessUpload(terralessData TerralessData, upload TerralessUpload) []string
- func (g *ProviderRPC) RenderAuthorizerTemplates(config TerralessConfig) string
- func (g *ProviderRPC) RenderCertificateTemplates(config TerralessConfig) string
- func (g *ProviderRPC) RenderEndpointTemplates(config TerralessConfig) string
- func (g *ProviderRPC) RenderFunctionTemplates(resourceType string, functionEvents FunctionEvents, ...) string
- func (g *ProviderRPC) RenderUploadTemplates(terralessData TerralessData) string
- type ProviderRPCServer
- func (server *ProviderRPCServer) CanHandle(resourceType string, resp *bool) error
- func (server *ProviderRPCServer) FinalizeTemplates(terralessData TerralessData, resp *string) error
- func (server *ProviderRPCServer) GenerateHelperFunctionCommand(args GenerateHelperFunctionCommandArgs, resp *string) error
- func (server *ProviderRPCServer) Info(args interface{}, resp *PluginInfo) error
- func (server *ProviderRPCServer) PrepareSession(terralessConfig TerralessConfig, resp *map[string]string) error
- func (server *ProviderRPCServer) ProcessUpload(args ProcessUploadArgs, resp *[]string) error
- func (server *ProviderRPCServer) RenderAuthorizerTemplates(config TerralessConfig, resp *string) error
- func (server *ProviderRPCServer) RenderCertificateTemplates(config TerralessConfig, resp *string) error
- func (server *ProviderRPCServer) RenderEndpointTemplates(config TerralessConfig, resp *string) error
- func (server *ProviderRPCServer) RenderFunctionTemplates(args RenderFunctionTemplatesArgs, resp *string) error
- func (server *ProviderRPCServer) RenderUploadTemplates(terralessData TerralessData, resp *string) error
- type RenderFunctionTemplatesArgs
- type TerralessActiveProvider
- type TerralessAuthorizer
- type TerralessBackend
- type TerralessCertificate
- type TerralessCloudfront
- type TerralessCloudfrontCaching
- type TerralessConfig
- type TerralessCors
- type TerralessData
- type TerralessEndpoint
- type TerralessFunction
- type TerralessFunctionEvent
- type TerralessGlobalConfig
- type TerralessPackage
- type TerralessPlugin
- type TerralessProjectConfig
- type TerralessProvider
- type TerralessSettings
- type TerralessTeam
- type TerralessType
- type TerralessUpload
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpMethods = []string{"GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "ANY"}
Functions ¶
func EnrichWithData ¶
func ProcessData ¶
func ProcessString ¶
func ProcessString(check string, arguments Arguments, settings TerralessSettings) string
Types ¶
type Extension ¶ added in v0.1.31
type Extension interface { Exec(globalConfig TerralessGlobalConfig, data TerralessData) error Info() PluginInfo }
type ExtensionExecArgs ¶ added in v0.1.44
type ExtensionExecArgs struct { GlobalConfig TerralessGlobalConfig TerralessData TerralessData }
type ExtensionPlugin ¶ added in v0.1.31
type ExtensionPlugin struct {
Impl Extension
}
Implementation of plugin.Plugin
func (ExtensionPlugin) Client ¶ added in v0.1.31
func (ExtensionPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*ExtensionPlugin) Server ¶ added in v0.1.31
func (plugin *ExtensionPlugin) Server(broker *plugin.MuxBroker) (interface{}, error)
type ExtensionRPC ¶ added in v0.1.31
type ExtensionRPC struct {
// contains filtered or unexported fields
}
RPC
func (*ExtensionRPC) Exec ¶ added in v0.1.31
func (g *ExtensionRPC) Exec(globalConfig TerralessGlobalConfig, terralessData TerralessData) error
func (*ExtensionRPC) Info ¶ added in v0.1.31
func (g *ExtensionRPC) Info() PluginInfo
type ExtensionRPCServer ¶ added in v0.1.31
type ExtensionRPCServer struct {
Impl Extension
}
RPC Server
func (*ExtensionRPCServer) Exec ¶ added in v0.1.31
func (server *ExtensionRPCServer) Exec(args ExtensionExecArgs, resp *error) error
func (*ExtensionRPCServer) Info ¶ added in v0.1.31
func (server *ExtensionRPCServer) Info(args interface{}, resp *PluginInfo) error
type FunctionEvent ¶ added in v0.1.12
type FunctionEvent struct { FunctionName string FunctionEvent TerralessFunctionEvent }
type FunctionEvents ¶ added in v0.1.12
type FunctionEvents struct {
Events map[string][]FunctionEvent
}
type GenerateHelperFunctionCommandArgs ¶ added in v0.3.1
type PermissionData ¶ added in v0.1.42
type Permissions ¶ added in v0.1.42
type Permissions struct { Type string `yaml:"Type"` Data []PermissionData `yaml:"Data"` }
type PluginInfo ¶ added in v0.1.31
type ProcessUploadArgs ¶ added in v0.1.35
type ProcessUploadArgs struct { TerralessData TerralessData Upload TerralessUpload }
type Provider ¶
type Provider interface { CanHandle(resourceType string) bool FinalizeTemplates(terralessData TerralessData) string GenerateHelperFunctionCommand(teamName string, providerName string, roleName string) string Info() PluginInfo PrepareSession(terralessConfig TerralessConfig) map[string]string ProcessUpload(terralessData TerralessData, upload TerralessUpload) []string RenderAuthorizerTemplates(config TerralessConfig) string RenderCertificateTemplates(config TerralessConfig) string RenderEndpointTemplates(config TerralessConfig) string RenderFunctionTemplates(resourceType string, functionEvents FunctionEvents, terralessData *TerralessData) string RenderUploadTemplates(terralessData TerralessData) string }
type ProviderPlugin ¶ added in v0.1.31
type ProviderPlugin struct {
Impl Provider
}
func (ProviderPlugin) Client ¶ added in v0.1.32
func (ProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*ProviderPlugin) Server ¶ added in v0.1.32
func (plugin *ProviderPlugin) Server(broker *plugin.MuxBroker) (interface{}, error)
type ProviderRPC ¶ added in v0.1.31
type ProviderRPC struct {
// contains filtered or unexported fields
}
RPC
func (*ProviderRPC) CanHandle ¶ added in v0.1.33
func (g *ProviderRPC) CanHandle(resourceType string) bool
func (*ProviderRPC) FinalizeTemplates ¶ added in v0.1.33
func (g *ProviderRPC) FinalizeTemplates(terralessData TerralessData) string
func (*ProviderRPC) GenerateHelperFunctionCommand ¶ added in v0.3.1
func (g *ProviderRPC) GenerateHelperFunctionCommand(teamName string, providerName string, roleName string) string
func (*ProviderRPC) Info ¶ added in v0.1.33
func (g *ProviderRPC) Info() PluginInfo
func (*ProviderRPC) PrepareSession ¶ added in v0.1.33
func (g *ProviderRPC) PrepareSession(terralessConfig TerralessConfig) map[string]string
func (*ProviderRPC) ProcessUpload ¶ added in v0.1.33
func (g *ProviderRPC) ProcessUpload(terralessData TerralessData, upload TerralessUpload) []string
func (*ProviderRPC) RenderAuthorizerTemplates ¶ added in v0.1.33
func (g *ProviderRPC) RenderAuthorizerTemplates(config TerralessConfig) string
func (*ProviderRPC) RenderCertificateTemplates ¶ added in v0.1.33
func (g *ProviderRPC) RenderCertificateTemplates(config TerralessConfig) string
func (*ProviderRPC) RenderEndpointTemplates ¶ added in v0.1.33
func (g *ProviderRPC) RenderEndpointTemplates(config TerralessConfig) string
func (*ProviderRPC) RenderFunctionTemplates ¶ added in v0.1.33
func (g *ProviderRPC) RenderFunctionTemplates(resourceType string, functionEvents FunctionEvents, terralessData *TerralessData) string
func (*ProviderRPC) RenderUploadTemplates ¶ added in v0.1.33
func (g *ProviderRPC) RenderUploadTemplates(terralessData TerralessData) string
type ProviderRPCServer ¶ added in v0.1.31
type ProviderRPCServer struct {
Impl Provider
}
RPC Server
func (*ProviderRPCServer) CanHandle ¶ added in v0.1.33
func (server *ProviderRPCServer) CanHandle(resourceType string, resp *bool) error
func (*ProviderRPCServer) FinalizeTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) FinalizeTemplates(terralessData TerralessData, resp *string) error
func (*ProviderRPCServer) GenerateHelperFunctionCommand ¶ added in v0.3.1
func (server *ProviderRPCServer) GenerateHelperFunctionCommand(args GenerateHelperFunctionCommandArgs, resp *string) error
func (*ProviderRPCServer) Info ¶ added in v0.1.33
func (server *ProviderRPCServer) Info(args interface{}, resp *PluginInfo) error
func (*ProviderRPCServer) PrepareSession ¶ added in v0.1.33
func (server *ProviderRPCServer) PrepareSession(terralessConfig TerralessConfig, resp *map[string]string) error
func (*ProviderRPCServer) ProcessUpload ¶ added in v0.1.33
func (server *ProviderRPCServer) ProcessUpload(args ProcessUploadArgs, resp *[]string) error
func (*ProviderRPCServer) RenderAuthorizerTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) RenderAuthorizerTemplates(config TerralessConfig, resp *string) error
func (*ProviderRPCServer) RenderCertificateTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) RenderCertificateTemplates(config TerralessConfig, resp *string) error
func (*ProviderRPCServer) RenderEndpointTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) RenderEndpointTemplates(config TerralessConfig, resp *string) error
func (*ProviderRPCServer) RenderFunctionTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) RenderFunctionTemplates(args RenderFunctionTemplatesArgs, resp *string) error
func (*ProviderRPCServer) RenderUploadTemplates ¶ added in v0.1.33
func (server *ProviderRPCServer) RenderUploadTemplates(terralessData TerralessData, resp *string) error
type RenderFunctionTemplatesArgs ¶ added in v0.1.35
type RenderFunctionTemplatesArgs struct { ResourceType string FunctionEvents FunctionEvents TerralessData *TerralessData }
type TerralessActiveProvider ¶
type TerralessActiveProvider struct { Team string `yaml:"Team"` Providers []TerralessProvider `yaml:"Providers"` }
type TerralessAuthorizer ¶
type TerralessBackend ¶
type TerralessCertificate ¶
type TerralessCloudfront ¶
type TerralessCloudfront struct { Aliases []string `yaml:"Aliases"` Caching TerralessCloudfrontCaching `yaml:"Caching"` Certificate string `yaml:"Certificate"` Handler string `yaml:"Handler"` LambdaFunctionAssociation map[string]string `yaml:"LambdaFunctionAssociation"` NoCreateBucket bool `yaml:"NoCreateBucket"` Domain string `yaml:"Domain"` LoggingEnabled bool `yaml:"LoggingEnabled"` PriceClass string `yaml:"PriceClass"` }
type TerralessConfig ¶
type TerralessConfig struct { Authorizers map[string]TerralessAuthorizer Backend TerralessBackend Certificates map[string]TerralessCertificate Endpoints []TerralessEndpoint Functions map[string]TerralessFunction Package TerralessPackage ProjectName string Providers map[string]TerralessProvider Settings TerralessSettings SourcePath string TargetPath string Uploads []TerralessUpload // only for rendering template HasProvider map[string]bool Runtimes []string }
func BuildTerralessConfig ¶
func BuildTerralessConfig(globalCfg TerralessGlobalConfig, projectCfg TerralessProjectConfig, arguments Arguments) TerralessConfig
func (TerralessConfig) Validate ¶
func (cfg TerralessConfig) Validate() []string
type TerralessCors ¶
type TerralessData ¶
type TerralessData struct { ActiveProviders map[string]TerralessProvider Arguments Arguments Config TerralessConfig GlobalConfig TerralessGlobalConfig Plugins []TerralessPlugin }
type TerralessEndpoint ¶ added in v0.1.12
type TerralessFunction ¶
type TerralessFunction struct { Description string `yaml:"Description"` Environment map[string]string `yaml:"Environment"` Events []TerralessFunctionEvent `yaml:"Events"` Handler string `yaml:"Handler"` MemorySize int `yaml:"MemorySize"` RoleArn string `yaml:"RoleArn"` Runtime string `yaml:"Runtime"` Timeout int `yaml:"Timeout"` Type string `yaml:"Type"` // only for rendering template AddApiGatewayPermission bool FunctionName string ProjectName string RenderEnvironment bool }
type TerralessFunctionEvent ¶
type TerralessFunctionEvent struct { Authorizer string `yaml:"Authorizer"` Arn string `yaml:"Arn"` Cors TerralessCors `yaml:"Cors"` Event map[string]string `yaml:"Event"` Method string `yaml:"Method"` Path string `yaml:"Path"` Rate string `yaml:"Rate"` Route string `yaml:"Route"` Type string `yaml:"Type"` // only for rendering template Authorization string AuthorizerId string FunctionName string Idx string ProjectName string PathsRendered map[string]string ResourceNameForPath string }
type TerralessGlobalConfig ¶
type TerralessGlobalConfig struct { Backends []TerralessBackend `yaml:"Backends"` Plugins []TerralessPlugin `yaml:"Plugins"` Teams []TerralessTeam `yaml:"Teams"` Uploads []TerralessUpload `yaml:"Uploads"` }
type TerralessPackage ¶
type TerralessPlugin ¶ added in v0.1.31
type TerralessProjectConfig ¶
type TerralessProjectConfig struct { Authorizers map[string]TerralessAuthorizer `yaml:"Authorizers"` ActiveProviders []TerralessActiveProvider `yaml:"ActiveProviders"` Backend TerralessBackend `yaml:"Backend"` Certificates map[string]TerralessCertificate `yaml:"Certificates"` Endpoints []TerralessEndpoint `yaml:"Endpoints"` Functions map[string]TerralessFunction `yaml:"Functions"` Package TerralessPackage `yaml:"Package"` ProjectName string `yaml:"ProjectName"` Settings TerralessSettings `yaml:"Settings"` SourcePath string `yaml:"SourcePath"` TargetPath string `yaml:"TargetPath"` Uploads []TerralessUpload `yaml:"Uploads"` // only for rendering template HasProvider map[string]bool Runtimes []string TeamData map[string]map[string]string }
func (*TerralessProjectConfig) Validate ¶
func (cfg *TerralessProjectConfig) Validate() *TerralessProjectConfig
type TerralessProvider ¶
type TerralessSettings ¶
type TerralessSettings struct { AutoSignIn bool `yaml:"AutoSignIn"` AutoSignInInCloud bool `yaml:"AutoSignInInCloud"` NoProviderGeneration bool `yaml:"NoProviderGeneration"` Permissions []Permissions `yaml:"Permissions"` Runtime string `yaml:"Runtime"` TerraformPluginDir string `yaml:"TerraformPluginDir"` Variables map[string]string `yaml:"Variables"` }
type TerralessTeam ¶
type TerralessTeam struct { Data map[string]string `yaml:"Data"` Name string `yaml:"Name"` Providers []TerralessProvider `yaml:"Providers"` }
type TerralessType ¶
type TerralessUpload ¶
type TerralessUpload struct { Bucket string `yaml:"Bucket"` Cloudfront TerralessCloudfront `yaml:"Cloudfront"` Provider string `yaml:"Provider"` Region string `yaml:"Region"` Source string `yaml:"Source"` Target string `yaml:"Target"` Type string `yaml:"Type"` // only for rendering template Certificate TerralessCertificate Environment string LambdaAtEdgeFile string OwnCertificate bool ProjectName string }
Click to show internal directories.
Click to hide internal directories.