Documentation
¶
Index ¶
- Constants
- Variables
- func Configure(ctx context.Context, r *project.ResourceConfig, console input.Console, ...) (*project.ResourceConfig, error)
- func ConfigureExisting(ctx context.Context, r *project.ResourceConfig, console input.Console, ...) (*project.ResourceConfig, error)
- func DiffBlocks(old map[string]*project.ResourceConfig, new map[string]*project.ResourceConfig) (string, error)
- func Metadata(r *project.ResourceConfig) metaDisplay
- func NewAddAction(azdCtx *azdcontext.AzdContext, envManager environment.Manager, ...) actions.Action
- func NewAddCmd() *cobra.Command
- func PromptPort(console input.Console, ctx context.Context, name string, svc appdetect.Project) (int, error)
- func ServiceFromDetect(root string, svcName string, prj appdetect.Project, ...) (project.ServiceConfig, error)
- type AddAction
- type Menu
- type Model
- type ModelCatalog
- type ModelCatalogKind
- type ModelCatalogVersions
- type ModelList
- type ModelResponse
- type ModelSku
- type ModelSkuCapacity
- type ModelSystemData
- type PromptOptions
Constants ¶
const (
StorageDataTypeBlob = "Blobs"
)
Variables ¶
var DbMap = map[appdetect.DatabaseDep]project.ResourceType{ appdetect.DbMongo: project.ResourceTypeDbMongo, appdetect.DbPostgres: project.ResourceTypeDbPostgres, appdetect.DbMySql: project.ResourceTypeDbMySql, appdetect.DbRedis: project.ResourceTypeDbRedis, }
DbMap is a map of supported database dependencies.
var HostMap = map[project.ResourceType]project.ServiceTargetKind{ project.ResourceTypeHostAppService: project.AppServiceTarget, project.ResourceTypeHostContainerApp: project.ContainerAppTarget, }
var LanguageMap = map[appdetect.Language]project.ServiceLanguageKind{ appdetect.DotNet: project.ServiceLanguageDotNet, appdetect.Java: project.ServiceLanguageJava, appdetect.JavaScript: project.ServiceLanguageJavaScript, appdetect.TypeScript: project.ServiceLanguageTypeScript, appdetect.Python: project.ServiceLanguagePython, }
LanguageMap is a map of supported languages.
var ServiceLanguageMap = map[project.ServiceLanguageKind]project.AppServiceRuntime{ project.ServiceLanguagePython: { Stack: project.AppServiceRuntimeStackPython, Version: "3.13", }, project.ServiceLanguageJavaScript: { Stack: project.AppServiceRuntimeStackNode, Version: "22-lts", }, project.ServiceLanguageTypeScript: { Stack: project.AppServiceRuntimeStackNode, Version: "22-lts", }, }
TODO: Dynamic support for versions using /providers/Microsoft.Web/webAppStacks API
Functions ¶
func Configure ¶
func Configure( ctx context.Context, r *project.ResourceConfig, console input.Console, p PromptOptions) (*project.ResourceConfig, error)
Configure fills in the fields for a resource.
func ConfigureExisting ¶
func ConfigureExisting( ctx context.Context, r *project.ResourceConfig, console input.Console, p PromptOptions) (*project.ResourceConfig, error)
ConfigureExisting prompts the user to configure details for an existing 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) metaDisplay
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, resourceService *azapi.ResourceService, armClientOptions *arm.ClientOptions, azd workflow.AzdCommandRunner, accountManager account.Manager, console input.Console, azureClient *azapi.AzureClient, importManager *project.ImportManager) actions.Action
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, svcKind project.ServiceTargetKind, ) (project.ServiceConfig, error)
ServiceFromDetect creates a ServiceConfig from an appdetect project.
Types ¶
type AddAction ¶
type AddAction struct {
// contains filtered or unexported fields
}
func (*AddAction) ConfigureLive ¶
func (a *AddAction) ConfigureLive( ctx context.Context, r *project.ResourceConfig, console input.Console, p PromptOptions) (*project.ResourceConfig, error)
ConfigureLive fills in the fields for a resource by first querying live Azure for information.
This is used in addition to Configure currently.
type Menu ¶
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 ModelCatalog ¶
type ModelCatalogKind ¶
type ModelCatalogKind struct {
Kinds map[string]ModelCatalogVersions
}
type ModelCatalogVersions ¶
type ModelCatalogVersions struct {
Versions map[string]ModelCatalog
}
type ModelResponse ¶
type ModelSku ¶
type ModelSku struct { Name string `json:"name"` UsageName string `json:"usageName"` Capacity ModelSkuCapacity `json:"capacity"` }
type ModelSkuCapacity ¶
type ModelSystemData ¶
type ModelSystemData struct {
CreatedAt string `json:"createdAt"`
}
type PromptOptions ¶
type PromptOptions struct { // PrjConfig is the current project configuration. PrjConfig *project.ProjectConfig // ExistingId is the ID of an existing resource. // This is only used to configure the resource with an existing resource. ExistingId string }
PromptOptions contains common options for prompting.