config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 3 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 {
	Source      string              `yaml:"source"`
	Name        string              `yaml:"name"`
	Description string              `yaml:"description"`
	Envars      []map[string]string `yaml:"envars,omitempty"`
	Verb        string              `yaml:"verb"`
	Path        string              `yaml:"path"`
	Files       []File              `yaml:"files,omitempty"`
}

type Config

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

type Cron

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

type DefaultConfig

type DefaultConfig map[string]string

type Diagram

type Diagram struct {
	StackName string  `yaml:"stack_name"`
	Modules   Modules `yaml:"modules"`
}

type File

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

type Folder

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

type Lambda

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

type Modules

type Modules struct {
	Lambda string `yaml:"lambda"`
}

type RestfulAPI

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

type S3

type S3 struct {
	Name           string `yaml:"name"`
	ExpirationDays int    `yaml:"expiration-days,omitempty"`
}

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).

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"`
}

type SQSTrigger

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

type Stack

type Stack struct {
	StackName string   `yaml:"stack_name"`
	Folders   []Folder `yaml:"folders"`
}

type Structure

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

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