Documentation ¶
Index ¶
- Constants
- type Config
- type LockFile
- type Metadata
- type Mod
- func (m *Mod) GetMetadata() plugin.Metadata
- func (m *Mod) GetRootModule(path string) (*meta.Package, error)
- func (m *Mod) GetVersion() (string, error)
- func (m *Mod) HasModulesInstalled(path string) error
- func (m *Mod) IsValid(path string) bool
- func (m *Mod) ListModulesWithDeps(path string, globalSettingFile string) ([]meta.Package, error)
- func (m *Mod) ListUsedModules(path string) ([]meta.Package, error)
- func (m *Mod) SetImplementation(impl cargoImplementation)
- func (m *Mod) SetRootModule(path string) error
- type Package
- type PackageDependency
Constants ¶
View Source
const ( Cmd = "cargo" VersionArg = "--version" ModulesCmd = "cargo metadata --format-version=1" RootModuleNameCmd = "cargo pkgid" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { WorkspaceRoot string `json:"workspace_root"` Version int64 `json:"version"` TargetDirectory string `json:"target_directory"` Packages []Package `json:"packages"` }
func (*Metadata) GetPackageByName ¶
type Mod ¶
type Mod struct {
// contains filtered or unexported fields
}
func (*Mod) GetMetadata ¶
func (*Mod) GetVersion ¶
func (*Mod) HasModulesInstalled ¶
func (*Mod) ListModulesWithDeps ¶
func (*Mod) ListUsedModules ¶
ListUsedModules returns the firs tier dependencies of the module
func (*Mod) SetImplementation ¶
func (m *Mod) SetImplementation(impl cargoImplementation)
func (*Mod) SetRootModule ¶
type Package ¶
type Package struct { Name string `json:"name"` Version string `json:"version"` ID string `json:"id"` Description string `json:"description"` Source string `json:"source"` Dependencies []PackageDependency `json:"dependencies"` ManifestPath string `json:"manifest_path"` Authors []string `json:"authors"` Repository string `json:"repository"` Homepage string `json:"homepage"` License string `json:"license"` Checksum string `json:"-"` // This data bit gets read from the lockfile }
type PackageDependency ¶
type PackageDependency struct { Name string `json:"name"` Source string `json:"source"` Req string `json:"req"` Kind interface{} `json:"kind"` Rename interface{} `json:"rename"` Optional bool `json:"optional"` UsesDefaultFeatures bool `json:"uses_default_features"` Features []interface{} `json:"features"` Target interface{} `json:"target"` Registry interface{} `json:"registry"` }
Click to show internal directories.
Click to hide internal directories.