github.com/google/osv-scalibr@v0.4.1/depsdev/depsdev.go (about)

     1  // Copyright 2025 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Package depsdev contains constants and mappings for the deps.dev v3 API.
    16  package depsdev
    17  
    18  import (
    19  	"github.com/google/osv-scalibr/purl"
    20  
    21  	depsdevpb "deps.dev/api/v3"
    22  )
    23  
    24  // DepsdevAPI is the URL to the deps.dev API. It is documented at
    25  // docs.deps.dev/api.
    26  const DepsdevAPI = "api.deps.dev:443"
    27  
    28  // System maps from purl type to the depsdev API system.
    29  var System = map[string]depsdevpb.System{
    30  	purl.TypeNPM:    depsdevpb.System_NPM,
    31  	purl.TypeNuget:  depsdevpb.System_NUGET,
    32  	purl.TypeCargo:  depsdevpb.System_CARGO,
    33  	purl.TypeGolang: depsdevpb.System_GO,
    34  	purl.TypeMaven:  depsdevpb.System_MAVEN,
    35  	purl.TypePyPi:   depsdevpb.System_PYPI,
    36  	purl.TypeGem:    depsdevpb.System_RUBYGEMS,
    37  }