Documentation ¶
Index ¶
- func NewRepoFinderFactoryForUPM(rootDirAbs typedpath.RawPath, opts *Options) repofinder.RepoFinder
- func NewRepoFinderForUnityProj(rootDirAbs typedpath.RawPath, opts *Options, ...) repofinder.RepoFinder
- type CheckResult
- type Checker
- type CheckingWorker
- type Options
- type Strategy
- type StrategySelector
- type TargetType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepoFinderFactoryForUPM ¶
func NewRepoFinderFactoryForUPM(rootDirAbs typedpath.RawPath, opts *Options) repofinder.RepoFinder
func NewRepoFinderForUnityProj ¶
func NewRepoFinderForUnityProj(rootDirAbs typedpath.RawPath, opts *Options, foundPackages []*unity.FoundPackage) repofinder.RepoFinder
Types ¶
type CheckResult ¶
func NewCheckResult ¶
func NewCheckResult(missingMeta []typedpath.SlashPath, danglingMeta []typedpath.SlashPath) *CheckResult
func (CheckResult) Empty ¶
func (c CheckResult) Empty() bool
func (CheckResult) Len ¶
func (c CheckResult) Len() int
type Checker ¶
type Checker func(rootDirAbs typedpath.RawPath, opts *Options) (*CheckResult, error)
func NewChecker ¶
func NewChecker(selectStrategy StrategySelector, logger logging.Logger) Checker
func StubChecker ¶
func StubChecker(result *CheckResult, err error) Checker
type CheckingWorker ¶
type CheckingWorker func(rootDirAbs typedpath.RawPath, ignoreCase bool, reader <-chan filecollector.Entry) (*CheckResult, error)
func NewCheckingWorker ¶
func NewCheckingWorker(requiresMeta unity.MetaNecessity, logger logging.Logger) CheckingWorker
type Options ¶
type Options struct { IgnoreCase bool IgnoreSubmodulesAndNested bool TargetType TargetType }
Options for Checker. NOTE: We should keep this options simple because the newWorker logic is already complicated.
Implement on ResultFilter if you want to filter the CheckResult.
type Strategy ¶
type Strategy struct { CollectFiles filecollector.FileAggregator RequiresMeta unity.MetaNecessity }
type StrategySelector ¶
func NewStrategySelector ¶
func NewStrategySelector(findPackages unity.FindPackages, lsFiles git.LsFiles, logger logging.Logger) StrategySelector
NewStrategySelector returns a checker strategy for either Unity projects or UPM packages.
type TargetType ¶
type TargetType string
const ( // TargetTypeIsUnityProjectRootDirectory means the target root directory point to a root directory of the Unity project. TargetTypeIsUnityProjectRootDirectory TargetType = "TargetTypeIsUnityProjectRootDirectory" // TargetTypeIsUnityProjectSubDirectory means the target root directory point to a sub directory that need meta files of the Unity project. // NOTE: this including UPM packages (because Packages/com.example.foo/ is a sub directory that need meta files of Unity projects). TargetTypeIsUnityProjectSubDirectory TargetType = "TargetTypeIsUnityProjectSubDirectory" )
Click to show internal directories.
Click to hide internal directories.