Version: v0.0.0-...-abfb793 Latest Latest

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

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 5 Imported by: 0




View Source
const (
	ClusterNameRegex            = "^" + clusterNameRegexWithoutStart
	ClusterARNRegex             = "^(arn:aws:ecs:)([\\-\\w]+):[0-9]{12}:(cluster)/" + clusterNameRegexWithoutStart
	ClusterNameAsARNSuffixRegex = "/" + clusterNameRegexWithoutStart
	TaskARNRegex                = "^(arn:aws:ecs):([\\-\\w]+):[0-9]{12}:(task)\\/[\\-\\w]+$"
	InstanceARNRegex            = "^(arn:aws:ecs:)([\\-\\w]+):[0-9]{12}:(container\\-instance)\\/[\\-\\w]+$"


This section is empty.


func GetClusterNameFromARN

func GetClusterNameFromARN(clusterARN string) (string, error)

GetClusterNameFromARN extracts the cluster name from a cluster ARN

func GetEntityVersion

func GetEntityVersion(entityVersion string) (int64, error)

GetEntityVersion extracts the entity version as an int.

func IsClusterARN

func IsClusterARN(clusterARN string) bool

IsClusterARN validates a cluster ARN against the cluster ARN regex

func IsClusterName

func IsClusterName(clusterName string) bool

IsClusterName validates a cluster name against the cluster name regex

func IsEntityVersion

func IsEntityVersion(entityVersion string) bool

IsEntityVersion validates an entity version as a positive integer

func IsInstanceARN

func IsInstanceARN(instanceARN string) bool

IsInstanceARN validates an instance ARN against the instance ARN regex

func IsTaskARN

func IsTaskARN(taskARN string) bool

IsTaskARN validates a task ARN against the task ARN regex


This section is empty.

Jump to

Keyboard shortcuts

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