helpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsTestingMode = false

enable testing mode

Functions

func GetAwsWaiterDelays

func GetAwsWaiterDelays(minDelay time.Duration, maxDelay time.Duration) (time.Duration, time.Duration)

Will return the min/max delays to use for a waiter during test mode, it sets them to 1 microsecond

func GetDefaultTaskTemplateFields

func GetDefaultTaskTemplateFields(ctx *config.Context, common *config.CommonTaskAttrs) (tmpl.Fields, error)

func GetECSClusterNameFromArn

func GetECSClusterNameFromArn(str string) string

func GetECSServiceNameFromArn

func GetECSServiceNameFromArn(str string) string

func GetEventRuleNameAndBusFromArn

func GetEventRuleNameAndBusFromArn(str string) (string, string)

return = (ruleName, eventBus)

func GetMarkerTag added in v0.3.0

func GetMarkerTag(ctx *config.Context) (string, string, error)

Returns (key, value, err)

func GetTaskDefFamilyFromArn

func GetTaskDefFamilyFromArn(str string) string

func GetTaskIdFromArn added in v0.3.0

func GetTaskIdFromArn(str string) string

func GetTemplatedPrefix

func GetTemplatedPrefix(ctx *config.Context, tplStr string) (string, error)

This should get the first part of a template string before any dynamic fields exist. so it can include project name, stage, cluster, but it is cut at the point where it would reference a service/name/task

func IsArnForService

func IsArnForService(str string, serviceCode string) bool

func NameValuePairMerger

func NameValuePairMerger(pairs ...[]config.NameValuePair) []config.NameValuePair

This will merge multiple arrays of NameValuePairs and then return a unique array

func NameValuePairTemplater

func NameValuePairTemplater(ctx *config.Context, fields tmpl.Fields, pairs []config.NameValuePair) ([]config.NameValuePair, error)

func NameValuePair_Build_Tags

func NameValuePair_Build_Tags[T any](ctx *config.Context, thisTags []config.NameValuePair, tplFields tmpl.Fields, buildFunc func(string, string) T, extraTags ...[]config.NameValuePair) ([]T, map[string]string, error)

build up a list of tags using the various NVPs

func ResolveImageUri

func ResolveImageUri(ctx *config.Context, img *config.ImageUri) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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