Documentation ¶
Index ¶
- Constants
- type ComponentSbomHandler
- func (s *ComponentSbomHandler) ConvertSbom(c *gin.Context)
- func (s *ComponentSbomHandler) GetSbomById(c *gin.Context)
- func (s *ComponentSbomHandler) GetSbomByName(c *gin.Context)
- func (s *ComponentSbomHandler) GetSboms(c *gin.Context)
- func (s *ComponentSbomHandler) ImportGithubRepo(c *gin.Context)
- func (s *ComponentSbomHandler) RegisterRoutes(r *gin.Engine)
- func (s *ComponentSbomHandler) UploadSbomHandler(c *gin.Context)
- type ComponentSbomStore
- func (c *ComponentSbomStore) AddComponentSbom(sbom cyclonedx.BOM) (string, error)
- func (c *ComponentSbomStore) GetComponentSbomTotalCount() (int64, error)
- func (c *ComponentSbomStore) GetPaginatedSboms(page, limit, duration int) ([]types.Sbom, error)
- func (c *ComponentSbomStore) GetSbomById(idParam string, duration int) (types.Sbom, error)
- func (c *ComponentSbomStore) GetSbomByName(name string, duration int) ([]types.Sbom, error)
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)
func (*ComponentSbomHandler) GetSbomByName ¶
func (s *ComponentSbomHandler) GetSbomByName(c *gin.Context)
curl "http://localhost:8080/api/v1/sbom/getByComponentName?name=enigma"
func (*ComponentSbomHandler) GetSboms ¶
func (s *ComponentSbomHandler) GetSboms(c *gin.Context)
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 ¶
Handler for getting paginated items
func (*ComponentSbomStore) GetSbomByName ¶
Click to show internal directories.
Click to hide internal directories.