 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func NewWindowsMSIAppMetadataDataSource() datasource.DataSource
- type MSIFeatureModel
- type MSIFileModel
- type MetadataDataSourceModel
- type WindowsMSIAppMetadataDataSource
- func (d *WindowsMSIAppMetadataDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (r *WindowsMSIAppMetadataDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *WindowsMSIAppMetadataDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *WindowsMSIAppMetadataDataSource) Schema(ctx context.Context, _ datasource.SchemaRequest, ...)
 
- type WindowsMSIAppMetadataDataSourceModel
Constants ¶
      View Source
      
  
const (
	ReadTimeout = 300 // Extended timeout for file processing
)
    Variables ¶
This section is empty.
Functions ¶
func NewWindowsMSIAppMetadataDataSource ¶
func NewWindowsMSIAppMetadataDataSource() datasource.DataSource
Types ¶
type MSIFeatureModel ¶
type MSIFeatureModel struct {
	FeatureName types.String `tfsdk:"feature_name"`
	Title       types.String `tfsdk:"title"`
	Description types.String `tfsdk:"description"`
	Required    types.Bool   `tfsdk:"required"`
}
    MSIFeatureModel represents information about a feature in the MSI
type MSIFileModel ¶
type MSIFileModel struct {
	FileName    types.String `tfsdk:"file_name"`
	FilePath    types.String `tfsdk:"file_path"`
	FileSize    types.Int64  `tfsdk:"file_size"`
	Version     types.String `tfsdk:"version"`
	Description types.String `tfsdk:"description"`
}
    MSIFileModel represents information about a file in the MSI
type MetadataDataSourceModel ¶
type MetadataDataSourceModel struct {
	// Core MSI properties
	ProductCode    types.String `tfsdk:"product_code"`    // MSI Product Code (GUID)
	ProductVersion types.String `tfsdk:"product_version"` // MSI Product Version
	ProductName    types.String `tfsdk:"product_name"`    // MSI Product Name
	Publisher      types.String `tfsdk:"publisher"`       // MSI Manufacturer
	// Additional metadata
	UpgradeCode      types.String  `tfsdk:"upgrade_code"`      // MSI Upgrade Code (GUID)
	Language         types.String  `tfsdk:"language"`          // MSI Language
	PackageType      types.String  `tfsdk:"package_type"`      // MSI Package Type (e.g., Application, Patch)
	InstallLocation  types.String  `tfsdk:"install_location"`  // Default installation location
	InstallCommand   types.String  `tfsdk:"install_command"`   // Default install command
	UninstallCommand types.String  `tfsdk:"uninstall_command"` // Default uninstall command
	TransformPaths   types.List    `tfsdk:"transform_paths"`   // MST transform paths
	SizeMB           types.Float64 `tfsdk:"size_mb"`           // Size in MB
	SHA256Checksum   types.String  `tfsdk:"sha256_checksum"`   // SHA256 hash
	MD5Checksum      types.String  `tfsdk:"md5_checksum"`      // MD5 hash
	// MSI tables and properties
	Properties       types.Map  `tfsdk:"properties"`        // All MSI properties
	RequiredFeatures types.List `tfsdk:"required_features"` // Required features
	Files            types.List `tfsdk:"files"`             // Files included in the MSI
	// System requirements
	MinOSVersion types.String `tfsdk:"min_os_version"` // Minimum OS version
	Architecture types.String `tfsdk:"architecture"`   // Target architecture (x86, x64, etc.)
}
    MetadataDataSourceModel represents detailed metadata for a Windows MSI app
func ExtractMSIMetadata ¶
func ExtractMSIMetadata(reader io.ReaderAt, fileSize int64) (*MetadataDataSourceModel, error)
ExtractMSIMetadata extracts metadata from an MSI file (simplified approach based on Fleet's implementation)
type WindowsMSIAppMetadataDataSource ¶
type WindowsMSIAppMetadataDataSource struct {
	ProviderTypeName string
	TypeName         string
	// contains filtered or unexported fields
}
    func (*WindowsMSIAppMetadataDataSource) Configure ¶
func (d *WindowsMSIAppMetadataDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure configures the data source with the provider client
func (*WindowsMSIAppMetadataDataSource) Metadata ¶
func (r *WindowsMSIAppMetadataDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata returns the datasource type name.
func (*WindowsMSIAppMetadataDataSource) Read ¶
func (d *WindowsMSIAppMetadataDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read fetches and extracts metadata from an MSI file
func (*WindowsMSIAppMetadataDataSource) Schema ¶
func (d *WindowsMSIAppMetadataDataSource) Schema(ctx context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source
type WindowsMSIAppMetadataDataSourceModel ¶
type WindowsMSIAppMetadataDataSourceModel struct {
	ID                      types.String             `tfsdk:"id"`                         // Unique identifier for the data source
	InstallerFilePathSource types.String             `tfsdk:"installer_file_path_source"` // Path to a local MSI file
	InstallerURLSource      types.String             `tfsdk:"installer_url_source"`       // URL to an MSI file
	Metadata                *MetadataDataSourceModel `tfsdk:"metadata"`                   // Extracted metadata
	Timeouts                timeouts.Value           `tfsdk:"timeouts"`
}
    WindowsMSIAppMetadataDataSourceModel defines the data source model
 Click to show internal directories. 
   Click to hide internal directories.