resources

package
v0.0.0-...-17a060d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EnvarSuffixDBHost           = "DB_HOST"
	EnvarSuffixGoogleBQ         = "BQ_PROJECT_ID"
	EnvarSuffixKinesisStreamURL = "KINESIS_STREAM_URL"
	EnvarSuffixS3BucketURL      = "S3_BUCKET"
	EnvarSuffixS3BucketName     = "BUCKET_NAME"
	EnvarSuffixSQSQueueURL      = "SQS_QUEUE_URL"
	EnvarSuffixRestfulAPI       = "API_BASE_URL"
)
View Source
const (
	LabelAWSAPIGatewayAPI            = "aws_apigatewayv2_api"
	LabelAWSAPIGatewayRoute          = "aws_apigatewayv2_route"
	LabelAWSAPIGatewayIntegration    = "aws_apigatewayv2_integration"
	LabelAWSCloudwatchEventTarget    = "aws_cloudwatch_event_target"
	LabelAWSCron                     = "aws_cloudwatch_event_rule"
	LabelAWSEndpoint                 = "aws_apigatewayv2_domain_name"
	LabelAWSKinesisStream            = "aws_kinesis_stream"
	LabelAWSLambdaFunction           = "aws_lambda_function"
	LabelAWSLambdaEventSourceMapping = "aws_lambda_event_source_mapping"
	LabelAWSS3Bucket                 = "aws_s3_bucket"
	LabelAWSSQSQueue                 = "aws_sqs_queue"
	LabelAWSSNSTopic                 = "aws_sns_topic"
)

AWS labels.

Variables

View Source
var (
	ToDatabaseCase   = strcase.ToKebab
	ToGoogleBQCase   = strcase.ToKebab
	ToKinesisCase    = strcase.ToPascal
	ToLambdaCase     = strcase.ToCamel
	ToS3BucketCase   = strcase.ToKebab
	ToSQSCase        = strcase.ToKebab
	ToSNSCase        = strcase.ToKebab
	ToRestfulAPICase = strcase.ToPascal
)
View Source
var AvailableTypes = []string{
	APIGatewayType.String(),
	CronType.String(),
	DatabaseType.String(),
	EndpointType.String(),
	GoogleBQType.String(),
	KinesisType.String(),
	LambdaType.String(),
	RestfulAPIType.String(),
	S3Type.String(),
	SQSType.String(),
	SNSType.String(),
}
View Source
var SuffixByResource = map[ResourceType]string{
	KinesisType: "kinesis",
	S3Type:      "bucket",
	SQSType:     "sqs",
}

Functions

This section is empty.

Types

type AWSResourceFactory

type AWSResourceFactory struct{}

func (*AWSResourceFactory) CreateResource

func (f *AWSResourceFactory) CreateResource(id, value, style string) resources.Resource

CreateResource creates a resource based on cell data.

type ResourceARN

type ResourceARN struct {
	Type  string
	Name  string
	Label string
}

func ParseResourceARN

func ParseResourceARN(arn string, suggestedResType ResourceType) ResourceARN

func (*ResourceARN) LabelOrName

func (r *ResourceARN) LabelOrName() (value string)

type ResourceType

type ResourceType string
const (
	// APIGatewayType represents the API Gateway resource type.
	APIGatewayType ResourceType = "apigateway"

	// CronType represents the Cron resource type.
	CronType ResourceType = "cron"

	// DatabaseType represents the Database resource type.
	DatabaseType ResourceType = "database"

	// EndpointType represents the Endpoint resource type.
	EndpointType ResourceType = "endpoint"

	// GoogleBQType represents the Google BigQuery resource type.
	GoogleBQType ResourceType = "googlebq"

	// KinesisType represents the Kinesis resource type.
	KinesisType ResourceType = "kinesis"

	// LambdaType represents the Lambda resource type.
	LambdaType ResourceType = "lambda"

	// RestfulAPIType represents the Restful API resource type.
	RestfulAPIType ResourceType = "restfulapi"

	// S3Type represents the S3 resource type.
	S3Type ResourceType = "s3"

	// SNSType represents the SNS resource type.
	SNSType ResourceType = "sns"

	// SQSType represents the SQS resource type.
	SQSType ResourceType = "sqs"

	// UnknownType represents an unknown resource type.
	UnknownType ResourceType = "unknown"
)

func ParseResourceType

func ParseResourceType(s string) ResourceType

ParseResourceType parses a ResourceType from a string.

func (ResourceType) String

func (rt ResourceType) String() string

String returns the string representation of a ResourceType.

Jump to

Keyboard shortcuts

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