mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
c5f0e5a6b4
- Osquery Options (to be renamed to Options after current Options removed) - Labels - Queries - Packs
26 lines
532 B
Go
26 lines
532 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kolide/fleet/server/kolide"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func (svc service) ApplyOptionsSpec(ctx context.Context, spec *kolide.OptionsSpec) error {
|
|
err := svc.ds.ApplyOptions(spec)
|
|
if err != nil {
|
|
return errors.Wrap(err, "apply options")
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (svc service) GetOptionsSpec(ctx context.Context) (*kolide.OptionsSpec, error) {
|
|
spec, err := svc.ds.GetOptions()
|
|
if err != nil {
|
|
return nil, errors.Wrap(err, "get options from datastore")
|
|
}
|
|
|
|
return spec, nil
|
|
}
|