sbom

package
v0.0.0-...-392937c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const COMPONENT_SBOM_COLLECTION = "component_sbom"

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentSbomHandler

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

func NewComponentSbomHandler

func NewComponentSbomHandler(store types.SbomStore) *ComponentSbomHandler

func (*ComponentSbomHandler) ConvertSbom

func (s *ComponentSbomHandler) ConvertSbom(c *gin.Context)

curl -X POST -F "sbom=@sbom.json" "http://localhost:8080/api/v1/sbom/convert" curl -X POST -F "sbom=@sbom.json" "http://localhost:8080/api/v1/sbom/convert" | jq '.converted_sbom.components.[].purl' -r

func (*ComponentSbomHandler) GetSbomById

func (s *ComponentSbomHandler) GetSbomById(c *gin.Context)

curl http://localhost:8080/api/v1/sbom/{sbom_id}

func (*ComponentSbomHandler) GetSboms

func (s *ComponentSbomHandler) GetSboms(c *gin.Context)

curl http://localhost:8080/api/v1/sbom

func (*ComponentSbomHandler) ImportGithubRepo

func (s *ComponentSbomHandler) ImportGithubRepo(c *gin.Context)

curl -X POST -H "application/json" -d '{"owner":"dmdhrumilmistry", "repo_name":"pyhtools"}' http://localhost:8080/api/v1/sbom/githubImport

func (*ComponentSbomHandler) RegisterRoutes

func (s *ComponentSbomHandler) RegisterRoutes(r *gin.Engine)

func (*ComponentSbomHandler) UploadSbomHandler

func (s *ComponentSbomHandler) UploadSbomHandler(c *gin.Context)

curl -X POST -F "sbom=@example-sbom.json" http://localhost:8080/api/v1/sbom

type ComponentSbomStore

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

func NewComponentSbomStore

func NewComponentSbomStore(db *mongo.Database) *ComponentSbomStore

func (*ComponentSbomStore) AddComponentSbom

func (c *ComponentSbomStore) AddComponentSbom(sbom cyclonedx.BOM) (string, error)

func (*ComponentSbomStore) GetComponentSbomTotalCount

func (c *ComponentSbomStore) GetComponentSbomTotalCount() (int64, error)

func (*ComponentSbomStore) GetPaginatedSboms

func (c *ComponentSbomStore) GetPaginatedSboms(page, limit, duration int) ([]types.Sbom, error)

Handler for getting paginated items

func (*ComponentSbomStore) GetSbomById

func (c *ComponentSbomStore) GetSbomById(idParam string, duration int) (types.Sbom, error)

Handler for getting paginated items

func (*ComponentSbomStore) GetSbomByName

func (c *ComponentSbomStore) GetSbomByName(name string, duration int) ([]types.Sbom, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL