Documentation
¶
Overview ¶
Package web provides utilities for handling web assets in the application. It supports both development mode (using Vite dev server) and production mode (using built assets from the Vite manifest).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultManager is the default asset manager instance DefaultManager = NewAssetManager() )
Functions ¶
func GetAssetPath ¶
GetAssetPath returns the asset path using the default asset manager
Types ¶
type AssetManager ¶ added in v0.1.5
type AssetManager struct {
// contains filtered or unexported fields
}
AssetManager handles asset path resolution and caching
func NewAssetManager ¶ added in v0.1.5
func NewAssetManager() *AssetManager
NewAssetManager creates a new asset manager instance
func (*AssetManager) ClearCache ¶ added in v0.1.5
func (m *AssetManager) ClearCache()
ClearCache clears the asset path cache
func (*AssetManager) GetAssetPath ¶ added in v0.2.0
func (m *AssetManager) GetAssetPath(path string) (string, error)
GetAssetPath returns the correct path for an asset based on the environment
func (*AssetManager) GetAssetType ¶ added in v0.1.5
func (m *AssetManager) GetAssetType(path string) AssetType
GetAssetType returns the type of asset based on its path
type AssetType ¶ added in v0.1.5
type AssetType string
AssetType represents the type of asset
func GetAssetType ¶ added in v0.2.0
GetAssetType returns the asset type using the default asset manager
Click to show internal directories.
Click to hide internal directories.