Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ContainerFileSystemCallbackContext

Handle
📦 Aspire.Hosting v17.0.0

Represents the context for a ContainerFileSystemCallbackAnnotation callback.

type ContainerFileSystemCallbackContext interface{}

Properties

propertyModelResourceget
The app model resource the callback is associated with.
Model() Resource
propertyServicesServiceProviderget
A IServiceProvider that can be used to resolve services in the callback.
Services() ServiceProvider

Methods

Creates a PEM container certificate file entry with the OpenSSL subject-hash symlink.
CreateCertificateFile(
name string,
options ...*CreateCertificateFileOptions,
) ContainerFileSystemItem
namestringThe simple file name (no path separators).
options...*CreateCertificateFileOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*CreateCertificateFileOptions argument.

Contents*stringThe inline PEM-encoded contents of the certificate. Mutually exclusive with sourcePath.
SourcePath*stringAn absolute path to a PEM file on the host to copy. Mutually exclusive with contents.
Owner*float64The owner UID, or null to inherit.
Group*float64The group GID, or null to inherit.
Mode*float64The Unix file mode as an integer (for example 0o644), or null to inherit.
ContinueOnError*boolWhether to ignore errors creating this file.
ContainerFileSystemItem

The created certificate file entry.

Returns a handle; failures surface later via Err().

Creates a container directory entry containing the specified child entries.
CreateDirectory(
name string,
entries []ContainerFileSystemItem,
options ...*CreateDirectoryOptions,
) ContainerFileSystemItem
namestringThe simple directory name (no path separators).
entries[]ContainerFileSystemItemThe child entries (files and/or directories) created via this context.
options...*CreateDirectoryOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*CreateDirectoryOptions argument.

Owner*float64The owner UID, or null to inherit.
Group*float64The group GID, or null to inherit.
Mode*float64The Unix file mode as an integer (for example 0o755), or null to inherit.
ContainerFileSystemItem

The created directory entry.

Returns a handle; failures surface later via Err().

Creates a container file entry with inline contents or a host source path.
CreateFile(
name string,
options ...*CreateFileOptions,
) ContainerFileSystemItem
namestringThe simple file name (no path separators).
options...*CreateFileOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*CreateFileOptions argument.

Contents*stringThe inline UTF-8 contents of the file. Mutually exclusive with sourcePath.
SourcePath*stringAn absolute path to a file on the host to copy. Mutually exclusive with contents.
Owner*float64The owner UID, or null to inherit.
Group*float64The group GID, or null to inherit.
Mode*float64The Unix file mode as an integer (for example 0o644), or null to inherit.
ContinueOnError*boolWhether to ignore errors creating this file.
ContainerFileSystemItem

The created file entry.

Returns a handle; failures surface later via Err().