Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExactPackage ¶
type ExactPackage struct {
// Name is the name of the package.
Name string
// Version is the version of the package.
Version string
// Files is a list of files associated with the package.
Files []isFileType
}
ExactPackage is a struct that represents a package with its name, version, and files.
func (*ExactPackage) Hash ¶
func (e *ExactPackage) Hash() string
Hash is a struct that represents a hash of a file.
type FileUnkown ¶
FileUnkown is a struct that represents an unknown file type.
type Require ¶
type Require struct {
// File is the file path of the package. This is the local path not the full url in the CDN.
File string
// Raw is the raw file path of the package.
Raw string
// As is the alias for the package.
As string
}
Require is a struct that represents a package with its name and version.
type Resolver ¶
type Resolver interface {
// Resolve resolves a package by its name and version.
Resolve(pkg *ExactPackage) error
}
Resolver is the interface that must be implemented by all resolvers.
type UnimplementedResolver ¶
type UnimplementedResolver struct{}
UnimplementedResolver is a resolver that is not implemented.
func (*UnimplementedResolver) Resolve ¶
func (r *UnimplementedResolver) Resolve(_ *ExactPackage) error
Resolve resolves a package by its name and version.