config

package
v0.0.2-0...-06f6063 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) bool

exists reports whether the named file or directory exists.

Types

type Functions

type Functions struct {
	LambdaName    string `yaml:"lambda_name" json:"lambda_name"`
	LambdaRuntime string `yaml:"lambda_runtime" json:"lambda_runtime"`
	Method        string `yaml:"method" json:"method"`
	RootPath      string `yaml:"root_path" json:"root_path"`
	Path          string `yaml:"path" json:"path"`
	Authorization string `yaml:"authorization" json:"authorization"`
	IAMPolicy     string `yaml:"iam_policy" json:"iam_policy"`
}

Functions struct for api gateway endpoints

type Provider

type Provider struct {
	Name    string `yaml:"name" json:"name"`
	Version string `yaml:"version" json:"version"`
	Region  string `yaml:"region" json:"region"`
	Profile string `yaml:"profile" json:"profile"`
}

Provider struct for aws provider

type TrexConfig

type TrexConfig struct {
	Provider  Provider    `yaml:"provider" json:"module_provider"`
	APIName   string      `yaml:"api_name" json:"api_name"`
	Functions []Functions `yaml:"functions" json:"functions"`
}

TrexConfig config struct for trex

func New

func New(configFile string) *TrexConfig

New returns Trexconfig

func (*TrexConfig) GenerateDefaultConfig

func (cfg *TrexConfig) GenerateDefaultConfig() error

GenerateDefaultConfig generates trex.yaml file

func (*TrexConfig) LoadConfig

func (cfg *TrexConfig) LoadConfig() (TrexConfig, error)

LoadConfig loads yaml config for trex

func (*TrexConfig) MakeVarJSON

func (cfg *TrexConfig) MakeVarJSON() error

MakeVarJSON converts yaml file to terraform.tfvars.json file

func (*TrexConfig) WorkingDirectory

func (cfg *TrexConfig) WorkingDirectory() string

WorkingDirectory set the working directory

Jump to

Keyboard shortcuts

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