internal

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermissionDirectory      os.FileMode = 0755
	PermissionExecutableFile os.FileMode = 0755
	PermissionFile           os.FileMode = 0644

	PermissionDirectoryOwnerOnly os.FileMode = 0700
	PermissionFileOwnerOnly      os.FileMode = 0600

	PermissionMaskDirectoryExecute os.FileMode = 0100
)

Variables

This section is empty.

Functions

func AzdConfigDir

func AzdConfigDir() (string, error)

func ComputeChecksum

func ComputeChecksum(filePath string) (string, error)

ComputeChecksum computes the SHA256 checksum of a file

func CopyFile

func CopyFile(source, target string) error

CopyFile copies a file from source to destination. On Windows, if the target file is locked (e.g., by a running process), it attempts to rename the locked file out of the way before copying.

func CreateLocalRegistry

func CreateLocalRegistry() error

CreateLocalRegistry creates a local extension source registry

func DefaultArtifactPatterns

func DefaultArtifactPatterns(extensionId, version string) ([]string, error)

DefaultArtifactPatterns returns the default glob patterns for finding extension artifacts in the local registry.

func DownloadAssetToTemp

func DownloadAssetToTemp(assetUrl, assetName string) (string, error)

DownloadAssetToTemp downloads an asset (from URL or local path) to a temp file and returns the file path.

func FindArtifacts

func FindArtifacts(patterns []string, extensionId, version string) ([]string, error)

FindArtifacts finds all artifact files for an extension using the provided patterns or defaults.

func GetFileNameWithoutExt

func GetFileNameWithoutExt(filePath string) string

GetFileNameWithoutExt extracts the filename without its extension

func HasLocalRegistry

func HasLocalRegistry() (bool, error)

HasLocalRegistry checks if a local extension source registry exists

func InferOSArch

func InferOSArch(filename string) (string, error)

InferOSArch infers OS/ARCH from a artifact filename

func LocalRegistryArtifactsPath

func LocalRegistryArtifactsPath() (string, error)

func TarGzSource

func TarGzSource(files []string, target string) error

func ToPascalCase

func ToPascalCase(value string) string

func ToPtr

func ToPtr[T any](value T) *T

func WriteCommandHeader

func WriteCommandHeader(header string, description string)

func WriteCommandSuccess

func WriteCommandSuccess(message string)

func ZipSource

func ZipSource(files []string, target string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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