add

package
v0.0.0-...-6f9ab45 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageDataTypeBlob = "Blobs"
)

Variables

DbMap is a map of supported database dependencies.

LanguageMap is a map of supported languages.

Functions

func Configure

Configure fills in the fields for a resource.

func DiffBlocks

func DiffBlocks(old map[string]*project.ResourceConfig, new map[string]*project.ResourceConfig) (string, error)

DiffBlocks returns a textual diff of new - old.

It compares the values in old and new, and generates a textual diff for each value difference between old and new. It doesn't currently support deletions of new from old.

func Metadata

func Metadata(r *project.ResourceConfig) resourceMeta

func NewAddAction

func NewAddAction(
	azdCtx *azdcontext.AzdContext,
	envManager environment.Manager,
	subManager *account.SubscriptionsManager,
	alphaManager *alpha.FeatureManager,
	env *environment.Environment,
	creds account.SubscriptionCredentialProvider,
	prompter prompt.Prompter,
	rm infra.ResourceManager,
	armClientOptions *arm.ClientOptions,
	azd workflow.AzdCommandRunner,
	accountManager account.Manager,
	console input.Console,
	azureClient *azapi.AzureClient) actions.Action

func NewAddCmd

func NewAddCmd() *cobra.Command

func PromptPort

func PromptPort(
	console input.Console,
	ctx context.Context,
	name string,
	svc appdetect.Project) (int, error)

PromptPort prompts for port selection from an appdetect project.

func ServiceFromDetect

func ServiceFromDetect(
	root string,
	svcName string,
	prj appdetect.Project) (project.ServiceConfig, error)

ServiceFromDetect creates a ServiceConfig from an appdetect project.

Types

type AddAction

type AddAction struct {
	// contains filtered or unexported fields
}

func (*AddAction) Run

type Menu struct {
	// Namespace of the resource type.
	Namespace string
	// Label displayed in the menu.
	Label string

	// SelectResource is the continuation that returns the resource with type filled in.
	SelectResource resourceSelection
}

A menu to be displayed.

type Model

type Model struct {
	Name             string          `json:"name"`
	Skus             []ModelSku      `json:"skus"`
	Version          string          `json:"version"`
	SystemData       ModelSystemData `json:"systemData"`
	Format           string          `json:"format"`
	IsDefaultVersion bool            `json:"isDefaultVersion"`
}

type ModelCatalog

type ModelCatalog struct {
	ModelList
	Locations []string
}

type ModelCatalogKind

type ModelCatalogKind struct {
	Kinds map[string]ModelCatalogVersions
}

type ModelCatalogVersions

type ModelCatalogVersions struct {
	Versions map[string]ModelCatalog
}

type ModelList

type ModelList struct {
	Kind  string `json:"kind"`
	Model Model  `json:"model"`
}

type ModelResponse

type ModelResponse struct {
	Value    []ModelList `json:"value"`
	NextLink *string     `json:"nextLink"`
}

type ModelSku

type ModelSku struct {
	Name      string           `json:"name"`
	UsageName string           `json:"usageName"`
	Capacity  ModelSkuCapacity `json:"capacity"`
}

type ModelSkuCapacity

type ModelSkuCapacity struct {
	Maximum int32 `json:"maximum"`
	Minimum int32 `json:"minimum"`
	Step    int32 `json:"step"`
	Default int32 `json:"default"`
}

type ModelSystemData

type ModelSystemData struct {
	CreatedAt string `json:"createdAt"`
}

type PromptOptions

type PromptOptions struct {
	// PrjConfig is the current project configuration.
	PrjConfig *project.ProjectConfig
}

PromptOptions contains common options for prompting.

Jump to

Keyboard shortcuts

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