Documentation ¶
Index ¶
- Constants
- type PackageDependency
- type PackageDescription
- type Swift
- func (m *Swift) GetMetadata() plugin.Metadata
- func (m *Swift) GetRootModule(path string) (*meta.Package, error)
- func (m *Swift) GetVersion() (string, error)
- func (m *Swift) HasModulesInstalled(path string) error
- func (m *Swift) IsValid(path string) bool
- func (m *Swift) ListModulesWithDeps(path string, globalSettingFile string) ([]meta.Package, error)
- func (m *Swift) ListUsedModules(path string) ([]meta.Package, error)
- func (m *Swift) SetRootModule(path string) error
Constants ¶
const ( ManifestFile string = "Package.swift" BuildDirectory string = ".build" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackageDependency ¶
type PackageDependency struct { Name string `json:"name"` URL string `json:"url"` Version string `json:"version"` Path string `json:"path"` Dependencies []PackageDependency `json:"dependencies"` }
func (PackageDependency) Module ¶
func (dep PackageDependency) Module() *meta.Package
type PackageDescription ¶
type PackageDescription struct { Name string `json:"name"` Path string `json:"path"` Dependencies []struct { URL string `json:"url"` Requirement struct { Revision []string `json:"revision"` Range []struct { LowerBound string `json:"lower_bound"` UpperBound string `json:"upper_bound"` } } `json:"requirement"` } `json:"dependencies"` Platforms []struct { Name string `json:"name"` Version string `json:"version"` } `json:"platforms"` Products []struct { Name string `json:"name"` Targets []string `json:"targets"` Type map[string]interface{} `json:"type"` } `json:"products"` Targets []struct { C99Name string `json:"c99name"` ModuleType string `json:"module_type"` Name string `json:"name"` Path string `json:"path"` ProductMemberships []string `json:"product_memberships"` Sources []string `json:"sources"` TargetDependencies []string `json:"target_dependencies"` Type string `json:"type"` } `json:"targets"` ToolVersion string `json:"tools_version"` }
func (PackageDescription) Module ¶
func (description PackageDescription) Module() *meta.Package
type Swift ¶
type Swift struct {
// contains filtered or unexported fields
}
func (*Swift) GetMetadata ¶
GetMetadata returns root package information base on path given
func (*Swift) GetRootModule ¶
GetRootModule returns root package information base on path given
func (*Swift) GetVersion ¶
GetVersion returns Swift language version
func (*Swift) HasModulesInstalled ¶
HasModulesInstalled checks whether the current project (based on given path) has the dependent packages installed
func (*Swift) IsValid ¶
IsValid checks if the project dependency file provided in the contract exists
func (*Swift) ListModulesWithDeps ¶
ListModulesWithDeps fetches and lists all packages (root and direct dependencies) required by the project in the given project directory (side-by-side), this is a one level only list of all used modules, and each with its direct dependency only (similar output to ListUsedModules but with direct dependency only)
func (*Swift) ListUsedModules ¶
ListUsedModules fetches and lists all packages required by the project in the given project directory, this is a plain list of all used modules (no nested or tree view)
func (*Swift) SetRootModule ¶
SetRootModule sets root package information base on path given