Documentation
¶
Index ¶
- Constants
- type ComponentHandler
- func (s *ComponentHandler) AddComponentUsingSbomId(c *gin.Context)
- func (s *ComponentHandler) GetComponentById(c *gin.Context)
- func (s *ComponentHandler) GetComponentByName(c *gin.Context)
- func (s *ComponentHandler) GetComponents(c *gin.Context)
- func (s *ComponentHandler) GetVulnerableComponents(c *gin.Context)
- func (s *ComponentHandler) RegisterRoutes(r *gin.Engine)
- type ComponentStore
- func (c *ComponentStore) AddComponentUsingSbom(sbom types.Sbom) ([]string, error)
- func (c *ComponentStore) DeleteById(idParam string, param string, duration int) (int64, error)
- func (c *ComponentStore) DeleteByIds(idParams []string, param string, duration int) (int64, error)
- func (c *ComponentStore) GetComponentById(idParam string, duration int) ([]types.Component, error)
- func (c *ComponentStore) GetComponentByName(name string, duration int) ([]types.Component, error)
- func (c *ComponentStore) GetComponentTotalCount(filter interface{}) (int64, error)
- func (c *ComponentStore) GetComponentsUsingFilter(filter interface{}, page, limit, duration int) ([]types.Component, error)
- func (c *ComponentStore) GetPaginatedComponents(page, limit, duration int) ([]types.Component, error)
- func (c *ComponentStore) GetVulnerableComponents(...) (components []types.Component, total int64, err error)
- func (c *ComponentStore) GetVulnerableSbomComponentsFilter(...) bson.M
- func (c *ComponentStore) IsSbomProcessed(sbomId string) bool
Constants ¶
View Source
const COMPONENT_COLLECTION = "component"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentHandler ¶
type ComponentHandler struct {
// contains filtered or unexported fields
}
func NewComponentHandler ¶
func NewComponentHandler(store types.ComponentStore, sbomStore types.SbomStore) *ComponentHandler
func (*ComponentHandler) AddComponentUsingSbomId ¶
func (s *ComponentHandler) AddComponentUsingSbomId(c *gin.Context)
curl -X POST "http://localhost:8080/api/v1/component?sbom_id=676852a1af6020598db6e8d6"
func (*ComponentHandler) GetComponentById ¶
func (s *ComponentHandler) GetComponentById(c *gin.Context)
func (*ComponentHandler) GetComponentByName ¶
func (s *ComponentHandler) GetComponentByName(c *gin.Context)
curl "http://localhost:8080/api/v1/component/getByName?name=enigma"
func (*ComponentHandler) GetComponents ¶
func (s *ComponentHandler) GetComponents(c *gin.Context)
curl "http://localhost:8080/api/v1/component?page=1&limit=10"
func (*ComponentHandler) GetVulnerableComponents ¶
func (s *ComponentHandler) GetVulnerableComponents(c *gin.Context)
func (*ComponentHandler) RegisterRoutes ¶
func (s *ComponentHandler) RegisterRoutes(r *gin.Engine)
type ComponentStore ¶
func NewComponentStore ¶
func NewComponentStore(db *mongo.Database, analyzer types.Analyzer) *ComponentStore
func (*ComponentStore) AddComponentUsingSbom ¶
func (c *ComponentStore) AddComponentUsingSbom(sbom types.Sbom) ([]string, error)
func (*ComponentStore) DeleteById ¶
func (*ComponentStore) DeleteByIds ¶
func (*ComponentStore) GetComponentById ¶
Handler for getting paginated items
func (*ComponentStore) GetComponentByName ¶
func (*ComponentStore) GetComponentTotalCount ¶
func (c *ComponentStore) GetComponentTotalCount(filter interface{}) (int64, error)
func (*ComponentStore) GetComponentsUsingFilter ¶
func (c *ComponentStore) GetComponentsUsingFilter(filter interface{}, page, limit, duration int) ([]types.Component, error)
func (*ComponentStore) GetPaginatedComponents ¶
func (c *ComponentStore) GetPaginatedComponents(page, limit, duration int) ([]types.Component, error)
Handler for getting paginated items
func (*ComponentStore) GetVulnerableComponents ¶
func (*ComponentStore) GetVulnerableSbomComponentsFilter ¶
func (c *ComponentStore) GetVulnerableSbomComponentsFilter(componentNames, componentVersions, sbomIds, compTypes, compNames, purls, versions []string, page, limit int) bson.M
func (*ComponentStore) IsSbomProcessed ¶
func (c *ComponentStore) IsSbomProcessed(sbomId string) bool
Click to show internal directories.
Click to hide internal directories.