config

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGateway

type APIGateway struct {
	StackName string             `yaml:"stack_name"`
	APIDomain string             `yaml:"api_domain"`
	APIG      bool               `yaml:"apig"`
	Lambdas   []APIGatewayLambda `yaml:"lambdas"`
}

type APIGatewayLambda

type APIGatewayLambda struct {
	Name        string            `yaml:"name"`
	Source      string            `yaml:"source"`
	RoleName    string            `yaml:"role_name,omitempty"`
	Runtime     string            `yaml:"runtime,omitempty"`
	Description string            `yaml:"description"`
	Envars      map[string]string `yaml:"envars,omitempty"`
	Verb        string            `yaml:"verb"`
	Path        string            `yaml:"path"`
	Files       []File            `yaml:"files,omitempty"`
}

func (*APIGatewayLambda) GetName added in v0.8.2

func (r *APIGatewayLambda) GetName() string

type Config

type Config struct {
	Draw                     Draw                     `yaml:"draw,omitempty"`
	OverrideDefaultTemplates OverrideDefaultTemplates `yaml:"override_default_templates,omitempty"`
	Diagram                  Diagram                  `yaml:"diagram,omitempty"`
	Structure                Structure                `yaml:"structure,omitempty"`
	APIGateways              []APIGateway             `yaml:"apigateways,omitempty"`
	Kinesis                  []Kinesis                `yaml:"kinesis,omitempty"`
	Lambdas                  []Lambda                 `yaml:"lambdas,omitempty"`
	Buckets                  []S3                     `yaml:"buckets,omitempty"`
	SNSs                     []SNS                    `yaml:"sns,omitempty"`
	SQSs                     []SQS                    `yaml:"sqs,omitempty"`
	RestfulAPIs              []RestfulAPI             `yaml:"restfulapis,omitempty"`
}

Config represents a configuration object that can be populated from a YAML file.

type Cron

type Cron struct {
	ScheduleExpression string `yaml:"schedule_expression"`
	IsEnabled          string `yaml:"is_enabled"`
}

type Diagram

type Diagram struct {
	StackName string         `yaml:"stack_name"`
	Lambda    DriagramLambda `yaml:"lambda"`
}

type Draw added in v0.7.0

type Draw struct {
	Name             string               `yaml:"name,omitempty"`
	Direction        dot.DiagramDirection `yaml:"direction,omitempty"`
	Splines          dot.DiagramSpline    `yaml:"splines,omitempty"`
	ReplaceableTexts ReplaceableTexts     `yaml:"replaceable_texts,omitempty"`
	Images           Images               `yaml:"images,omitempty"`
	Filters          Filters              `yaml:"filters,omitempty"`
}

type DriagramLambda added in v0.5.1

type DriagramLambda struct {
	Source   string `yaml:"source"`
	RoleName string `yaml:"role_name"`
	Runtime  string `yaml:"runtime,omitempty"`
}

type File

type File struct {
	Name    string   `yaml:"name"`
	Tmpl    string   `yaml:"tmpl,omitempty"`
	Imports []string `yaml:"imports,omitempty"`
}

type FilenameTemplateMap added in v0.6.2

type FilenameTemplateMap map[string]string

type Filter added in v0.7.0

type Filter struct {
	Match    []string `yaml:"match,omitempty"`
	NotMatch []string `yaml:"not_match,omitempty"`
}

type Filters added in v0.7.0

type Filters map[resources.ResourceType]Filter

type Folder

type Folder struct {
	Name    string   `yaml:"name"`
	Files   []File   `yaml:"files"`
	Folders []Folder `yaml:"folders"`
}

type Images added in v0.7.0

type Images map[awsresources.ResourceType]string

func (Images) ToStringMap added in v0.11.0

func (m Images) ToStringMap() map[string]string

type Kinesis added in v0.6.0

type Kinesis struct {
	Name            string `yaml:"name"`
	RetentionPeriod string `yaml:"retention_period,omitempty"`
	KMSKeyID        string `yaml:"kms_key_id,omitempty"`
	Files           []File `yaml:"files,omitempty"`
}

