Involved Source Files
Package proxydatasource implements an internal.DataSource backed solely by a
proxy instance.
Package proxydatasource implements an internal.DataSource backed solely by a
proxy instance.
Package-Level Type Names (total 3, in which 1 are exported)
/* sort exporteds by: | */
DataSource implements the frontend.DataSource interface, by querying a
module proxy directly and caching the results in memory.
bypassLicenseCheckbool
map of modulePath -> versions, with versions sorted in semver order
Use an extremely coarse lock for now - mu guards all maps below. The
assumption is that this will only be used for local development.
map of package path -> modules paths containing it, with module paths
sorted by descending length
proxyClient*proxy.ClientsourceClient*source.ClientversionCachemap[versionKey]*versionEntry
GetExperiments is unimplemented.
GetLatestInfo returns latest information for unitPath and modulePath.
GetModuleInfo returns the ModuleInfo as fetched from the proxy for module
version specified by modulePath and version.
GetModuleReadme is unimplemented.
GetNestedModules will return an empty slice since it is not implemented in proxy mode.
GetUnit returns information about a directory at a path.
GetUnitMeta returns information about the given path.
findModule finds the longest module path containing the given package path,
using the given finder func and iteratively testing parent directories of
the import path. It performs no testing as to whether the specified module
version that was found actually contains a package corresponding to pkgPath.
getLatestMajorVersion returns the latest module path and the full package path
of the latest version found in the proxy by iterating through vN versions.
This function does not attempt to find whether the full path exists
in the new major version.
getModule retrieves a version from the cache, or failing that queries and
processes the version from the proxy.
getUnit returns information about a unit.
*T : golang.org/x/pkgsite/internal.DataSource
func New(proxyClient *proxy.Client) *DataSource
func NewBypassingLicenseCheck(c *proxy.Client) *DataSource
func NewForTesting(proxyClient *proxy.Client) *DataSource
func newDataSource(proxyClient *proxy.Client, sourceClient *source.Client) *DataSource
Package-Level Functions (total 4, in which 3 are exported)
New returns a new direct proxy datasource.
NewBypassingLicenseCheck returns a new direct proxy datasource that bypasses
license checks. That means all data will be returned for non-redistributable
modules, packages and directories.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.