Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Copier ¶
type Copier interface { // Returns weather the copier is for a specific url or not Matches(url string) bool // This function downloads and saves all files that should later be // pasted to the "to" directory into the "TempDir" directory. // // Copy must retrun a serializable object that is later saved inside "pasta.result.yaml". // Look at SourceInfo for an example. Copy(ctx context.Context, config CopyConfig) (any, error) }
type CopyConfig ¶
type CopyConfig struct { // URL of the dependency URL string // Directory from which copy takes place from From string // returns true if file with path relative to Src should be copied Keep func(path string) bool // Custom copier options from the pasta.yaml Options map[string]string // TempDir contains the path to write all files. TempDir string // ClearTarget is true if the target directory should be cleared before copying ClearTarget bool }
type SourceInfo ¶
type SourceInfo struct { Reference string `yaml:"reference,omitempty"` Message string `yaml:"message,omitempty"` Author Author `yaml:"author,omitempty"` }
SourceInfo is serialized into the `pasta.result.yaml` in the end
Click to show internal directories.
Click to hide internal directories.