utils

package
v0.0.0-...-0a19d84 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENIStatusAttached = "ATTACHED"
	ENIAttachmentType = "ElasticNetworkInterface"
)

Variables

This section is empty.

Functions

func CreateSecurityGroup

func CreateSecurityGroup(
	ctx context.Context,
	sess *session.Session,
	name string,
	vpcId *string,
	ports ...int,
) (*string, error)

func DefaultPublicSubnets

func DefaultPublicSubnets(ctx context.Context, sess *session.Session) ([]*string, *string, error)

func DefaultSubnets

func DefaultSubnets(ctx context.Context, sess *session.Session) ([]*string, *string, error)

func ECSTaskPublicIPs

func ECSTaskPublicIPs(sess *session.Session, tasks []*ecs.Task) ([]string, error)

func Error

func Error(err error) error

Error takes an error and turns an ozzo-validation.Errors into a gRPC status error with field violations populated. If the error is nil or not an ozzo-validation error, it is returned as-is.

Note that validate.Validate doesn't return a validate.Errors. Only validation on structs and other containers will return the proper structure that will be wrapped by this call. This should be used against request structures.

func GetSession

func GetSession(c *SessionConfig) (*session.Session, error)

func OptionalInt64

func OptionalInt64(v int64) *int64

func RegisterTaskDefinition

func RegisterTaskDefinition(
	def *ecs.RegisterTaskDefinitionInput,
	ecsSvc *ecs.ECS,
	log hclog.Logger,
) (*ecs.TaskDefinition, error)

func ValidateEcsMemCPUPair

func ValidateEcsMemCPUPair(mem, cpu int) error

Types

type SessionConfig

type SessionConfig struct {
	Region string
	Logger hclog.Logger
}

Jump to

Keyboard shortcuts

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