builder

package
v0.0.0-...-3f1c2bf Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsActions

func ContainsActions(target string, sas []schemas.ScheduledAction) bool

ContainsActions checks if scheduled action is specified

func ExtractAppliedConfig

func ExtractAppliedConfig(config schemas.Config) [][]string

ExtractAppliedConfig extracts configurations that are used in the deployment

func HasProhibited

func HasProhibited(tags []string) bool

HasProhibited checks if there is any prohibited tags

func ParseMetricConfig

func ParseMetricConfig(disabledMetrics bool, filename string) (schemas.MetricConfig, error)

func ParsingManifestFile

func ParsingManifestFile(manifest string) (schemas.AWSConfig, []schemas.Stack, []*schemas.APITestTemplate)

Parsing Manifest File

func ReadAWSConfig

func ReadAWSConfig() (*ini.File, error)

ReadAWSConfig parse an aws configuration

func ReadAWSCredentials

func ReadAWSCredentials() (*ini.File, error)

ReadAWSCredentials parse an aws credentials

func RefineConfig

func RefineConfig(config schemas.Config) (schemas.Config, error)

RefineConfig refines the values for clear setting

func ValidCronExpression

func ValidCronExpression(expression string) (bool, error)

ValidCronExpression checks if the cron expression is valid or not It should be [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]

Types

type Builder

type Builder struct {
	// Config from command
	Config schemas.Config

	// AWS related Configuration
	AwsConfig schemas.AWSConfig

	// Configuration for metrics
	MetricConfig schemas.MetricConfig

	// Stack configuration
	Stacks []schemas.Stack

	// API Test configuration
	APITestTemplates []*schemas.APITestTemplate
}

func NewBuilder

func NewBuilder(config *schemas.Config) (Builder, error)

NewBuilder create new builder

func (Builder) CheckValidation

func (b Builder) CheckValidation() error

CheckValidation validates all configurations

func (Builder) PreConfigValidation

func (b Builder) PreConfigValidation() error

PreConfigValidation validates manifest existence

func (Builder) PrintSummary

func (b Builder) PrintSummary(out io.Writer, targetStack, targetRegion string) error

MakeSummary prints all configurations in summary

func (Builder) SetManifestConfig

func (b Builder) SetManifestConfig() Builder

SetManifestConfig set manifest configuration from local file

func (Builder) SetManifestConfigWithS3

func (b Builder) SetManifestConfigWithS3(fileBytes []byte) Builder

SetManifestConfigWithS3 set manifest configuration with s3

func (Builder) SetStacks

func (b Builder) SetStacks(stacks []schemas.Stack) Builder

SetStacks set stack information

type LocalProvider

type LocalProvider struct {
	Path string
}

func (LocalProvider) Provide

func (l LocalProvider) Provide() (string, error)

Provide provides userdata from local file

type S3Provider

type S3Provider struct {
	Path string
}

func (S3Provider) Provide

func (s S3Provider) Provide() (string, error)

Provide provides userdata from s3 Need to develop

type UserdataProvider

type UserdataProvider interface {
	Provide() (string, error)
}

func SetUserdataProvider

func SetUserdataProvider(userdata schemas.Userdata, defaultUserdata schemas.Userdata) UserdataProvider

Set Userdata provider

Jump to

Keyboard shortcuts

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