repository

package
v0.0.0-...-16b73bf Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 37 Imported by: 0

Documentation

Overview

Package repository provides handling of files in the user's code repository.

Index

Constants

View Source
const InitGenTemplateId = "azd-init"

Variables

View Source
var ErrNoServicesDetected = errors.New("no services detected in the current directory")

Functions

This section is empty.

Types

type EntryKind

type EntryKind string
const (
	EntryKindDetected EntryKind = "detection"
	EntryKindManual   EntryKind = "manual"
	EntryKindModified EntryKind = "modified"
)

type Initializer

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

Initializer handles the initialization of a local repository.

func NewInitializer

func NewInitializer(
	console input.Console,
	gitCli git.GitCli,
	dotnetCli dotnet.DotNetCli,
	lazyEnvManager *lazy.Lazy[environment.Manager],
) *Initializer

func (*Initializer) InitFromApp

func (i *Initializer) InitFromApp(
	ctx context.Context,
	azdCtx *azdcontext.AzdContext,
	initializeEnv func() (*environment.Environment, error)) error

InitFromApp initializes the infra directory and project file from the current existing app.

func (*Initializer) Initialize

func (i *Initializer) Initialize(
	ctx context.Context,
	azdCtx *azdcontext.AzdContext,
	template *templates.Template,
	templateBranch string) error

Initializes a local repository in the project directory from a remote repository.

A confirmation prompt is displayed for any existing files to be overwritten.

func (*Initializer) InitializeMinimal

func (i *Initializer) InitializeMinimal(ctx context.Context, azdCtx *azdcontext.AzdContext) error

Initializes a minimal azd project.

func (*Initializer) PromptIfNonEmpty

func (i *Initializer) PromptIfNonEmpty(ctx context.Context, azdCtx *azdcontext.AzdContext) error

PromptIfNonEmpty prompts the user for confirmation if the project directory to initialize in is non-empty. Returns error if an error occurred while prompting, or if the user declines confirmation.

Jump to

Keyboard shortcuts

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