middleware

package
v0.0.0-...-6189ae3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EC2ClientContext is the key to retrieve a Super client from the command context
	EC2ClientContext key
)

Variables

This section is empty.

Functions

func MustGetEC2Client

func MustGetEC2Client(ctx context.Context) *ec2.Client

MustGetEC2Client returns the Django EC2 from the context. If the client does not exist in the context, this function panics.

func NewEC2Client

func NewEC2Client(cmd *cobra.Command, _ []string) error

NewEC2Client is middleware to use for CLI commands that require a Super API client. It creates a new Super API client and adds it to the provided command's context. If a Consul client does not exist in the context, it will be created and added to the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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