Documentation
¶
Index ¶
- func AdoptPackFile(pack *types.Pack, fs types.FS, externalPath, internalPath string, force bool) (string, error)
- func CreatePackDirectory(pack *types.Pack, fs types.FS, dirname string) error
- func CreatePackFile(pack *types.Pack, fs types.FS, filename, content string) error
- func CreatePackFileWithMode(pack *types.Pack, fs types.FS, filename, content string, mode os.FileMode) error
- func CreatePackIgnoreFile(pack *types.Pack, fs types.FS, cfg *config.Config) error
- func GetPackFilePath(pack *types.Pack, filename string) string
- func GetPackProvisionedHandlers(pack *types.Pack, store datastore.DataStore) ([]string, error)
- func IsPackHandlerProvisioned(pack *types.Pack, store datastore.DataStore, handlerName string) (bool, error)
- func PackFileExists(pack *types.Pack, fs types.FS, filename string) (bool, error)
- func PackHasIgnoreFile(pack *types.Pack, fs types.FS, cfg *config.Config) (bool, error)
- func ReadPackFile(pack *types.Pack, fs types.FS, filename string) ([]byte, error)
- type Pack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdoptPackFile ¶
func AdoptPackFile(pack *types.Pack, fs types.FS, externalPath, internalPath string, force bool) (string, error)
AdoptPackFile moves an external file into the pack and returns the destination path
func CreatePackDirectory ¶
CreatePackDirectory creates a directory within the pack
func CreatePackFile ¶
CreatePackFile creates a file within the pack with the given content
func CreatePackFileWithMode ¶
func CreatePackFileWithMode(pack *types.Pack, fs types.FS, filename, content string, mode os.FileMode) error
CreatePackFileWithMode creates a file within the pack with specific permissions
func CreatePackIgnoreFile ¶
CreatePackIgnoreFile creates a .dodotignore file in the pack
func GetPackFilePath ¶
GetPackFilePath returns the full path to a file within the pack
func GetPackProvisionedHandlers ¶
GetPackProvisionedHandlers returns a list of all handlers that have been provisioned for this pack. This helps identify which handlers have already been executed.
func IsPackHandlerProvisioned ¶
func IsPackHandlerProvisioned(pack *types.Pack, store datastore.DataStore, handlerName string) (bool, error)
IsPackHandlerProvisioned checks if a specific handler has been provisioned for this pack. This is a business logic function that uses the DataStore's query capabilities.
func PackFileExists ¶
PackFileExists checks if a file exists within the pack
func PackHasIgnoreFile ¶
PackHasIgnoreFile checks if the pack has an ignore file
Types ¶
type Pack ¶
Pack wraps types.Pack to add higher-level operations that require dependencies on other packages (avoiding circular imports).
func (*Pack) AsTypesPack ¶
AsTypesPack returns the underlying types.Pack This is useful when you need to pass it to functions expecting *types.Pack