import "golang.org/x/pkgsite/internal/localdatasource"
Package localdatasource implements an in-memory internal.DataSource used to load and display documentation for local modules that are not available via a proxy. Similar to proxydatasource, search and other tabs are not supported in this mode.
type DataSource struct {
// contains filtered or unexported fields
}
DataSource implements an in-memory internal.DataSource used to display documentation locally. DataSource is not backed by a database or a proxy instance.
func New() *DataSource
New creates and returns a new local datasource that bypasses license checks by default.
func (ds *DataSource) GetLatestInfo(ctx context.Context, unitPath, modulePath string) (internal.LatestInfo, error)
GetLatestInfo is not implemented.
func (*DataSource) GetModuleReadme(ctx context.Context, modulePath, resolvedVersion string) (*internal.Readme, error)
GetModuleReadme is not implemented.
func (ds *DataSource) GetNestedModules(ctx context.Context, modulePath string) ([]*internal.ModuleInfo, error)
GetNestedModules is not implemented.
func (ds *DataSource) GetUnit(ctx context.Context, pathInfo *internal.UnitMeta, fields internal.FieldSet) (_ *internal.Unit, err error)
GetUnit returns information about a unit. Both the module path and package path must both be known.
func (ds *DataSource) GetUnitMeta(ctx context.Context, path, requestedModulePath, requestedVersion string) (_ *internal.UnitMeta, err error)
GetUnitMeta returns information about a path.
Load loads a module from the given local path. Loading is required before being able to display the module.
LoadFromGOPATH loads a module from GOPATH using the given import path. The full path of the module should be GOPATH/src/importPath. If several GOPATHs exist, the module is loaded from the first one that contains the import path. Loading is required before being able to display the module.
Package localdatasource imports 12 packages (graph) and is imported by 1 packages. Updated 2021-01-16. Refresh now. Tools for package owners.