Documentation ¶
Index ¶
- Constants
- type DepsDevAPIClient
- func (c *DepsDevAPIClient) GetPackage(ctx context.Context, in *pb.GetPackageRequest, opts ...grpc.CallOption) (*pb.Package, error)
- func (c *DepsDevAPIClient) GetRequirements(ctx context.Context, in *pb.GetRequirementsRequest, opts ...grpc.CallOption) (*pb.Requirements, error)
- func (c *DepsDevAPIClient) GetVersion(ctx context.Context, in *pb.GetVersionRequest, opts ...grpc.CallOption) (*pb.Version, error)
- func (c *DepsDevAPIClient) GobDecode(b []byte) error
- func (c *DepsDevAPIClient) GobEncode() ([]byte, error)
- type MavenRegistryAPIClient
- type NpmRegistryAPIClient
- func (c *NpmRegistryAPIClient) Dependencies(ctx context.Context, pkg, version string) (npmRegistryDependencies, error)
- func (c *NpmRegistryAPIClient) FullJSON(ctx context.Context, pkg, version string) (gjson.Result, error)
- func (c *NpmRegistryAPIClient) GobDecode(b []byte) error
- func (c *NpmRegistryAPIClient) GobEncode() ([]byte, error)
- func (c *NpmRegistryAPIClient) Versions(ctx context.Context, pkg string) (npmRegistryVersions, error)
- type NpmRegistryAuthOpts
- type NpmRegistryConfig
Constants ¶
View Source
const MavenCentral = "https://repo.maven.apache.org/maven2"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepsDevAPIClient ¶
type DepsDevAPIClient struct { pb.InsightsClient // contains filtered or unexported fields }
DepsDevAPIClient is a wrapper for InsightsClient that caches requests.
func NewDepsDevAPIClient ¶
func NewDepsDevAPIClient(addr string) (*DepsDevAPIClient, error)
func (*DepsDevAPIClient) GetPackage ¶
func (c *DepsDevAPIClient) GetPackage(ctx context.Context, in *pb.GetPackageRequest, opts ...grpc.CallOption) (*pb.Package, error)
func (*DepsDevAPIClient) GetRequirements ¶
func (c *DepsDevAPIClient) GetRequirements(ctx context.Context, in *pb.GetRequirementsRequest, opts ...grpc.CallOption) (*pb.Requirements, error)
func (*DepsDevAPIClient) GetVersion ¶
func (c *DepsDevAPIClient) GetVersion(ctx context.Context, in *pb.GetVersionRequest, opts ...grpc.CallOption) (*pb.Version, error)
func (*DepsDevAPIClient) GobDecode ¶
func (c *DepsDevAPIClient) GobDecode(b []byte) error
func (*DepsDevAPIClient) GobEncode ¶
func (c *DepsDevAPIClient) GobEncode() ([]byte, error)
type MavenRegistryAPIClient ¶ added in v1.7.0
type MavenRegistryAPIClient struct {
// contains filtered or unexported fields
}
func NewMavenRegistryAPIClient ¶ added in v1.7.0
func NewMavenRegistryAPIClient(registry string) *MavenRegistryAPIClient
func (*MavenRegistryAPIClient) GetProject ¶ added in v1.7.0
type NpmRegistryAPIClient ¶ added in v1.7.0
type NpmRegistryAPIClient struct {
// contains filtered or unexported fields
}
func NewNpmRegistryAPIClient ¶ added in v1.7.0
func NewNpmRegistryAPIClient(workdir string) (*NpmRegistryAPIClient, error)
func (*NpmRegistryAPIClient) Dependencies ¶ added in v1.7.0
func (c *NpmRegistryAPIClient) Dependencies(ctx context.Context, pkg, version string) (npmRegistryDependencies, error)
func (*NpmRegistryAPIClient) GobDecode ¶ added in v1.7.0
func (c *NpmRegistryAPIClient) GobDecode(b []byte) error
func (*NpmRegistryAPIClient) GobEncode ¶ added in v1.7.0
func (c *NpmRegistryAPIClient) GobEncode() ([]byte, error)
type NpmRegistryAuthOpts ¶ added in v1.7.2
Implementation of npm registry auth matching, adapted from npm-registry-fetch https://github.com/npm/npm-registry-fetch/blob/237d33b45396caa00add61e0549cf09fbf9deb4f/lib/auth.js
func (NpmRegistryAuthOpts) GetAuth ¶ added in v1.7.2
func (opts NpmRegistryAuthOpts) GetAuth(uri string) npmRegistryAuthInfo
type NpmRegistryConfig ¶ added in v1.7.2
type NpmRegistryConfig struct { ScopeURLs map[string]string // map of @scope to registry URL RegOpts NpmRegistryAuthOpts // the full key-value pairs of relevant npmrc config options. }
func LoadNpmRegistryConfig ¶ added in v1.7.2
func LoadNpmRegistryConfig(workdir string) (NpmRegistryConfig, error)
func (NpmRegistryConfig) BuildRequest ¶ added in v1.7.2
func (r NpmRegistryConfig) BuildRequest(ctx context.Context, urlComponents ...string) (*http.Request, error)
BuildRequest creates the http request to the corresponding npm registry api urlComponents should be (package) or (package, version)
Click to show internal directories.
Click to hide internal directories.