func (*Kinesis) GetName added in v0.8.2

func (r *Kinesis) GetName() string

type KinesisTrigger added in v0.6.0

type KinesisTrigger struct {
	SourceARN string `yaml:"source_arn"`
}

type Lambda

type Lambda struct {
	Name            string            `yaml:"name"`
	Source          string            `yaml:"source"`
	RoleName        string            `yaml:"role_name,omitempty"`
	Runtime         string            `yaml:"runtime,omitempty"`
	Description     string            `yaml:"description"`
	Envars          map[string]string `yaml:"envars,omitempty"`
	KinesisTriggers []KinesisTrigger  `yaml:"kinesis-triggers,omitempty"`
	SQSTriggers     []SQSTrigger      `yaml:"sqs-triggers,omitempty"`
	Crons           []Cron            `yaml:"crons,omitempty"`
	Files           []File            `yaml:"files,omitempty"`
}

func (*Lambda) GetName added in v0.8.2

func (r *Lambda) GetName() string

type OverrideDefaultTemplates added in v0.6.2

type OverrideDefaultTemplates struct {
	APIGateway []FilenameTemplateMap `yaml:"apigateway,omitempty"`
	Kinesis    []FilenameTemplateMap `yaml:"kinesis,omitempty"`
	Lambda     []FilenameTemplateMap `yaml:"lambda,omitempty"`
	S3Bucket   []FilenameTemplateMap `yaml:"bucket,omitempty"`
	SNS        []FilenameTemplateMap `yaml:"sns,omitempty"`
	SQS        []FilenameTemplateMap `yaml:"sqs,omitempty"`
}

type ReplaceableTexts added in v0.8.1

type ReplaceableTexts map[string]string

type Resource added in v0.8.2

type Resource interface {
	GetName() string
}

type RestfulAPI

type RestfulAPI struct {
	Name string `yaml:"name"`
}

func (*RestfulAPI) GetName added in v0.8.2

func (r *RestfulAPI) GetName() string

type S3

type S3 struct {
	Name           string `yaml:"name"`
	ExpirationDays int    `yaml:"expiration-days,omitempty"`
	Files          []File `yaml:"files,omitempty"`
}

func (*S3) GetName added in v0.8.2

func (r *S3) GetName() string

type SNS

type SNS struct {
	Name       string        `yaml:"name"`
	BucketName string        `yaml:"bucket_name"`
	Lambdas    []SNSResource `yaml:"lambdas,omitempty"`
	SQSs       []SNSResource `yaml:"sqs,omitempty"`
	Files      []File        `yaml:"files,omitempty"`
}

SNS represents the configuration for SNS (Simple Notification Service).

func (*SNS) GetName added in v0.8.2

func (r *SNS) GetName() string

type SNSResource

type SNSResource struct {
	Name         string   `yaml:"name"`
	Events       []string `yaml:"events"`
	FilterPrefix string   `yaml:"filter_prefix,omitempty"`
	FilterSuffix string   `yaml:"filter_suffix,omitempty"`
}

SNSResource represents a Lambda function or SQS configuration.

type SQS

type SQS struct {
	Name            string `yaml:"name"`
	MaxReceiveCount int32  `yaml:"max_receive_count"`
	Files           []File `yaml:"files,omitempty"`
}

func (*SQS) GetName added in v0.8.2

func (r *SQS) GetName() string

type SQSTrigger

type SQSTrigger struct {
	SourceARN string `yaml:"source_arn"`
}

type Stack

type Stack struct {
	Name    string   `yaml:"name"`
	Files   []File   `yaml:"files"`
	Folders []Folder `yaml:"folders"`
}

type Structure

type Structure struct {
	Stacks           []Stack               `yaml:"stacks"`
	DefaultTemplates []FilenameTemplateMap `yaml:"default_templates,omitempty"`
}

type YAML

type YAML struct {
	// contains filtered or unexported fields
}

func NewYAML

func NewYAML(fileName string) *YAML

func (*YAML) Parse

func (y *YAML) Parse() (*Config, error)

Jump to

Keyboard shortcuts

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