Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultEnvironment = "unspecified" DefaultAccount = "677459762413" DefaultRegion = "us-west-2" )
View Source
const GoCobraCliName = "go-cobra-cli"
View Source
const GoLambdaName = "go-lambda"
Variables ¶
View Source
var ( ErrUnsupportedFileType = errors.New("unsupported config file type") ErrUnsupportedTemplate = errors.New("unsupported template selected") )
View Source
var Debug bool = false
Functions ¶
func FindConfigPath ¶
func FindConfigPath() string
Types ¶
type Config ¶
type Config struct { Name string `json:"name" yaml:"name"` Template string `json:"template" yaml:"template"` Parameters map[string]interface{} `json:"parameters" yaml:"parameters"` }
var Cfg Config
func (Config) GetTemplater ¶
type DeployConfig ¶
type DeployConfig struct { // Environment is the name of the environment to deploy to. Environment string `json:"environment" yaml:"environment"` // Account is the AWS account ID used to deploy to this environment. Account string `json:"account,omitempty" yaml:"account,omitempty"` // RoleARN is the ARN of the role used to deploy to this environment. RoleARN string `json:"roleArn,omitempty" yaml:"roleArn,omitempty"` // Region is the AWS region this environment will be deployed into. Region string `json:"region,omitempty" yaml:"region,omitempty"` // If is the value of the `if` field for the GitHub Actions job that will // deploy this application. If string `json:"if,omitempty" yaml:"if,omitempty"` }
func (*DeployConfig) UnmarshalJSON ¶
func (c *DeployConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the JSON blob while adding default values contextually
type GoCobraCliConfig ¶
type GoCobraCliConfig struct { Config GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"` Lint GolangCILintConfig `json:"lint,omitempty" yaml:"lint,omitempty"` Nix NixGoConfig `json:"nix,omitempty" yaml:"nix,omitempty"` PrivateModules string `json:"privateModules,omitempty" yaml:"privateModules,omitempty"` }
func NewGoCobraCliConfig ¶
func NewGoCobraCliConfig(c Config) GoCobraCliConfig
func (GoCobraCliConfig) Render ¶
func (c GoCobraCliConfig) Render() error
type GoLambdaConfig ¶
type GoLambdaConfig struct { Config GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"` Lint GolangCILintConfig `json:"lint,omitempty" yaml:"lint,omitempty"` Nix NixGoConfig `json:"nix,omitempty" yaml:"nix,omitempty"` Quirk QuirkConfig `json:"quirk,omitempty" yaml:"quirk,omitempty"` Deploy []DeployConfig `json:"deploy,omitempty" yaml:"deploy,omitempty"` PrivateModules string `json:"privateModules,omitempty" yaml:"privateModules,omitempty"` Lambdas []string `json:"lambdas,omitempty" yaml:"lambdas,omitempty"` OpenAPI OpenAPIConfig `json:"openapi,omitempty" yaml:"openapi,omitempty"` }
func NewGoLambdaConfig ¶
func NewGoLambdaConfig(c Config) GoLambdaConfig
func (GoLambdaConfig) Render ¶
func (c GoLambdaConfig) Render() error
type GolangCILintConfig ¶
type GolangCILintConfig struct { Exclude []string `json:"exclude,omitempty" yaml:"exclude,omitempty"` ExtraExclude []string `json:"extraExclude,omitempty" yaml:"extraExclude,omitempty"` }
func NewGolangCiLintConfig ¶
func NewGolangCiLintConfig() GolangCILintConfig
type NixCachixConfig ¶
type NixCachixConfig struct {
BinaryCache string `json:"binaryCache,omitempty" yaml:"binaryCache,omitempty"`
}
type NixConfig ¶
type NixConfig struct { Cachix NixCachixConfig `json:"cachix,omitempty" yaml:"cachix,omitempty"` NixpkgsBranch string `json:"nixpkgsBranch,omitempty" yaml:"nixpkgsBranch,omitempty"` Systems []string `json:"systems,omitempty" yaml:"systems,omitempty"` }
func NewNixConfig ¶
func NewNixConfig() NixConfig
type NixGoConfig ¶
type OpenAPIConfig ¶
type OpenAPIConfig struct { Enable bool `json:"enable" yaml:"enable"` Filename string `json:"filename" yaml:"filename"` }
func NewOpenAPIConfig ¶
func NewOpenAPIConfig() OpenAPIConfig
type QuirkConfig ¶
type QuirkConfig struct {
Service string `json:"service,omitempty" yaml:"service,omitempty"`
}
func NewQuirkConfig ¶
func NewQuirkConfig(c Config) QuirkConfig
Click to show internal directories.
Click to hide internal directories.