pkgsite: golang.org/x/pkgsite/internal/proxydatasource Index | Files

package proxydatasource

import "golang.org/x/pkgsite/internal/proxydatasource"

Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.

Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.

Index

Package Files

datasource.go details.go

type DataSource Uses

type DataSource struct {
    // contains filtered or unexported fields
}

DataSource implements the frontend.DataSource interface, by querying a module proxy directly and caching the results in memory.

func New Uses

func New(proxyClient *proxy.Client) *DataSource

New returns a new direct proxy datasource.

func NewBypassingLicenseCheck Uses

func NewBypassingLicenseCheck(c *proxy.Client) *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.

func NewForTesting Uses

func NewForTesting(proxyClient *proxy.Client) *DataSource

func (*DataSource) GetExperiments Uses

func (*DataSource) GetExperiments(ctx context.Context) ([]*internal.Experiment, error)

GetExperiments is unimplemented.

func (*DataSource) GetLatestInfo Uses

func (ds *DataSource) GetLatestInfo(ctx context.Context, unitPath, modulePath string) (latest internal.LatestInfo, err error)

GetLatestInfo returns latest information for unitPath and modulePath.

func (*DataSource) GetModuleInfo Uses

func (ds *DataSource) GetModuleInfo(ctx context.Context, modulePath, version string) (_ *internal.ModuleInfo, err error)

GetModuleInfo returns the ModuleInfo as fetched from the proxy for module version specified by modulePath and version.

func (*DataSource) GetModuleReadme Uses

func (ds *DataSource) GetModuleReadme(ctx context.Context, modulePath, resolvedVersion string) (*internal.Readme, error)

GetModuleReadme is unimplemented.

func (*DataSource) GetNestedModules Uses

func (ds *DataSource) GetNestedModules(ctx context.Context, modulePath string) (_ []*internal.ModuleInfo, err error)

GetNestedModules will return an empty slice since it is not implemented in proxy mode.

func (*DataSource) GetUnit Uses

func (ds *DataSource) GetUnit(ctx context.Context, um *internal.UnitMeta, field internal.FieldSet) (_ *internal.Unit, err error)

GetUnit returns information about a directory at a path.

func (*DataSource) GetUnitMeta Uses

func (ds *DataSource) GetUnitMeta(ctx context.Context, path, inModulePath, inVersion string) (_ *internal.UnitMeta, err error)

GetUnitMeta returns information about the given path.

Package proxydatasource imports 15 packages (graph) and is imported by 1 packages. Updated 2021-01-25. Refresh now. Tools for package owners.