Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package internal

import 
DataSource is the interface used by the frontend to interact with module data.
See the internal/postgres package for further documentation of these methods, particularly as they pertain to the main postgres implementation.
GetNestedModules returns the latest major version of all nested modules given a modulePath path prefix.
GetUnit returns information about a directory, which may also be a module and/or package. The module and version must both be known. The BuildContext selects the documentation to read.
GetUnitMeta returns information about a path.
GetModuleReadme gets the readme for the module.
	GetModuleReadme(ctx context.Context, modulePath, resolvedVersion string) (*Readme, error)
GetLatestInfo gets information about the latest versions of a unit and module. See LatestInfo for documentation.
	GetLatestInfo(ctx context.Context, unitPath, modulePath string, latestUnitMeta *UnitMeta) (LatestInfo, error)
}
LatestInfo holds information about the latest versions and paths. The information is relative to a unit in a module.
MinorVersion is the latest minor version for the unit, regardless of module.
MinorModulePath is the module path for MinorVersion.
UnitExistsAtMinor is whether the unit exists at the latest minor version of the module
MajorModulePath is the path of the latest module path in the series. For example, in the module path "github.com/casbin/casbin", there is another module path with a greater major version "github.com/casbin/casbin/v3". This field will be "github.com/casbin/casbin/v3" or the input module path if no later module path was found.
MajorUnitPath is the path of the unit in the latest major version of the module, if it exists. For example, if the module is M, the unit is M/U, and the latest major version is 3, then is field is "M/v3/U". If the module version at MajorModulePath does not contain this unit, then it is the module path."