Documentation ¶
Index ¶
- Constants
- func GetClusterNameFromARN(clusterARN string) (string, error)
- func GetEntityVersion(entityVersion string) (int64, error)
- func IsClusterARN(clusterARN string) bool
- func IsClusterName(clusterName string) bool
- func IsEntityVersion(entityVersion string) bool
- func IsInstanceARN(instanceARN string) bool
- func IsTaskARN(taskARN string) bool
Constants ¶
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]+$" )
Variables ¶
This section is empty.
Functions ¶
func GetClusterNameFromARN ¶
GetClusterNameFromARN extracts the cluster name from a cluster ARN
func GetEntityVersion ¶ added in v0.2.0
GetEntityVersion extracts the entity version as an int.
func IsClusterARN ¶
IsClusterARN validates a cluster ARN against the cluster ARN regex
func IsClusterName ¶
IsClusterName validates a cluster name against the cluster name regex
func IsEntityVersion ¶ added in v0.2.0
IsEntityVersion validates an entity version as a positive integer
func IsInstanceARN ¶
IsInstanceARN validates an instance ARN against the instance ARN regex
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.