mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
19 lines
570 B
Go
19 lines
570 B
Go
|
package service
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
||
|
)
|
||
|
|
||
|
func (svc Service) ListSoftware(ctx context.Context, opts fleet.SoftwareListOptions) ([]fleet.Software, error) {
|
||
|
// reuse ListSoftware, but include cve scores in premium version
|
||
|
opts.IncludeCVEScores = true
|
||
|
return svc.Service.ListSoftware(ctx, opts)
|
||
|
}
|
||
|
|
||
|
func (svc *Service) SoftwareByID(ctx context.Context, id uint, includeCVEScores bool) (*fleet.Software, error) {
|
||
|
// reuse SoftwareByID, but include cve scores in premium version
|
||
|
return svc.Service.SoftwareByID(ctx, id, true)
|
||
|
}
|