mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
e630fabf89
This implements what's described in detail here https://github.com/fleetdm/fleet/blob/main/proposals/fleet-desktop-token-rotation.md
2337 lines
86 KiB
Go
2337 lines
86 KiB
Go
// Automatically generated by mockimpl. DO NOT EDIT!
|
|
|
|
package mock
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"time"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/config"
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
var _ fleet.Datastore = (*DataStore)(nil)
|
|
|
|
type HealthCheckFunc func() error
|
|
|
|
type NewCarveFunc func(ctx context.Context, metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error)
|
|
|
|
type UpdateCarveFunc func(ctx context.Context, metadata *fleet.CarveMetadata) error
|
|
|
|
type CarveFunc func(ctx context.Context, carveId int64) (*fleet.CarveMetadata, error)
|
|
|
|
type CarveBySessionIdFunc func(ctx context.Context, sessionId string) (*fleet.CarveMetadata, error)
|
|
|
|
type CarveByNameFunc func(ctx context.Context, name string) (*fleet.CarveMetadata, error)
|
|
|
|
type ListCarvesFunc func(ctx context.Context, opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error)
|
|
|
|
type NewBlockFunc func(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64, data []byte) error
|
|
|
|
type GetBlockFunc func(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64) ([]byte, error)
|
|
|
|
type CleanupCarvesFunc func(ctx context.Context, now time.Time) (expired int, err error)
|
|
|
|
type NewUserFunc func(ctx context.Context, user *fleet.User) (*fleet.User, error)
|
|
|
|
type ListUsersFunc func(ctx context.Context, opt fleet.UserListOptions) ([]*fleet.User, error)
|
|
|
|
type UserByEmailFunc func(ctx context.Context, email string) (*fleet.User, error)
|
|
|
|
type UserByIDFunc func(ctx context.Context, id uint) (*fleet.User, error)
|
|
|
|
type SaveUserFunc func(ctx context.Context, user *fleet.User) error
|
|
|
|
type SaveUsersFunc func(ctx context.Context, users []*fleet.User) error
|
|
|
|
type DeleteUserFunc func(ctx context.Context, id uint) error
|
|
|
|
type PendingEmailChangeFunc func(ctx context.Context, userID uint, newEmail string, token string) error
|
|
|
|
type ConfirmPendingEmailChangeFunc func(ctx context.Context, userID uint, token string) (string, error)
|
|
|
|
type ApplyQueriesFunc func(ctx context.Context, authorID uint, queries []*fleet.Query) error
|
|
|
|
type NewQueryFunc func(ctx context.Context, query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error)
|
|
|
|
type SaveQueryFunc func(ctx context.Context, query *fleet.Query) error
|
|
|
|
type DeleteQueryFunc func(ctx context.Context, name string) error
|
|
|
|
type DeleteQueriesFunc func(ctx context.Context, ids []uint) (uint, error)
|
|
|
|
type QueryFunc func(ctx context.Context, id uint) (*fleet.Query, error)
|
|
|
|
type ListQueriesFunc func(ctx context.Context, opt fleet.ListQueryOptions) ([]*fleet.Query, error)
|
|
|
|
type QueryByNameFunc func(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Query, error)
|
|
|
|
type ObserverCanRunQueryFunc func(ctx context.Context, queryID uint) (bool, error)
|
|
|
|
type NewDistributedQueryCampaignFunc func(ctx context.Context, camp *fleet.DistributedQueryCampaign) (*fleet.DistributedQueryCampaign, error)
|
|
|
|
type DistributedQueryCampaignFunc func(ctx context.Context, id uint) (*fleet.DistributedQueryCampaign, error)
|
|
|
|
type SaveDistributedQueryCampaignFunc func(ctx context.Context, camp *fleet.DistributedQueryCampaign) error
|
|
|
|
type DistributedQueryCampaignTargetIDsFunc func(ctx context.Context, id uint) (targets *fleet.HostTargets, err error)
|
|
|
|
type NewDistributedQueryCampaignTargetFunc func(ctx context.Context, target *fleet.DistributedQueryCampaignTarget) (*fleet.DistributedQueryCampaignTarget, error)
|
|
|
|
type CleanupDistributedQueryCampaignsFunc func(ctx context.Context, now time.Time) (expired uint, err error)
|
|
|
|
type DistributedQueryCampaignsForQueryFunc func(ctx context.Context, queryID uint) ([]*fleet.DistributedQueryCampaign, error)
|
|
|
|
type ApplyPackSpecsFunc func(ctx context.Context, specs []*fleet.PackSpec) error
|
|
|
|
type GetPackSpecsFunc func(ctx context.Context) ([]*fleet.PackSpec, error)
|
|
|
|
type GetPackSpecFunc func(ctx context.Context, name string) (*fleet.PackSpec, error)
|
|
|
|
type NewPackFunc func(ctx context.Context, pack *fleet.Pack, opts ...fleet.OptionalArg) (*fleet.Pack, error)
|
|
|
|
type SavePackFunc func(ctx context.Context, pack *fleet.Pack) error
|
|
|
|
type DeletePackFunc func(ctx context.Context, name string) error
|
|
|
|
type PackFunc func(ctx context.Context, pid uint) (*fleet.Pack, error)
|
|
|
|
type ListPacksFunc func(ctx context.Context, opt fleet.PackListOptions) ([]*fleet.Pack, error)
|
|
|
|
type PackByNameFunc func(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Pack, bool, error)
|
|
|
|
type ListPacksForHostFunc func(ctx context.Context, hid uint) (packs []*fleet.Pack, err error)
|
|
|
|
type EnsureGlobalPackFunc func(ctx context.Context) (*fleet.Pack, error)
|
|
|
|
type EnsureTeamPackFunc func(ctx context.Context, teamID uint) (*fleet.Pack, error)
|
|
|
|
type ApplyLabelSpecsFunc func(ctx context.Context, specs []*fleet.LabelSpec) error
|
|
|
|
type GetLabelSpecsFunc func(ctx context.Context) ([]*fleet.LabelSpec, error)
|
|
|
|
type GetLabelSpecFunc func(ctx context.Context, name string) (*fleet.LabelSpec, error)
|
|
|
|
type NewLabelFunc func(ctx context.Context, Label *fleet.Label, opts ...fleet.OptionalArg) (*fleet.Label, error)
|
|
|
|
type SaveLabelFunc func(ctx context.Context, label *fleet.Label) (*fleet.Label, error)
|
|
|
|
type DeleteLabelFunc func(ctx context.Context, name string) error
|
|
|
|
type LabelFunc func(ctx context.Context, lid uint) (*fleet.Label, error)
|
|
|
|
type ListLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Label, error)
|
|
|
|
type LabelsSummaryFunc func(ctx context.Context) ([]*fleet.LabelSummary, error)
|
|
|
|
type LabelQueriesForHostFunc func(ctx context.Context, host *fleet.Host) (map[string]string, error)
|
|
|
|
type ListLabelsForHostFunc func(ctx context.Context, hid uint) ([]*fleet.Label, error)
|
|
|
|
type ListHostsInLabelFunc func(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) ([]*fleet.Host, error)
|
|
|
|
type ListUniqueHostsInLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, labels []uint) ([]*fleet.Host, error)
|
|
|
|
type SearchLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Label, error)
|
|
|
|
type LabelIDsByNameFunc func(ctx context.Context, labels []string) ([]uint, error)
|
|
|
|
type AsyncBatchInsertLabelMembershipFunc func(ctx context.Context, batch [][2]uint) error
|
|
|
|
type AsyncBatchDeleteLabelMembershipFunc func(ctx context.Context, batch [][2]uint) error
|
|
|
|
type AsyncBatchUpdateLabelTimestampFunc func(ctx context.Context, ids []uint, ts time.Time) error
|
|
|
|
type NewHostFunc func(ctx context.Context, host *fleet.Host) (*fleet.Host, error)
|
|
|
|
type DeleteHostFunc func(ctx context.Context, hid uint) error
|
|
|
|
type HostFunc func(ctx context.Context, id uint) (*fleet.Host, error)
|
|
|
|
type ListHostsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error)
|
|
|
|
type MarkHostsSeenFunc func(ctx context.Context, hostIDs []uint, t time.Time) error
|
|
|
|
type SearchHostsFunc func(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Host, error)
|
|
|
|
type EnrolledHostIDsFunc func(ctx context.Context) ([]uint, error)
|
|
|
|
type CountEnrolledHostsFunc func(ctx context.Context) (int, error)
|
|
|
|
type CleanupIncomingHostsFunc func(ctx context.Context, now time.Time) ([]uint, error)
|
|
|
|
type GenerateHostStatusStatisticsFunc func(ctx context.Context, filter fleet.TeamFilter, now time.Time, platform *string, lowDiskSpace *int) (*fleet.HostSummary, error)
|
|
|
|
type HostIDsByNameFunc func(ctx context.Context, filter fleet.TeamFilter, hostnames []string) ([]uint, error)
|
|
|
|
type HostIDsByOSVersionFunc func(ctx context.Context, osVersion fleet.OSVersion, offset int, limit int) ([]uint, error)
|
|
|
|
type HostByIdentifierFunc func(ctx context.Context, identifier string) (*fleet.Host, error)
|
|
|
|
type AddHostsToTeamFunc func(ctx context.Context, teamID *uint, hostIDs []uint) error
|
|
|
|
type TotalAndUnseenHostsSinceFunc func(ctx context.Context, daysCount int) (total int, unseen int, err error)
|
|
|
|
type DeleteHostsFunc func(ctx context.Context, ids []uint) error
|
|
|
|
type CountHostsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) (int, error)
|
|
|
|
type CountHostsInLabelFunc func(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) (int, error)
|
|
|
|
type ListHostDeviceMappingFunc func(ctx context.Context, id uint) ([]*fleet.HostDeviceMapping, error)
|
|
|
|
type ListHostBatteriesFunc func(ctx context.Context, id uint) ([]*fleet.HostBattery, error)
|
|
|
|
type LoadHostByDeviceAuthTokenFunc func(ctx context.Context, authToken string, tokenTTL time.Duration) (*fleet.Host, error)
|
|
|
|
type SetOrUpdateDeviceAuthTokenFunc func(ctx context.Context, hostID uint, authToken string) error
|
|
|
|
type FailingPoliciesCountFunc func(ctx context.Context, host *fleet.Host) (uint, error)
|
|
|
|
type ListPoliciesForHostFunc func(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error)
|
|
|
|
type GetHostMunkiVersionFunc func(ctx context.Context, hostID uint) (string, error)
|
|
|
|
type GetHostMunkiIssuesFunc func(ctx context.Context, hostID uint) ([]*fleet.HostMunkiIssue, error)
|
|
|
|
type GetHostMDMFunc func(ctx context.Context, hostID uint) (*fleet.HostMDM, error)
|
|
|
|
type AggregatedMunkiVersionFunc func(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiVersion, time.Time, error)
|
|
|
|
type AggregatedMunkiIssuesFunc func(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiIssue, time.Time, error)
|
|
|
|
type AggregatedMDMStatusFunc func(ctx context.Context, teamID *uint) (fleet.AggregatedMDMStatus, time.Time, error)
|
|
|
|
type AggregatedMDMSolutionsFunc func(ctx context.Context, teamID *uint) ([]fleet.AggregatedMDMSolutions, time.Time, error)
|
|
|
|
type GenerateAggregatedMunkiAndMDMFunc func(ctx context.Context) error
|
|
|
|
type GetMunkiIssueFunc func(ctx context.Context, munkiIssueID uint) (*fleet.MunkiIssue, error)
|
|
|
|
type GetMDMSolutionFunc func(ctx context.Context, mdmID uint) (*fleet.MDMSolution, error)
|
|
|
|
type OSVersionsFunc func(ctx context.Context, teamID *uint, platform *string, name *string, version *string) (*fleet.OSVersions, error)
|
|
|
|
type UpdateOSVersionsFunc func(ctx context.Context) error
|
|
|
|
type CountHostsInTargetsFunc func(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets, now time.Time) (fleet.TargetMetrics, error)
|
|
|
|
type HostIDsInTargetsFunc func(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets) ([]uint, error)
|
|
|
|
type NewPasswordResetRequestFunc func(ctx context.Context, req *fleet.PasswordResetRequest) (*fleet.PasswordResetRequest, error)
|
|
|
|
type DeletePasswordResetRequestsForUserFunc func(ctx context.Context, userID uint) error
|
|
|
|
type FindPasswordResetByTokenFunc func(ctx context.Context, token string) (*fleet.PasswordResetRequest, error)
|
|
|
|
type SessionByKeyFunc func(ctx context.Context, key string) (*fleet.Session, error)
|
|
|
|
type SessionByIDFunc func(ctx context.Context, id uint) (*fleet.Session, error)
|
|
|
|
type ListSessionsForUserFunc func(ctx context.Context, id uint) ([]*fleet.Session, error)
|
|
|
|
type NewSessionFunc func(ctx context.Context, userID uint, sessionKey string) (*fleet.Session, error)
|
|
|
|
type DestroySessionFunc func(ctx context.Context, session *fleet.Session) error
|
|
|
|
type DestroyAllSessionsForUserFunc func(ctx context.Context, id uint) error
|
|
|
|
type MarkSessionAccessedFunc func(ctx context.Context, session *fleet.Session) error
|
|
|
|
type NewAppConfigFunc func(ctx context.Context, info *fleet.AppConfig) (*fleet.AppConfig, error)
|
|
|
|
type AppConfigFunc func(ctx context.Context) (*fleet.AppConfig, error)
|
|
|
|
type SaveAppConfigFunc func(ctx context.Context, info *fleet.AppConfig) error
|
|
|
|
type GetEnrollSecretsFunc func(ctx context.Context, teamID *uint) ([]*fleet.EnrollSecret, error)
|
|
|
|
type ApplyEnrollSecretsFunc func(ctx context.Context, teamID *uint, secrets []*fleet.EnrollSecret) error
|
|
|
|
type NewInviteFunc func(ctx context.Context, i *fleet.Invite) (*fleet.Invite, error)
|
|
|
|
type ListInvitesFunc func(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Invite, error)
|
|
|
|
type InviteFunc func(ctx context.Context, id uint) (*fleet.Invite, error)
|
|
|
|
type InviteByEmailFunc func(ctx context.Context, email string) (*fleet.Invite, error)
|
|
|
|
type InviteByTokenFunc func(ctx context.Context, token string) (*fleet.Invite, error)
|
|
|
|
type DeleteInviteFunc func(ctx context.Context, id uint) error
|
|
|
|
type UpdateInviteFunc func(ctx context.Context, id uint, i *fleet.Invite) (*fleet.Invite, error)
|
|
|
|
type ListScheduledQueriesInPackWithStatsFunc func(ctx context.Context, id uint, opts fleet.ListOptions) ([]*fleet.ScheduledQuery, error)
|
|
|
|
type NewScheduledQueryFunc func(ctx context.Context, sq *fleet.ScheduledQuery, opts ...fleet.OptionalArg) (*fleet.ScheduledQuery, error)
|
|
|
|
type SaveScheduledQueryFunc func(ctx context.Context, sq *fleet.ScheduledQuery) (*fleet.ScheduledQuery, error)
|
|
|
|
type DeleteScheduledQueryFunc func(ctx context.Context, id uint) error
|
|
|
|
type ScheduledQueryFunc func(ctx context.Context, id uint) (*fleet.ScheduledQuery, error)
|
|
|
|
type CleanupExpiredHostsFunc func(ctx context.Context) ([]uint, error)
|
|
|
|
type ScheduledQueryIDsByNameFunc func(ctx context.Context, batchSize int, packAndSchedQueryNames ...[2]string) ([]uint, error)
|
|
|
|
type NewTeamFunc func(ctx context.Context, team *fleet.Team) (*fleet.Team, error)
|
|
|
|
type SaveTeamFunc func(ctx context.Context, team *fleet.Team) (*fleet.Team, error)
|
|
|
|
type TeamFunc func(ctx context.Context, tid uint) (*fleet.Team, error)
|
|
|
|
type DeleteTeamFunc func(ctx context.Context, tid uint) error
|
|
|
|
type TeamByNameFunc func(ctx context.Context, name string) (*fleet.Team, error)
|
|
|
|
type ListTeamsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Team, error)
|
|
|
|
type TeamsSummaryFunc func(ctx context.Context) ([]*fleet.TeamSummary, error)
|
|
|
|
type SearchTeamsFunc func(ctx context.Context, filter fleet.TeamFilter, matchQuery string, omit ...uint) ([]*fleet.Team, error)
|
|
|
|
type TeamEnrollSecretsFunc func(ctx context.Context, teamID uint) ([]*fleet.EnrollSecret, error)
|
|
|
|
type DeleteIntegrationsFromTeamsFunc func(ctx context.Context, deletedIntgs fleet.Integrations) error
|
|
|
|
type ListSoftwareForVulnDetectionFunc func(ctx context.Context, hostID uint) ([]fleet.Software, error)
|
|
|
|
type ListSoftwareVulnerabilitiesFunc func(ctx context.Context, hostIDs []uint) (map[uint][]fleet.SoftwareVulnerability, error)
|
|
|
|
type LoadHostSoftwareFunc func(ctx context.Context, host *fleet.Host, includeCVEScores bool) error
|
|
|
|
type AllSoftwareWithoutCPEIteratorFunc func(ctx context.Context, excludedPlatforms []string) (fleet.SoftwareIterator, error)
|
|
|
|
type AddCPEForSoftwareFunc func(ctx context.Context, software fleet.Software, cpe string) error
|
|
|
|
type ListSoftwareCPEsFunc func(ctx context.Context) ([]fleet.SoftwareCPE, error)
|
|
|
|
type InsertVulnerabilitiesFunc func(ctx context.Context, vulns []fleet.SoftwareVulnerability, source fleet.VulnerabilitySource) (int64, error)
|
|
|
|
type SoftwareByIDFunc func(ctx context.Context, id uint, includeCVEScores bool) (*fleet.Software, error)
|
|
|
|
type ListSoftwareByHostIDShortFunc func(ctx context.Context, hostID uint) ([]fleet.Software, error)
|
|
|
|
type SyncHostsSoftwareFunc func(ctx context.Context, updatedAt time.Time) error
|
|
|
|
type HostsBySoftwareIDsFunc func(ctx context.Context, softwareIDs []uint) ([]*fleet.HostShort, error)
|
|
|
|
type HostsByCVEFunc func(ctx context.Context, cve string) ([]*fleet.HostShort, error)
|
|
|
|
type InsertCVEMetaFunc func(ctx context.Context, cveMeta []fleet.CVEMeta) error
|
|
|
|
type ListCVEsFunc func(ctx context.Context, maxAge time.Duration) ([]fleet.CVEMeta, error)
|
|
|
|
type ListOperatingSystemsFunc func(ctx context.Context) ([]fleet.OperatingSystem, error)
|
|
|
|
type UpdateHostOperatingSystemFunc func(ctx context.Context, hostID uint, hostOS fleet.OperatingSystem) error
|
|
|
|
type CleanupHostOperatingSystemsFunc func(ctx context.Context) error
|
|
|
|
type NewActivityFunc func(ctx context.Context, user *fleet.User, activityType string, details *map[string]interface{}) error
|
|
|
|
type ListActivitiesFunc func(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Activity, error)
|
|
|
|
type ShouldSendStatisticsFunc func(ctx context.Context, frequency time.Duration, config config.FleetConfig, license *fleet.LicenseInfo) (fleet.StatisticsPayload, bool, error)
|
|
|
|
type RecordStatisticsSentFunc func(ctx context.Context) error
|
|
|
|
type ApplyPolicySpecsFunc func(ctx context.Context, authorID uint, specs []*fleet.PolicySpec) error
|
|
|
|
type NewGlobalPolicyFunc func(ctx context.Context, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error)
|
|
|
|
type PolicyFunc func(ctx context.Context, id uint) (*fleet.Policy, error)
|
|
|
|
type SavePolicyFunc func(ctx context.Context, p *fleet.Policy) error
|
|
|
|
type ListGlobalPoliciesFunc func(ctx context.Context) ([]*fleet.Policy, error)
|
|
|
|
type PoliciesByIDFunc func(ctx context.Context, ids []uint) (map[uint]*fleet.Policy, error)
|
|
|
|
type DeleteGlobalPoliciesFunc func(ctx context.Context, ids []uint) ([]uint, error)
|
|
|
|
type PolicyQueriesForHostFunc func(ctx context.Context, host *fleet.Host) (map[string]string, error)
|
|
|
|
type AsyncBatchInsertPolicyMembershipFunc func(ctx context.Context, batch []fleet.PolicyMembershipResult) error
|
|
|
|
type AsyncBatchUpdatePolicyTimestampFunc func(ctx context.Context, ids []uint, ts time.Time) error
|
|
|
|
type MigrateTablesFunc func(ctx context.Context) error
|
|
|
|
type MigrateDataFunc func(ctx context.Context) error
|
|
|
|
type MigrationStatusFunc func(ctx context.Context) (*fleet.MigrationStatus, error)
|
|
|
|
type ListSoftwareFunc func(ctx context.Context, opt fleet.SoftwareListOptions) ([]fleet.Software, error)
|
|
|
|
type CountSoftwareFunc func(ctx context.Context, opt fleet.SoftwareListOptions) (int, error)
|
|
|
|
type DeleteSoftwareVulnerabilitiesFunc func(ctx context.Context, vulnerabilities []fleet.SoftwareVulnerability) error
|
|
|
|
type NewTeamPolicyFunc func(ctx context.Context, teamID uint, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error)
|
|
|
|
type ListTeamPoliciesFunc func(ctx context.Context, teamID uint) ([]*fleet.Policy, error)
|
|
|
|
type DeleteTeamPoliciesFunc func(ctx context.Context, teamID uint, ids []uint) ([]uint, error)
|
|
|
|
type TeamPolicyFunc func(ctx context.Context, teamID uint, policyID uint) (*fleet.Policy, error)
|
|
|
|
type CleanupPolicyMembershipFunc func(ctx context.Context, now time.Time) error
|
|
|
|
type LockFunc func(ctx context.Context, name string, owner string, expiration time.Duration) (bool, error)
|
|
|
|
type UnlockFunc func(ctx context.Context, name string, owner string) error
|
|
|
|
type DBLocksFunc func(ctx context.Context) ([]*fleet.DBLock, error)
|
|
|
|
type UpdateScheduledQueryAggregatedStatsFunc func(ctx context.Context) error
|
|
|
|
type UpdateQueryAggregatedStatsFunc func(ctx context.Context) error
|
|
|
|
type LoadHostByNodeKeyFunc func(ctx context.Context, nodeKey string) (*fleet.Host, error)
|
|
|
|
type LoadHostByOrbitNodeKeyFunc func(ctx context.Context, nodeKey string) (*fleet.Host, error)
|
|
|
|
type HostLiteFunc func(ctx context.Context, hostID uint) (*fleet.Host, error)
|
|
|
|
type UpdateHostOsqueryIntervalsFunc func(ctx context.Context, hostID uint, intervals fleet.HostOsqueryIntervals) error
|
|
|
|
type TeamAgentOptionsFunc func(ctx context.Context, teamID uint) (*json.RawMessage, error)
|
|
|
|
type TeamFeaturesFunc func(ctx context.Context, teamID uint) (*fleet.Features, error)
|
|
|
|
type SaveHostPackStatsFunc func(ctx context.Context, hostID uint, stats []fleet.PackStats) error
|
|
|
|
type AsyncBatchSaveHostsScheduledQueryStatsFunc func(ctx context.Context, stats map[uint][]fleet.ScheduledQueryStats, batchSize int) (int, error)
|
|
|
|
type UpdateHostSoftwareFunc func(ctx context.Context, hostID uint, software []fleet.Software) error
|
|
|
|
type UpdateHostFunc func(ctx context.Context, host *fleet.Host) error
|
|
|
|
type ListScheduledQueriesInPackFunc func(ctx context.Context, packID uint) ([]*fleet.ScheduledQuery, error)
|
|
|
|
type UpdateHostRefetchRequestedFunc func(ctx context.Context, hostID uint, value bool) error
|
|
|
|
type FlippingPoliciesForHostFunc func(ctx context.Context, hostID uint, incomingResults map[uint]*bool) (newFailing []uint, newPassing []uint, err error)
|
|
|
|
type RecordPolicyQueryExecutionsFunc func(ctx context.Context, host *fleet.Host, results map[uint]*bool, updated time.Time, deferredSaveHost bool) error
|
|
|
|
type RecordLabelQueryExecutionsFunc func(ctx context.Context, host *fleet.Host, results map[uint]*bool, t time.Time, deferredSaveHost bool) error
|
|
|
|
type SaveHostUsersFunc func(ctx context.Context, hostID uint, users []fleet.HostUser) error
|
|
|
|
type SaveHostAdditionalFunc func(ctx context.Context, hostID uint, additional *json.RawMessage) error
|
|
|
|
type SetOrUpdateMunkiInfoFunc func(ctx context.Context, hostID uint, version string, errors []string, warnings []string) error
|
|
|
|
type SetOrUpdateMDMDataFunc func(ctx context.Context, hostID uint, enrolled bool, serverURL string, installedFromDep bool) error
|
|
|
|
type SetOrUpdateHostDisksSpaceFunc func(ctx context.Context, hostID uint, gigsAvailable float64, percentAvailable float64) error
|
|
|
|
type ReplaceHostDeviceMappingFunc func(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping) error
|
|
|
|
type ReplaceHostBatteriesFunc func(ctx context.Context, id uint, mappings []*fleet.HostBattery) error
|
|
|
|
type VerifyEnrollSecretFunc func(ctx context.Context, secret string) (*fleet.EnrollSecret, error)
|
|
|
|
type EnrollHostFunc func(ctx context.Context, osqueryHostId string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error)
|
|
|
|
type EnrollOrbitFunc func(ctx context.Context, hardwareUUID string, orbitNodeKey string, teamID *uint) (*fleet.Host, error)
|
|
|
|
type SerialUpdateHostFunc func(ctx context.Context, host *fleet.Host) error
|
|
|
|
type NewJobFunc func(ctx context.Context, job *fleet.Job) (*fleet.Job, error)
|
|
|
|
type GetQueuedJobsFunc func(ctx context.Context, maxNumJobs int) ([]*fleet.Job, error)
|
|
|
|
type UpdateJobFunc func(ctx context.Context, id uint, job *fleet.Job) (*fleet.Job, error)
|
|
|
|
type InnoDBStatusFunc func(ctx context.Context) (string, error)
|
|
|
|
type ProcessListFunc func(ctx context.Context) ([]fleet.MySQLProcess, error)
|
|
|
|
type InsertWindowsUpdatesFunc func(ctx context.Context, hostID uint, updates []fleet.WindowsUpdate) error
|
|
|
|
type NewMDMAppleEnrollmentProfileFunc func(ctx context.Context, enrollmentPayload fleet.MDMAppleEnrollmentProfilePayload) (*fleet.MDMAppleEnrollmentProfile, error)
|
|
|
|
type GetMDMAppleEnrollmentProfileByTokenFunc func(ctx context.Context, token string) (*fleet.MDMAppleEnrollmentProfile, error)
|
|
|
|
type ListMDMAppleEnrollmentProfilesFunc func(ctx context.Context) ([]*fleet.MDMAppleEnrollmentProfile, error)
|
|
|
|
type GetMDMAppleCommandResultsFunc func(ctx context.Context, commandUUID string) (map[string]*fleet.MDMAppleCommandResult, error)
|
|
|
|
type NewMDMAppleInstallerFunc func(ctx context.Context, name string, size int64, manifest string, installer []byte, urlToken string) (*fleet.MDMAppleInstaller, error)
|
|
|
|
type MDMAppleInstallerFunc func(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error)
|
|
|
|
type MDMAppleInstallerDetailsByIDFunc func(ctx context.Context, id uint) (*fleet.MDMAppleInstaller, error)
|
|
|
|
type DeleteMDMAppleInstallerFunc func(ctx context.Context, id uint) error
|
|
|
|
type MDMAppleInstallerDetailsByTokenFunc func(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error)
|
|
|
|
type ListMDMAppleInstallersFunc func(ctx context.Context) ([]fleet.MDMAppleInstaller, error)
|
|
|
|
type MDMAppleListDevicesFunc func(ctx context.Context) ([]fleet.MDMAppleDevice, error)
|
|
|
|
type DataStore struct {
|
|
HealthCheckFunc HealthCheckFunc
|
|
HealthCheckFuncInvoked bool
|
|
|
|
NewCarveFunc NewCarveFunc
|
|
NewCarveFuncInvoked bool
|
|
|
|
UpdateCarveFunc UpdateCarveFunc
|
|
UpdateCarveFuncInvoked bool
|
|
|
|
CarveFunc CarveFunc
|
|
CarveFuncInvoked bool
|
|
|
|
CarveBySessionIdFunc CarveBySessionIdFunc
|
|
CarveBySessionIdFuncInvoked bool
|
|
|
|
CarveByNameFunc CarveByNameFunc
|
|
CarveByNameFuncInvoked bool
|
|
|
|
ListCarvesFunc ListCarvesFunc
|
|
ListCarvesFuncInvoked bool
|
|
|
|
NewBlockFunc NewBlockFunc
|
|
NewBlockFuncInvoked bool
|
|
|
|
GetBlockFunc GetBlockFunc
|
|
GetBlockFuncInvoked bool
|
|
|
|
CleanupCarvesFunc CleanupCarvesFunc
|
|
CleanupCarvesFuncInvoked bool
|
|
|
|
NewUserFunc NewUserFunc
|
|
NewUserFuncInvoked bool
|
|
|
|
ListUsersFunc ListUsersFunc
|
|
ListUsersFuncInvoked bool
|
|
|
|
UserByEmailFunc UserByEmailFunc
|
|
UserByEmailFuncInvoked bool
|
|
|
|
UserByIDFunc UserByIDFunc
|
|
UserByIDFuncInvoked bool
|
|
|
|
SaveUserFunc SaveUserFunc
|
|
SaveUserFuncInvoked bool
|
|
|
|
SaveUsersFunc SaveUsersFunc
|
|
SaveUsersFuncInvoked bool
|
|
|
|
DeleteUserFunc DeleteUserFunc
|
|
DeleteUserFuncInvoked bool
|
|
|
|
PendingEmailChangeFunc PendingEmailChangeFunc
|
|
PendingEmailChangeFuncInvoked bool
|
|
|
|
ConfirmPendingEmailChangeFunc ConfirmPendingEmailChangeFunc
|
|
ConfirmPendingEmailChangeFuncInvoked bool
|
|
|
|
ApplyQueriesFunc ApplyQueriesFunc
|
|
ApplyQueriesFuncInvoked bool
|
|
|
|
NewQueryFunc NewQueryFunc
|
|
NewQueryFuncInvoked bool
|
|
|
|
SaveQueryFunc SaveQueryFunc
|
|
SaveQueryFuncInvoked bool
|
|
|
|
DeleteQueryFunc DeleteQueryFunc
|
|
DeleteQueryFuncInvoked bool
|
|
|
|
DeleteQueriesFunc DeleteQueriesFunc
|
|
DeleteQueriesFuncInvoked bool
|
|
|
|
QueryFunc QueryFunc
|
|
QueryFuncInvoked bool
|
|
|
|
ListQueriesFunc ListQueriesFunc
|
|
ListQueriesFuncInvoked bool
|
|
|
|
QueryByNameFunc QueryByNameFunc
|
|
QueryByNameFuncInvoked bool
|
|
|
|
ObserverCanRunQueryFunc ObserverCanRunQueryFunc
|
|
ObserverCanRunQueryFuncInvoked bool
|
|
|
|
NewDistributedQueryCampaignFunc NewDistributedQueryCampaignFunc
|
|
NewDistributedQueryCampaignFuncInvoked bool
|
|
|
|
DistributedQueryCampaignFunc DistributedQueryCampaignFunc
|
|
DistributedQueryCampaignFuncInvoked bool
|
|
|
|
SaveDistributedQueryCampaignFunc SaveDistributedQueryCampaignFunc
|
|
SaveDistributedQueryCampaignFuncInvoked bool
|
|
|
|
DistributedQueryCampaignTargetIDsFunc DistributedQueryCampaignTargetIDsFunc
|
|
DistributedQueryCampaignTargetIDsFuncInvoked bool
|
|
|
|
NewDistributedQueryCampaignTargetFunc NewDistributedQueryCampaignTargetFunc
|
|
NewDistributedQueryCampaignTargetFuncInvoked bool
|
|
|
|
CleanupDistributedQueryCampaignsFunc CleanupDistributedQueryCampaignsFunc
|
|
CleanupDistributedQueryCampaignsFuncInvoked bool
|
|
|
|
DistributedQueryCampaignsForQueryFunc DistributedQueryCampaignsForQueryFunc
|
|
DistributedQueryCampaignsForQueryFuncInvoked bool
|
|
|
|
ApplyPackSpecsFunc ApplyPackSpecsFunc
|
|
ApplyPackSpecsFuncInvoked bool
|
|
|
|
GetPackSpecsFunc GetPackSpecsFunc
|
|
GetPackSpecsFuncInvoked bool
|
|
|
|
GetPackSpecFunc GetPackSpecFunc
|
|
GetPackSpecFuncInvoked bool
|
|
|
|
NewPackFunc NewPackFunc
|
|
NewPackFuncInvoked bool
|
|
|
|
SavePackFunc SavePackFunc
|
|
SavePackFuncInvoked bool
|
|
|
|
DeletePackFunc DeletePackFunc
|
|
DeletePackFuncInvoked bool
|
|
|
|
PackFunc PackFunc
|
|
PackFuncInvoked bool
|
|
|
|
ListPacksFunc ListPacksFunc
|
|
ListPacksFuncInvoked bool
|
|
|
|
PackByNameFunc PackByNameFunc
|
|
PackByNameFuncInvoked bool
|
|
|
|
ListPacksForHostFunc ListPacksForHostFunc
|
|
ListPacksForHostFuncInvoked bool
|
|
|
|
EnsureGlobalPackFunc EnsureGlobalPackFunc
|
|
EnsureGlobalPackFuncInvoked bool
|
|
|
|
EnsureTeamPackFunc EnsureTeamPackFunc
|
|
EnsureTeamPackFuncInvoked bool
|
|
|
|
ApplyLabelSpecsFunc ApplyLabelSpecsFunc
|
|
ApplyLabelSpecsFuncInvoked bool
|
|
|
|
GetLabelSpecsFunc GetLabelSpecsFunc
|
|
GetLabelSpecsFuncInvoked bool
|
|
|
|
GetLabelSpecFunc GetLabelSpecFunc
|
|
GetLabelSpecFuncInvoked bool
|
|
|
|
NewLabelFunc NewLabelFunc
|
|
NewLabelFuncInvoked bool
|
|
|
|
SaveLabelFunc SaveLabelFunc
|
|
SaveLabelFuncInvoked bool
|
|
|
|
DeleteLabelFunc DeleteLabelFunc
|
|
DeleteLabelFuncInvoked bool
|
|
|
|
LabelFunc LabelFunc
|
|
LabelFuncInvoked bool
|
|
|
|
ListLabelsFunc ListLabelsFunc
|
|
ListLabelsFuncInvoked bool
|
|
|
|
LabelsSummaryFunc LabelsSummaryFunc
|
|
LabelsSummaryFuncInvoked bool
|
|
|
|
LabelQueriesForHostFunc LabelQueriesForHostFunc
|
|
LabelQueriesForHostFuncInvoked bool
|
|
|
|
ListLabelsForHostFunc ListLabelsForHostFunc
|
|
ListLabelsForHostFuncInvoked bool
|
|
|
|
ListHostsInLabelFunc ListHostsInLabelFunc
|
|
ListHostsInLabelFuncInvoked bool
|
|
|
|
ListUniqueHostsInLabelsFunc ListUniqueHostsInLabelsFunc
|
|
ListUniqueHostsInLabelsFuncInvoked bool
|
|
|
|
SearchLabelsFunc SearchLabelsFunc
|
|
SearchLabelsFuncInvoked bool
|
|
|
|
LabelIDsByNameFunc LabelIDsByNameFunc
|
|
LabelIDsByNameFuncInvoked bool
|
|
|
|
AsyncBatchInsertLabelMembershipFunc AsyncBatchInsertLabelMembershipFunc
|
|
AsyncBatchInsertLabelMembershipFuncInvoked bool
|
|
|
|
AsyncBatchDeleteLabelMembershipFunc AsyncBatchDeleteLabelMembershipFunc
|
|
AsyncBatchDeleteLabelMembershipFuncInvoked bool
|
|
|
|
AsyncBatchUpdateLabelTimestampFunc AsyncBatchUpdateLabelTimestampFunc
|
|
AsyncBatchUpdateLabelTimestampFuncInvoked bool
|
|
|
|
NewHostFunc NewHostFunc
|
|
NewHostFuncInvoked bool
|
|
|
|
DeleteHostFunc DeleteHostFunc
|
|
DeleteHostFuncInvoked bool
|
|
|
|
HostFunc HostFunc
|
|
HostFuncInvoked bool
|
|
|
|
ListHostsFunc ListHostsFunc
|
|
ListHostsFuncInvoked bool
|
|
|
|
MarkHostsSeenFunc MarkHostsSeenFunc
|
|
MarkHostsSeenFuncInvoked bool
|
|
|
|
SearchHostsFunc SearchHostsFunc
|
|
SearchHostsFuncInvoked bool
|
|
|
|
EnrolledHostIDsFunc EnrolledHostIDsFunc
|
|
EnrolledHostIDsFuncInvoked bool
|
|
|
|
CountEnrolledHostsFunc CountEnrolledHostsFunc
|
|
CountEnrolledHostsFuncInvoked bool
|
|
|
|
CleanupIncomingHostsFunc CleanupIncomingHostsFunc
|
|
CleanupIncomingHostsFuncInvoked bool
|
|
|
|
GenerateHostStatusStatisticsFunc GenerateHostStatusStatisticsFunc
|
|
GenerateHostStatusStatisticsFuncInvoked bool
|
|
|
|
HostIDsByNameFunc HostIDsByNameFunc
|
|
HostIDsByNameFuncInvoked bool
|
|
|
|
HostIDsByOSVersionFunc HostIDsByOSVersionFunc
|
|
HostIDsByOSVersionFuncInvoked bool
|
|
|
|
HostByIdentifierFunc HostByIdentifierFunc
|
|
HostByIdentifierFuncInvoked bool
|
|
|
|
AddHostsToTeamFunc AddHostsToTeamFunc
|
|
AddHostsToTeamFuncInvoked bool
|
|
|
|
TotalAndUnseenHostsSinceFunc TotalAndUnseenHostsSinceFunc
|
|
TotalAndUnseenHostsSinceFuncInvoked bool
|
|
|
|
DeleteHostsFunc DeleteHostsFunc
|
|
DeleteHostsFuncInvoked bool
|
|
|
|
CountHostsFunc CountHostsFunc
|
|
CountHostsFuncInvoked bool
|
|
|
|
CountHostsInLabelFunc CountHostsInLabelFunc
|
|
CountHostsInLabelFuncInvoked bool
|
|
|
|
ListHostDeviceMappingFunc ListHostDeviceMappingFunc
|
|
ListHostDeviceMappingFuncInvoked bool
|
|
|
|
ListHostBatteriesFunc ListHostBatteriesFunc
|
|
ListHostBatteriesFuncInvoked bool
|
|
|
|
LoadHostByDeviceAuthTokenFunc LoadHostByDeviceAuthTokenFunc
|
|
LoadHostByDeviceAuthTokenFuncInvoked bool
|
|
|
|
SetOrUpdateDeviceAuthTokenFunc SetOrUpdateDeviceAuthTokenFunc
|
|
SetOrUpdateDeviceAuthTokenFuncInvoked bool
|
|
|
|
FailingPoliciesCountFunc FailingPoliciesCountFunc
|
|
FailingPoliciesCountFuncInvoked bool
|
|
|
|
ListPoliciesForHostFunc ListPoliciesForHostFunc
|
|
ListPoliciesForHostFuncInvoked bool
|
|
|
|
GetHostMunkiVersionFunc GetHostMunkiVersionFunc
|
|
GetHostMunkiVersionFuncInvoked bool
|
|
|
|
GetHostMunkiIssuesFunc GetHostMunkiIssuesFunc
|
|
GetHostMunkiIssuesFuncInvoked bool
|
|
|
|
GetHostMDMFunc GetHostMDMFunc
|
|
GetHostMDMFuncInvoked bool
|
|
|
|
AggregatedMunkiVersionFunc AggregatedMunkiVersionFunc
|
|
AggregatedMunkiVersionFuncInvoked bool
|
|
|
|
AggregatedMunkiIssuesFunc AggregatedMunkiIssuesFunc
|
|
AggregatedMunkiIssuesFuncInvoked bool
|
|
|
|
AggregatedMDMStatusFunc AggregatedMDMStatusFunc
|
|
AggregatedMDMStatusFuncInvoked bool
|
|
|
|
AggregatedMDMSolutionsFunc AggregatedMDMSolutionsFunc
|
|
AggregatedMDMSolutionsFuncInvoked bool
|
|
|
|
GenerateAggregatedMunkiAndMDMFunc GenerateAggregatedMunkiAndMDMFunc
|
|
GenerateAggregatedMunkiAndMDMFuncInvoked bool
|
|
|
|
GetMunkiIssueFunc GetMunkiIssueFunc
|
|
GetMunkiIssueFuncInvoked bool
|
|
|
|
GetMDMSolutionFunc GetMDMSolutionFunc
|
|
GetMDMSolutionFuncInvoked bool
|
|
|
|
OSVersionsFunc OSVersionsFunc
|
|
OSVersionsFuncInvoked bool
|
|
|
|
UpdateOSVersionsFunc UpdateOSVersionsFunc
|
|
UpdateOSVersionsFuncInvoked bool
|
|
|
|
CountHostsInTargetsFunc CountHostsInTargetsFunc
|
|
CountHostsInTargetsFuncInvoked bool
|
|
|
|
HostIDsInTargetsFunc HostIDsInTargetsFunc
|
|
HostIDsInTargetsFuncInvoked bool
|
|
|
|
NewPasswordResetRequestFunc NewPasswordResetRequestFunc
|
|
NewPasswordResetRequestFuncInvoked bool
|
|
|
|
DeletePasswordResetRequestsForUserFunc DeletePasswordResetRequestsForUserFunc
|
|
DeletePasswordResetRequestsForUserFuncInvoked bool
|
|
|
|
FindPasswordResetByTokenFunc FindPasswordResetByTokenFunc
|
|
FindPasswordResetByTokenFuncInvoked bool
|
|
|
|
SessionByKeyFunc SessionByKeyFunc
|
|
SessionByKeyFuncInvoked bool
|
|
|
|
SessionByIDFunc SessionByIDFunc
|
|
SessionByIDFuncInvoked bool
|
|
|
|
ListSessionsForUserFunc ListSessionsForUserFunc
|
|
ListSessionsForUserFuncInvoked bool
|
|
|
|
NewSessionFunc NewSessionFunc
|
|
NewSessionFuncInvoked bool
|
|
|
|
DestroySessionFunc DestroySessionFunc
|
|
DestroySessionFuncInvoked bool
|
|
|
|
DestroyAllSessionsForUserFunc DestroyAllSessionsForUserFunc
|
|
DestroyAllSessionsForUserFuncInvoked bool
|
|
|
|
MarkSessionAccessedFunc MarkSessionAccessedFunc
|
|
MarkSessionAccessedFuncInvoked bool
|
|
|
|
NewAppConfigFunc NewAppConfigFunc
|
|
NewAppConfigFuncInvoked bool
|
|
|
|
AppConfigFunc AppConfigFunc
|
|
AppConfigFuncInvoked bool
|
|
|
|
SaveAppConfigFunc SaveAppConfigFunc
|
|
SaveAppConfigFuncInvoked bool
|
|
|
|
GetEnrollSecretsFunc GetEnrollSecretsFunc
|
|
GetEnrollSecretsFuncInvoked bool
|
|
|
|
ApplyEnrollSecretsFunc ApplyEnrollSecretsFunc
|
|
ApplyEnrollSecretsFuncInvoked bool
|
|
|
|
NewInviteFunc NewInviteFunc
|
|
NewInviteFuncInvoked bool
|
|
|
|
ListInvitesFunc ListInvitesFunc
|
|
ListInvitesFuncInvoked bool
|
|
|
|
InviteFunc InviteFunc
|
|
InviteFuncInvoked bool
|
|
|
|
InviteByEmailFunc InviteByEmailFunc
|
|
InviteByEmailFuncInvoked bool
|
|
|
|
InviteByTokenFunc InviteByTokenFunc
|
|
InviteByTokenFuncInvoked bool
|
|
|
|
DeleteInviteFunc DeleteInviteFunc
|
|
DeleteInviteFuncInvoked bool
|
|
|
|
UpdateInviteFunc UpdateInviteFunc
|
|
UpdateInviteFuncInvoked bool
|
|
|
|
ListScheduledQueriesInPackWithStatsFunc ListScheduledQueriesInPackWithStatsFunc
|
|
ListScheduledQueriesInPackWithStatsFuncInvoked bool
|
|
|
|
NewScheduledQueryFunc NewScheduledQueryFunc
|
|
NewScheduledQueryFuncInvoked bool
|
|
|
|
SaveScheduledQueryFunc SaveScheduledQueryFunc
|
|
SaveScheduledQueryFuncInvoked bool
|
|
|
|
DeleteScheduledQueryFunc DeleteScheduledQueryFunc
|
|
DeleteScheduledQueryFuncInvoked bool
|
|
|
|
ScheduledQueryFunc ScheduledQueryFunc
|
|
ScheduledQueryFuncInvoked bool
|
|
|
|
CleanupExpiredHostsFunc CleanupExpiredHostsFunc
|
|
CleanupExpiredHostsFuncInvoked bool
|
|
|
|
ScheduledQueryIDsByNameFunc ScheduledQueryIDsByNameFunc
|
|
ScheduledQueryIDsByNameFuncInvoked bool
|
|
|
|
NewTeamFunc NewTeamFunc
|
|
NewTeamFuncInvoked bool
|
|
|
|
SaveTeamFunc SaveTeamFunc
|
|
SaveTeamFuncInvoked bool
|
|
|
|
TeamFunc TeamFunc
|
|
TeamFuncInvoked bool
|
|
|
|
DeleteTeamFunc DeleteTeamFunc
|
|
DeleteTeamFuncInvoked bool
|
|
|
|
TeamByNameFunc TeamByNameFunc
|
|
TeamByNameFuncInvoked bool
|
|
|
|
ListTeamsFunc ListTeamsFunc
|
|
ListTeamsFuncInvoked bool
|
|
|
|
TeamsSummaryFunc TeamsSummaryFunc
|
|
TeamsSummaryFuncInvoked bool
|
|
|
|
SearchTeamsFunc SearchTeamsFunc
|
|
SearchTeamsFuncInvoked bool
|
|
|
|
TeamEnrollSecretsFunc TeamEnrollSecretsFunc
|
|
TeamEnrollSecretsFuncInvoked bool
|
|
|
|
DeleteIntegrationsFromTeamsFunc DeleteIntegrationsFromTeamsFunc
|
|
DeleteIntegrationsFromTeamsFuncInvoked bool
|
|
|
|
ListSoftwareForVulnDetectionFunc ListSoftwareForVulnDetectionFunc
|
|
ListSoftwareForVulnDetectionFuncInvoked bool
|
|
|
|
ListSoftwareVulnerabilitiesFunc ListSoftwareVulnerabilitiesFunc
|
|
ListSoftwareVulnerabilitiesFuncInvoked bool
|
|
|
|
LoadHostSoftwareFunc LoadHostSoftwareFunc
|
|
LoadHostSoftwareFuncInvoked bool
|
|
|
|
AllSoftwareWithoutCPEIteratorFunc AllSoftwareWithoutCPEIteratorFunc
|
|
AllSoftwareWithoutCPEIteratorFuncInvoked bool
|
|
|
|
AddCPEForSoftwareFunc AddCPEForSoftwareFunc
|
|
AddCPEForSoftwareFuncInvoked bool
|
|
|
|
ListSoftwareCPEsFunc ListSoftwareCPEsFunc
|
|
ListSoftwareCPEsFuncInvoked bool
|
|
|
|
InsertVulnerabilitiesFunc InsertVulnerabilitiesFunc
|
|
InsertVulnerabilitiesFuncInvoked bool
|
|
|
|
SoftwareByIDFunc SoftwareByIDFunc
|
|
SoftwareByIDFuncInvoked bool
|
|
|
|
ListSoftwareByHostIDShortFunc ListSoftwareByHostIDShortFunc
|
|
ListSoftwareByHostIDShortFuncInvoked bool
|
|
|
|
SyncHostsSoftwareFunc SyncHostsSoftwareFunc
|
|
SyncHostsSoftwareFuncInvoked bool
|
|
|
|
HostsBySoftwareIDsFunc HostsBySoftwareIDsFunc
|
|
HostsBySoftwareIDsFuncInvoked bool
|
|
|
|
HostsByCVEFunc HostsByCVEFunc
|
|
HostsByCVEFuncInvoked bool
|
|
|
|
InsertCVEMetaFunc InsertCVEMetaFunc
|
|
InsertCVEMetaFuncInvoked bool
|
|
|
|
ListCVEsFunc ListCVEsFunc
|
|
ListCVEsFuncInvoked bool
|
|
|
|
ListOperatingSystemsFunc ListOperatingSystemsFunc
|
|
ListOperatingSystemsFuncInvoked bool
|
|
|
|
UpdateHostOperatingSystemFunc UpdateHostOperatingSystemFunc
|
|
UpdateHostOperatingSystemFuncInvoked bool
|
|
|
|
CleanupHostOperatingSystemsFunc CleanupHostOperatingSystemsFunc
|
|
CleanupHostOperatingSystemsFuncInvoked bool
|
|
|
|
NewActivityFunc NewActivityFunc
|
|
NewActivityFuncInvoked bool
|
|
|
|
ListActivitiesFunc ListActivitiesFunc
|
|
ListActivitiesFuncInvoked bool
|
|
|
|
ShouldSendStatisticsFunc ShouldSendStatisticsFunc
|
|
ShouldSendStatisticsFuncInvoked bool
|
|
|
|
RecordStatisticsSentFunc RecordStatisticsSentFunc
|
|
RecordStatisticsSentFuncInvoked bool
|
|
|
|
ApplyPolicySpecsFunc ApplyPolicySpecsFunc
|
|
ApplyPolicySpecsFuncInvoked bool
|
|
|
|
NewGlobalPolicyFunc NewGlobalPolicyFunc
|
|
NewGlobalPolicyFuncInvoked bool
|
|
|
|
PolicyFunc PolicyFunc
|
|
PolicyFuncInvoked bool
|
|
|
|
SavePolicyFunc SavePolicyFunc
|
|
SavePolicyFuncInvoked bool
|
|
|
|
ListGlobalPoliciesFunc ListGlobalPoliciesFunc
|
|
ListGlobalPoliciesFuncInvoked bool
|
|
|
|
PoliciesByIDFunc PoliciesByIDFunc
|
|
PoliciesByIDFuncInvoked bool
|
|
|
|
DeleteGlobalPoliciesFunc DeleteGlobalPoliciesFunc
|
|
DeleteGlobalPoliciesFuncInvoked bool
|
|
|
|
PolicyQueriesForHostFunc PolicyQueriesForHostFunc
|
|
PolicyQueriesForHostFuncInvoked bool
|
|
|
|
AsyncBatchInsertPolicyMembershipFunc AsyncBatchInsertPolicyMembershipFunc
|
|
AsyncBatchInsertPolicyMembershipFuncInvoked bool
|
|
|
|
AsyncBatchUpdatePolicyTimestampFunc AsyncBatchUpdatePolicyTimestampFunc
|
|
AsyncBatchUpdatePolicyTimestampFuncInvoked bool
|
|
|
|
MigrateTablesFunc MigrateTablesFunc
|
|
MigrateTablesFuncInvoked bool
|
|
|
|
MigrateDataFunc MigrateDataFunc
|
|
MigrateDataFuncInvoked bool
|
|
|
|
MigrationStatusFunc MigrationStatusFunc
|
|
MigrationStatusFuncInvoked bool
|
|
|
|
ListSoftwareFunc ListSoftwareFunc
|
|
ListSoftwareFuncInvoked bool
|
|
|
|
CountSoftwareFunc CountSoftwareFunc
|
|
CountSoftwareFuncInvoked bool
|
|
|
|
DeleteSoftwareVulnerabilitiesFunc DeleteSoftwareVulnerabilitiesFunc
|
|
DeleteSoftwareVulnerabilitiesFuncInvoked bool
|
|
|
|
NewTeamPolicyFunc NewTeamPolicyFunc
|
|
NewTeamPolicyFuncInvoked bool
|
|
|
|
ListTeamPoliciesFunc ListTeamPoliciesFunc
|
|
ListTeamPoliciesFuncInvoked bool
|
|
|
|
DeleteTeamPoliciesFunc DeleteTeamPoliciesFunc
|
|
DeleteTeamPoliciesFuncInvoked bool
|
|
|
|
TeamPolicyFunc TeamPolicyFunc
|
|
TeamPolicyFuncInvoked bool
|
|
|
|
CleanupPolicyMembershipFunc CleanupPolicyMembershipFunc
|
|
CleanupPolicyMembershipFuncInvoked bool
|
|
|
|
LockFunc LockFunc
|
|
LockFuncInvoked bool
|
|
|
|
UnlockFunc UnlockFunc
|
|
UnlockFuncInvoked bool
|
|
|
|
DBLocksFunc DBLocksFunc
|
|
DBLocksFuncInvoked bool
|
|
|
|
UpdateScheduledQueryAggregatedStatsFunc UpdateScheduledQueryAggregatedStatsFunc
|
|
UpdateScheduledQueryAggregatedStatsFuncInvoked bool
|
|
|
|
UpdateQueryAggregatedStatsFunc UpdateQueryAggregatedStatsFunc
|
|
UpdateQueryAggregatedStatsFuncInvoked bool
|
|
|
|
LoadHostByNodeKeyFunc LoadHostByNodeKeyFunc
|
|
LoadHostByNodeKeyFuncInvoked bool
|
|
|
|
LoadHostByOrbitNodeKeyFunc LoadHostByOrbitNodeKeyFunc
|
|
LoadHostByOrbitNodeKeyFuncInvoked bool
|
|
|
|
HostLiteFunc HostLiteFunc
|
|
HostLiteFuncInvoked bool
|
|
|
|
UpdateHostOsqueryIntervalsFunc UpdateHostOsqueryIntervalsFunc
|
|
UpdateHostOsqueryIntervalsFuncInvoked bool
|
|
|
|
TeamAgentOptionsFunc TeamAgentOptionsFunc
|
|
TeamAgentOptionsFuncInvoked bool
|
|
|
|
TeamFeaturesFunc TeamFeaturesFunc
|
|
TeamFeaturesFuncInvoked bool
|
|
|
|
SaveHostPackStatsFunc SaveHostPackStatsFunc
|
|
SaveHostPackStatsFuncInvoked bool
|
|
|
|
AsyncBatchSaveHostsScheduledQueryStatsFunc AsyncBatchSaveHostsScheduledQueryStatsFunc
|
|
AsyncBatchSaveHostsScheduledQueryStatsFuncInvoked bool
|
|
|
|
UpdateHostSoftwareFunc UpdateHostSoftwareFunc
|
|
UpdateHostSoftwareFuncInvoked bool
|
|
|
|
UpdateHostFunc UpdateHostFunc
|
|
UpdateHostFuncInvoked bool
|
|
|
|
ListScheduledQueriesInPackFunc ListScheduledQueriesInPackFunc
|
|
ListScheduledQueriesInPackFuncInvoked bool
|
|
|
|
UpdateHostRefetchRequestedFunc UpdateHostRefetchRequestedFunc
|
|
UpdateHostRefetchRequestedFuncInvoked bool
|
|
|
|
FlippingPoliciesForHostFunc FlippingPoliciesForHostFunc
|
|
FlippingPoliciesForHostFuncInvoked bool
|
|
|
|
RecordPolicyQueryExecutionsFunc RecordPolicyQueryExecutionsFunc
|
|
RecordPolicyQueryExecutionsFuncInvoked bool
|
|
|
|
RecordLabelQueryExecutionsFunc RecordLabelQueryExecutionsFunc
|
|
RecordLabelQueryExecutionsFuncInvoked bool
|
|
|
|
SaveHostUsersFunc SaveHostUsersFunc
|
|
SaveHostUsersFuncInvoked bool
|
|
|
|
SaveHostAdditionalFunc SaveHostAdditionalFunc
|
|
SaveHostAdditionalFuncInvoked bool
|
|
|
|
SetOrUpdateMunkiInfoFunc SetOrUpdateMunkiInfoFunc
|
|
SetOrUpdateMunkiInfoFuncInvoked bool
|
|
|
|
SetOrUpdateMDMDataFunc SetOrUpdateMDMDataFunc
|
|
SetOrUpdateMDMDataFuncInvoked bool
|
|
|
|
SetOrUpdateHostDisksSpaceFunc SetOrUpdateHostDisksSpaceFunc
|
|
SetOrUpdateHostDisksSpaceFuncInvoked bool
|
|
|
|
ReplaceHostDeviceMappingFunc ReplaceHostDeviceMappingFunc
|
|
ReplaceHostDeviceMappingFuncInvoked bool
|
|
|
|
ReplaceHostBatteriesFunc ReplaceHostBatteriesFunc
|
|
ReplaceHostBatteriesFuncInvoked bool
|
|
|
|
VerifyEnrollSecretFunc VerifyEnrollSecretFunc
|
|
VerifyEnrollSecretFuncInvoked bool
|
|
|
|
EnrollHostFunc EnrollHostFunc
|
|
EnrollHostFuncInvoked bool
|
|
|
|
EnrollOrbitFunc EnrollOrbitFunc
|
|
EnrollOrbitFuncInvoked bool
|
|
|
|
SerialUpdateHostFunc SerialUpdateHostFunc
|
|
SerialUpdateHostFuncInvoked bool
|
|
|
|
NewJobFunc NewJobFunc
|
|
NewJobFuncInvoked bool
|
|
|
|
GetQueuedJobsFunc GetQueuedJobsFunc
|
|
GetQueuedJobsFuncInvoked bool
|
|
|
|
UpdateJobFunc UpdateJobFunc
|
|
UpdateJobFuncInvoked bool
|
|
|
|
InnoDBStatusFunc InnoDBStatusFunc
|
|
InnoDBStatusFuncInvoked bool
|
|
|
|
ProcessListFunc ProcessListFunc
|
|
ProcessListFuncInvoked bool
|
|
|
|
InsertWindowsUpdatesFunc InsertWindowsUpdatesFunc
|
|
InsertWindowsUpdatesFuncInvoked bool
|
|
|
|
NewMDMAppleEnrollmentProfileFunc NewMDMAppleEnrollmentProfileFunc
|
|
NewMDMAppleEnrollmentProfileFuncInvoked bool
|
|
|
|
GetMDMAppleEnrollmentProfileByTokenFunc GetMDMAppleEnrollmentProfileByTokenFunc
|
|
GetMDMAppleEnrollmentProfileByTokenFuncInvoked bool
|
|
|
|
ListMDMAppleEnrollmentProfilesFunc ListMDMAppleEnrollmentProfilesFunc
|
|
ListMDMAppleEnrollmentProfilesFuncInvoked bool
|
|
|
|
GetMDMAppleCommandResultsFunc GetMDMAppleCommandResultsFunc
|
|
GetMDMAppleCommandResultsFuncInvoked bool
|
|
|
|
NewMDMAppleInstallerFunc NewMDMAppleInstallerFunc
|
|
NewMDMAppleInstallerFuncInvoked bool
|
|
|
|
MDMAppleInstallerFunc MDMAppleInstallerFunc
|
|
MDMAppleInstallerFuncInvoked bool
|
|
|
|
MDMAppleInstallerDetailsByIDFunc MDMAppleInstallerDetailsByIDFunc
|
|
MDMAppleInstallerDetailsByIDFuncInvoked bool
|
|
|
|
DeleteMDMAppleInstallerFunc DeleteMDMAppleInstallerFunc
|
|
DeleteMDMAppleInstallerFuncInvoked bool
|
|
|
|
MDMAppleInstallerDetailsByTokenFunc MDMAppleInstallerDetailsByTokenFunc
|
|
MDMAppleInstallerDetailsByTokenFuncInvoked bool
|
|
|
|
ListMDMAppleInstallersFunc ListMDMAppleInstallersFunc
|
|
ListMDMAppleInstallersFuncInvoked bool
|
|
|
|
MDMAppleListDevicesFunc MDMAppleListDevicesFunc
|
|
MDMAppleListDevicesFuncInvoked bool
|
|
}
|
|
|
|
func (s *DataStore) HealthCheck() error {
|
|
s.HealthCheckFuncInvoked = true
|
|
return s.HealthCheckFunc()
|
|
}
|
|
|
|
func (s *DataStore) NewCarve(ctx context.Context, metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error) {
|
|
s.NewCarveFuncInvoked = true
|
|
return s.NewCarveFunc(ctx, metadata)
|
|
}
|
|
|
|
func (s *DataStore) UpdateCarve(ctx context.Context, metadata *fleet.CarveMetadata) error {
|
|
s.UpdateCarveFuncInvoked = true
|
|
return s.UpdateCarveFunc(ctx, metadata)
|
|
}
|
|
|
|
func (s *DataStore) Carve(ctx context.Context, carveId int64) (*fleet.CarveMetadata, error) {
|
|
s.CarveFuncInvoked = true
|
|
return s.CarveFunc(ctx, carveId)
|
|
}
|
|
|
|
func (s *DataStore) CarveBySessionId(ctx context.Context, sessionId string) (*fleet.CarveMetadata, error) {
|
|
s.CarveBySessionIdFuncInvoked = true
|
|
return s.CarveBySessionIdFunc(ctx, sessionId)
|
|
}
|
|
|
|
func (s *DataStore) CarveByName(ctx context.Context, name string) (*fleet.CarveMetadata, error) {
|
|
s.CarveByNameFuncInvoked = true
|
|
return s.CarveByNameFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) ListCarves(ctx context.Context, opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error) {
|
|
s.ListCarvesFuncInvoked = true
|
|
return s.ListCarvesFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) NewBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64, data []byte) error {
|
|
s.NewBlockFuncInvoked = true
|
|
return s.NewBlockFunc(ctx, metadata, blockId, data)
|
|
}
|
|
|
|
func (s *DataStore) GetBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64) ([]byte, error) {
|
|
s.GetBlockFuncInvoked = true
|
|
return s.GetBlockFunc(ctx, metadata, blockId)
|
|
}
|
|
|
|
func (s *DataStore) CleanupCarves(ctx context.Context, now time.Time) (expired int, err error) {
|
|
s.CleanupCarvesFuncInvoked = true
|
|
return s.CleanupCarvesFunc(ctx, now)
|
|
}
|
|
|
|
func (s *DataStore) NewUser(ctx context.Context, user *fleet.User) (*fleet.User, error) {
|
|
s.NewUserFuncInvoked = true
|
|
return s.NewUserFunc(ctx, user)
|
|
}
|
|
|
|
func (s *DataStore) ListUsers(ctx context.Context, opt fleet.UserListOptions) ([]*fleet.User, error) {
|
|
s.ListUsersFuncInvoked = true
|
|
return s.ListUsersFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) UserByEmail(ctx context.Context, email string) (*fleet.User, error) {
|
|
s.UserByEmailFuncInvoked = true
|
|
return s.UserByEmailFunc(ctx, email)
|
|
}
|
|
|
|
func (s *DataStore) UserByID(ctx context.Context, id uint) (*fleet.User, error) {
|
|
s.UserByIDFuncInvoked = true
|
|
return s.UserByIDFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) SaveUser(ctx context.Context, user *fleet.User) error {
|
|
s.SaveUserFuncInvoked = true
|
|
return s.SaveUserFunc(ctx, user)
|
|
}
|
|
|
|
func (s *DataStore) SaveUsers(ctx context.Context, users []*fleet.User) error {
|
|
s.SaveUsersFuncInvoked = true
|
|
return s.SaveUsersFunc(ctx, users)
|
|
}
|
|
|
|
func (s *DataStore) DeleteUser(ctx context.Context, id uint) error {
|
|
s.DeleteUserFuncInvoked = true
|
|
return s.DeleteUserFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) PendingEmailChange(ctx context.Context, userID uint, newEmail string, token string) error {
|
|
s.PendingEmailChangeFuncInvoked = true
|
|
return s.PendingEmailChangeFunc(ctx, userID, newEmail, token)
|
|
}
|
|
|
|
func (s *DataStore) ConfirmPendingEmailChange(ctx context.Context, userID uint, token string) (string, error) {
|
|
s.ConfirmPendingEmailChangeFuncInvoked = true
|
|
return s.ConfirmPendingEmailChangeFunc(ctx, userID, token)
|
|
}
|
|
|
|
func (s *DataStore) ApplyQueries(ctx context.Context, authorID uint, queries []*fleet.Query) error {
|
|
s.ApplyQueriesFuncInvoked = true
|
|
return s.ApplyQueriesFunc(ctx, authorID, queries)
|
|
}
|
|
|
|
func (s *DataStore) NewQuery(ctx context.Context, query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error) {
|
|
s.NewQueryFuncInvoked = true
|
|
return s.NewQueryFunc(ctx, query, opts...)
|
|
}
|
|
|
|
func (s *DataStore) SaveQuery(ctx context.Context, query *fleet.Query) error {
|
|
s.SaveQueryFuncInvoked = true
|
|
return s.SaveQueryFunc(ctx, query)
|
|
}
|
|
|
|
func (s *DataStore) DeleteQuery(ctx context.Context, name string) error {
|
|
s.DeleteQueryFuncInvoked = true
|
|
return s.DeleteQueryFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) DeleteQueries(ctx context.Context, ids []uint) (uint, error) {
|
|
s.DeleteQueriesFuncInvoked = true
|
|
return s.DeleteQueriesFunc(ctx, ids)
|
|
}
|
|
|
|
func (s *DataStore) Query(ctx context.Context, id uint) (*fleet.Query, error) {
|
|
s.QueryFuncInvoked = true
|
|
return s.QueryFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) ListQueries(ctx context.Context, opt fleet.ListQueryOptions) ([]*fleet.Query, error) {
|
|
s.ListQueriesFuncInvoked = true
|
|
return s.ListQueriesFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) QueryByName(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Query, error) {
|
|
s.QueryByNameFuncInvoked = true
|
|
return s.QueryByNameFunc(ctx, name, opts...)
|
|
}
|
|
|
|
func (s *DataStore) ObserverCanRunQuery(ctx context.Context, queryID uint) (bool, error) {
|
|
s.ObserverCanRunQueryFuncInvoked = true
|
|
return s.ObserverCanRunQueryFunc(ctx, queryID)
|
|
}
|
|
|
|
func (s *DataStore) NewDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) (*fleet.DistributedQueryCampaign, error) {
|
|
s.NewDistributedQueryCampaignFuncInvoked = true
|
|
return s.NewDistributedQueryCampaignFunc(ctx, camp)
|
|
}
|
|
|
|
func (s *DataStore) DistributedQueryCampaign(ctx context.Context, id uint) (*fleet.DistributedQueryCampaign, error) {
|
|
s.DistributedQueryCampaignFuncInvoked = true
|
|
return s.DistributedQueryCampaignFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) SaveDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) error {
|
|
s.SaveDistributedQueryCampaignFuncInvoked = true
|
|
return s.SaveDistributedQueryCampaignFunc(ctx, camp)
|
|
}
|
|
|
|
func (s *DataStore) DistributedQueryCampaignTargetIDs(ctx context.Context, id uint) (targets *fleet.HostTargets, err error) {
|
|
s.DistributedQueryCampaignTargetIDsFuncInvoked = true
|
|
return s.DistributedQueryCampaignTargetIDsFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) NewDistributedQueryCampaignTarget(ctx context.Context, target *fleet.DistributedQueryCampaignTarget) (*fleet.DistributedQueryCampaignTarget, error) {
|
|
s.NewDistributedQueryCampaignTargetFuncInvoked = true
|
|
return s.NewDistributedQueryCampaignTargetFunc(ctx, target)
|
|
}
|
|
|
|
func (s *DataStore) CleanupDistributedQueryCampaigns(ctx context.Context, now time.Time) (expired uint, err error) {
|
|
s.CleanupDistributedQueryCampaignsFuncInvoked = true
|
|
return s.CleanupDistributedQueryCampaignsFunc(ctx, now)
|
|
}
|
|
|
|
func (s *DataStore) DistributedQueryCampaignsForQuery(ctx context.Context, queryID uint) ([]*fleet.DistributedQueryCampaign, error) {
|
|
s.DistributedQueryCampaignsForQueryFuncInvoked = true
|
|
return s.DistributedQueryCampaignsForQueryFunc(ctx, queryID)
|
|
}
|
|
|
|
func (s *DataStore) ApplyPackSpecs(ctx context.Context, specs []*fleet.PackSpec) error {
|
|
s.ApplyPackSpecsFuncInvoked = true
|
|
return s.ApplyPackSpecsFunc(ctx, specs)
|
|
}
|
|
|
|
func (s *DataStore) GetPackSpecs(ctx context.Context) ([]*fleet.PackSpec, error) {
|
|
s.GetPackSpecsFuncInvoked = true
|
|
return s.GetPackSpecsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) GetPackSpec(ctx context.Context, name string) (*fleet.PackSpec, error) {
|
|
s.GetPackSpecFuncInvoked = true
|
|
return s.GetPackSpecFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) NewPack(ctx context.Context, pack *fleet.Pack, opts ...fleet.OptionalArg) (*fleet.Pack, error) {
|
|
s.NewPackFuncInvoked = true
|
|
return s.NewPackFunc(ctx, pack, opts...)
|
|
}
|
|
|
|
func (s *DataStore) SavePack(ctx context.Context, pack *fleet.Pack) error {
|
|
s.SavePackFuncInvoked = true
|
|
return s.SavePackFunc(ctx, pack)
|
|
}
|
|
|
|
func (s *DataStore) DeletePack(ctx context.Context, name string) error {
|
|
s.DeletePackFuncInvoked = true
|
|
return s.DeletePackFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) Pack(ctx context.Context, pid uint) (*fleet.Pack, error) {
|
|
s.PackFuncInvoked = true
|
|
return s.PackFunc(ctx, pid)
|
|
}
|
|
|
|
func (s *DataStore) ListPacks(ctx context.Context, opt fleet.PackListOptions) ([]*fleet.Pack, error) {
|
|
s.ListPacksFuncInvoked = true
|
|
return s.ListPacksFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) PackByName(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Pack, bool, error) {
|
|
s.PackByNameFuncInvoked = true
|
|
return s.PackByNameFunc(ctx, name, opts...)
|
|
}
|
|
|
|
func (s *DataStore) ListPacksForHost(ctx context.Context, hid uint) (packs []*fleet.Pack, err error) {
|
|
s.ListPacksForHostFuncInvoked = true
|
|
return s.ListPacksForHostFunc(ctx, hid)
|
|
}
|
|
|
|
func (s *DataStore) EnsureGlobalPack(ctx context.Context) (*fleet.Pack, error) {
|
|
s.EnsureGlobalPackFuncInvoked = true
|
|
return s.EnsureGlobalPackFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) EnsureTeamPack(ctx context.Context, teamID uint) (*fleet.Pack, error) {
|
|
s.EnsureTeamPackFuncInvoked = true
|
|
return s.EnsureTeamPackFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) ApplyLabelSpecs(ctx context.Context, specs []*fleet.LabelSpec) error {
|
|
s.ApplyLabelSpecsFuncInvoked = true
|
|
return s.ApplyLabelSpecsFunc(ctx, specs)
|
|
}
|
|
|
|
func (s *DataStore) GetLabelSpecs(ctx context.Context) ([]*fleet.LabelSpec, error) {
|
|
s.GetLabelSpecsFuncInvoked = true
|
|
return s.GetLabelSpecsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) GetLabelSpec(ctx context.Context, name string) (*fleet.LabelSpec, error) {
|
|
s.GetLabelSpecFuncInvoked = true
|
|
return s.GetLabelSpecFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) NewLabel(ctx context.Context, Label *fleet.Label, opts ...fleet.OptionalArg) (*fleet.Label, error) {
|
|
s.NewLabelFuncInvoked = true
|
|
return s.NewLabelFunc(ctx, Label, opts...)
|
|
}
|
|
|
|
func (s *DataStore) SaveLabel(ctx context.Context, label *fleet.Label) (*fleet.Label, error) {
|
|
s.SaveLabelFuncInvoked = true
|
|
return s.SaveLabelFunc(ctx, label)
|
|
}
|
|
|
|
func (s *DataStore) DeleteLabel(ctx context.Context, name string) error {
|
|
s.DeleteLabelFuncInvoked = true
|
|
return s.DeleteLabelFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) Label(ctx context.Context, lid uint) (*fleet.Label, error) {
|
|
s.LabelFuncInvoked = true
|
|
return s.LabelFunc(ctx, lid)
|
|
}
|
|
|
|
func (s *DataStore) ListLabels(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Label, error) {
|
|
s.ListLabelsFuncInvoked = true
|
|
return s.ListLabelsFunc(ctx, filter, opt)
|
|
}
|
|
|
|
func (s *DataStore) LabelsSummary(ctx context.Context) ([]*fleet.LabelSummary, error) {
|
|
s.LabelsSummaryFuncInvoked = true
|
|
return s.LabelsSummaryFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) LabelQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
|
|
s.LabelQueriesForHostFuncInvoked = true
|
|
return s.LabelQueriesForHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) ListLabelsForHost(ctx context.Context, hid uint) ([]*fleet.Label, error) {
|
|
s.ListLabelsForHostFuncInvoked = true
|
|
return s.ListLabelsForHostFunc(ctx, hid)
|
|
}
|
|
|
|
func (s *DataStore) ListHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) ([]*fleet.Host, error) {
|
|
s.ListHostsInLabelFuncInvoked = true
|
|
return s.ListHostsInLabelFunc(ctx, filter, lid, opt)
|
|
}
|
|
|
|
func (s *DataStore) ListUniqueHostsInLabels(ctx context.Context, filter fleet.TeamFilter, labels []uint) ([]*fleet.Host, error) {
|
|
s.ListUniqueHostsInLabelsFuncInvoked = true
|
|
return s.ListUniqueHostsInLabelsFunc(ctx, filter, labels)
|
|
}
|
|
|
|
func (s *DataStore) SearchLabels(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Label, error) {
|
|
s.SearchLabelsFuncInvoked = true
|
|
return s.SearchLabelsFunc(ctx, filter, query, omit...)
|
|
}
|
|
|
|
func (s *DataStore) LabelIDsByName(ctx context.Context, labels []string) ([]uint, error) {
|
|
s.LabelIDsByNameFuncInvoked = true
|
|
return s.LabelIDsByNameFunc(ctx, labels)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchInsertLabelMembership(ctx context.Context, batch [][2]uint) error {
|
|
s.AsyncBatchInsertLabelMembershipFuncInvoked = true
|
|
return s.AsyncBatchInsertLabelMembershipFunc(ctx, batch)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchDeleteLabelMembership(ctx context.Context, batch [][2]uint) error {
|
|
s.AsyncBatchDeleteLabelMembershipFuncInvoked = true
|
|
return s.AsyncBatchDeleteLabelMembershipFunc(ctx, batch)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchUpdateLabelTimestamp(ctx context.Context, ids []uint, ts time.Time) error {
|
|
s.AsyncBatchUpdateLabelTimestampFuncInvoked = true
|
|
return s.AsyncBatchUpdateLabelTimestampFunc(ctx, ids, ts)
|
|
}
|
|
|
|
func (s *DataStore) NewHost(ctx context.Context, host *fleet.Host) (*fleet.Host, error) {
|
|
s.NewHostFuncInvoked = true
|
|
return s.NewHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) DeleteHost(ctx context.Context, hid uint) error {
|
|
s.DeleteHostFuncInvoked = true
|
|
return s.DeleteHostFunc(ctx, hid)
|
|
}
|
|
|
|
func (s *DataStore) Host(ctx context.Context, id uint) (*fleet.Host, error) {
|
|
s.HostFuncInvoked = true
|
|
return s.HostFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) ListHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error) {
|
|
s.ListHostsFuncInvoked = true
|
|
return s.ListHostsFunc(ctx, filter, opt)
|
|
}
|
|
|
|
func (s *DataStore) MarkHostsSeen(ctx context.Context, hostIDs []uint, t time.Time) error {
|
|
s.MarkHostsSeenFuncInvoked = true
|
|
return s.MarkHostsSeenFunc(ctx, hostIDs, t)
|
|
}
|
|
|
|
func (s *DataStore) SearchHosts(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Host, error) {
|
|
s.SearchHostsFuncInvoked = true
|
|
return s.SearchHostsFunc(ctx, filter, query, omit...)
|
|
}
|
|
|
|
func (s *DataStore) EnrolledHostIDs(ctx context.Context) ([]uint, error) {
|
|
s.EnrolledHostIDsFuncInvoked = true
|
|
return s.EnrolledHostIDsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) CountEnrolledHosts(ctx context.Context) (int, error) {
|
|
s.CountEnrolledHostsFuncInvoked = true
|
|
return s.CountEnrolledHostsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) CleanupIncomingHosts(ctx context.Context, now time.Time) ([]uint, error) {
|
|
s.CleanupIncomingHostsFuncInvoked = true
|
|
return s.CleanupIncomingHostsFunc(ctx, now)
|
|
}
|
|
|
|
func (s *DataStore) GenerateHostStatusStatistics(ctx context.Context, filter fleet.TeamFilter, now time.Time, platform *string, lowDiskSpace *int) (*fleet.HostSummary, error) {
|
|
s.GenerateHostStatusStatisticsFuncInvoked = true
|
|
return s.GenerateHostStatusStatisticsFunc(ctx, filter, now, platform, lowDiskSpace)
|
|
}
|
|
|
|
func (s *DataStore) HostIDsByName(ctx context.Context, filter fleet.TeamFilter, hostnames []string) ([]uint, error) {
|
|
s.HostIDsByNameFuncInvoked = true
|
|
return s.HostIDsByNameFunc(ctx, filter, hostnames)
|
|
}
|
|
|
|
func (s *DataStore) HostIDsByOSVersion(ctx context.Context, osVersion fleet.OSVersion, offset int, limit int) ([]uint, error) {
|
|
s.HostIDsByOSVersionFuncInvoked = true
|
|
return s.HostIDsByOSVersionFunc(ctx, osVersion, offset, limit)
|
|
}
|
|
|
|
func (s *DataStore) HostByIdentifier(ctx context.Context, identifier string) (*fleet.Host, error) {
|
|
s.HostByIdentifierFuncInvoked = true
|
|
return s.HostByIdentifierFunc(ctx, identifier)
|
|
}
|
|
|
|
func (s *DataStore) AddHostsToTeam(ctx context.Context, teamID *uint, hostIDs []uint) error {
|
|
s.AddHostsToTeamFuncInvoked = true
|
|
return s.AddHostsToTeamFunc(ctx, teamID, hostIDs)
|
|
}
|
|
|
|
func (s *DataStore) TotalAndUnseenHostsSince(ctx context.Context, daysCount int) (total int, unseen int, err error) {
|
|
s.TotalAndUnseenHostsSinceFuncInvoked = true
|
|
return s.TotalAndUnseenHostsSinceFunc(ctx, daysCount)
|
|
}
|
|
|
|
func (s *DataStore) DeleteHosts(ctx context.Context, ids []uint) error {
|
|
s.DeleteHostsFuncInvoked = true
|
|
return s.DeleteHostsFunc(ctx, ids)
|
|
}
|
|
|
|
func (s *DataStore) CountHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) (int, error) {
|
|
s.CountHostsFuncInvoked = true
|
|
return s.CountHostsFunc(ctx, filter, opt)
|
|
}
|
|
|
|
func (s *DataStore) CountHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) (int, error) {
|
|
s.CountHostsInLabelFuncInvoked = true
|
|
return s.CountHostsInLabelFunc(ctx, filter, lid, opt)
|
|
}
|
|
|
|
func (s *DataStore) ListHostDeviceMapping(ctx context.Context, id uint) ([]*fleet.HostDeviceMapping, error) {
|
|
s.ListHostDeviceMappingFuncInvoked = true
|
|
return s.ListHostDeviceMappingFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) ListHostBatteries(ctx context.Context, id uint) ([]*fleet.HostBattery, error) {
|
|
s.ListHostBatteriesFuncInvoked = true
|
|
return s.ListHostBatteriesFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) LoadHostByDeviceAuthToken(ctx context.Context, authToken string, tokenTTL time.Duration) (*fleet.Host, error) {
|
|
s.LoadHostByDeviceAuthTokenFuncInvoked = true
|
|
return s.LoadHostByDeviceAuthTokenFunc(ctx, authToken, tokenTTL)
|
|
}
|
|
|
|
func (s *DataStore) SetOrUpdateDeviceAuthToken(ctx context.Context, hostID uint, authToken string) error {
|
|
s.SetOrUpdateDeviceAuthTokenFuncInvoked = true
|
|
return s.SetOrUpdateDeviceAuthTokenFunc(ctx, hostID, authToken)
|
|
}
|
|
|
|
func (s *DataStore) FailingPoliciesCount(ctx context.Context, host *fleet.Host) (uint, error) {
|
|
s.FailingPoliciesCountFuncInvoked = true
|
|
return s.FailingPoliciesCountFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) ListPoliciesForHost(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error) {
|
|
s.ListPoliciesForHostFuncInvoked = true
|
|
return s.ListPoliciesForHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) GetHostMunkiVersion(ctx context.Context, hostID uint) (string, error) {
|
|
s.GetHostMunkiVersionFuncInvoked = true
|
|
return s.GetHostMunkiVersionFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) GetHostMunkiIssues(ctx context.Context, hostID uint) ([]*fleet.HostMunkiIssue, error) {
|
|
s.GetHostMunkiIssuesFuncInvoked = true
|
|
return s.GetHostMunkiIssuesFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) GetHostMDM(ctx context.Context, hostID uint) (*fleet.HostMDM, error) {
|
|
s.GetHostMDMFuncInvoked = true
|
|
return s.GetHostMDMFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) AggregatedMunkiVersion(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiVersion, time.Time, error) {
|
|
s.AggregatedMunkiVersionFuncInvoked = true
|
|
return s.AggregatedMunkiVersionFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) AggregatedMunkiIssues(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiIssue, time.Time, error) {
|
|
s.AggregatedMunkiIssuesFuncInvoked = true
|
|
return s.AggregatedMunkiIssuesFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) AggregatedMDMStatus(ctx context.Context, teamID *uint) (fleet.AggregatedMDMStatus, time.Time, error) {
|
|
s.AggregatedMDMStatusFuncInvoked = true
|
|
return s.AggregatedMDMStatusFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) AggregatedMDMSolutions(ctx context.Context, teamID *uint) ([]fleet.AggregatedMDMSolutions, time.Time, error) {
|
|
s.AggregatedMDMSolutionsFuncInvoked = true
|
|
return s.AggregatedMDMSolutionsFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) GenerateAggregatedMunkiAndMDM(ctx context.Context) error {
|
|
s.GenerateAggregatedMunkiAndMDMFuncInvoked = true
|
|
return s.GenerateAggregatedMunkiAndMDMFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) GetMunkiIssue(ctx context.Context, munkiIssueID uint) (*fleet.MunkiIssue, error) {
|
|
s.GetMunkiIssueFuncInvoked = true
|
|
return s.GetMunkiIssueFunc(ctx, munkiIssueID)
|
|
}
|
|
|
|
func (s *DataStore) GetMDMSolution(ctx context.Context, mdmID uint) (*fleet.MDMSolution, error) {
|
|
s.GetMDMSolutionFuncInvoked = true
|
|
return s.GetMDMSolutionFunc(ctx, mdmID)
|
|
}
|
|
|
|
func (s *DataStore) OSVersions(ctx context.Context, teamID *uint, platform *string, name *string, version *string) (*fleet.OSVersions, error) {
|
|
s.OSVersionsFuncInvoked = true
|
|
return s.OSVersionsFunc(ctx, teamID, platform, name, version)
|
|
}
|
|
|
|
func (s *DataStore) UpdateOSVersions(ctx context.Context) error {
|
|
s.UpdateOSVersionsFuncInvoked = true
|
|
return s.UpdateOSVersionsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) CountHostsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets, now time.Time) (fleet.TargetMetrics, error) {
|
|
s.CountHostsInTargetsFuncInvoked = true
|
|
return s.CountHostsInTargetsFunc(ctx, filter, targets, now)
|
|
}
|
|
|
|
func (s *DataStore) HostIDsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets) ([]uint, error) {
|
|
s.HostIDsInTargetsFuncInvoked = true
|
|
return s.HostIDsInTargetsFunc(ctx, filter, targets)
|
|
}
|
|
|
|
func (s *DataStore) NewPasswordResetRequest(ctx context.Context, req *fleet.PasswordResetRequest) (*fleet.PasswordResetRequest, error) {
|
|
s.NewPasswordResetRequestFuncInvoked = true
|
|
return s.NewPasswordResetRequestFunc(ctx, req)
|
|
}
|
|
|
|
func (s *DataStore) DeletePasswordResetRequestsForUser(ctx context.Context, userID uint) error {
|
|
s.DeletePasswordResetRequestsForUserFuncInvoked = true
|
|
return s.DeletePasswordResetRequestsForUserFunc(ctx, userID)
|
|
}
|
|
|
|
func (s *DataStore) FindPasswordResetByToken(ctx context.Context, token string) (*fleet.PasswordResetRequest, error) {
|
|
s.FindPasswordResetByTokenFuncInvoked = true
|
|
return s.FindPasswordResetByTokenFunc(ctx, token)
|
|
}
|
|
|
|
func (s *DataStore) SessionByKey(ctx context.Context, key string) (*fleet.Session, error) {
|
|
s.SessionByKeyFuncInvoked = true
|
|
return s.SessionByKeyFunc(ctx, key)
|
|
}
|
|
|
|
func (s *DataStore) SessionByID(ctx context.Context, id uint) (*fleet.Session, error) {
|
|
s.SessionByIDFuncInvoked = true
|
|
return s.SessionByIDFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) ListSessionsForUser(ctx context.Context, id uint) ([]*fleet.Session, error) {
|
|
s.ListSessionsForUserFuncInvoked = true
|
|
return s.ListSessionsForUserFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) NewSession(ctx context.Context, userID uint, sessionKey string) (*fleet.Session, error) {
|
|
s.NewSessionFuncInvoked = true
|
|
return s.NewSessionFunc(ctx, userID, sessionKey)
|
|
}
|
|
|
|
func (s *DataStore) DestroySession(ctx context.Context, session *fleet.Session) error {
|
|
s.DestroySessionFuncInvoked = true
|
|
return s.DestroySessionFunc(ctx, session)
|
|
}
|
|
|
|
func (s *DataStore) DestroyAllSessionsForUser(ctx context.Context, id uint) error {
|
|
s.DestroyAllSessionsForUserFuncInvoked = true
|
|
return s.DestroyAllSessionsForUserFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) MarkSessionAccessed(ctx context.Context, session *fleet.Session) error {
|
|
s.MarkSessionAccessedFuncInvoked = true
|
|
return s.MarkSessionAccessedFunc(ctx, session)
|
|
}
|
|
|
|
func (s *DataStore) NewAppConfig(ctx context.Context, info *fleet.AppConfig) (*fleet.AppConfig, error) {
|
|
s.NewAppConfigFuncInvoked = true
|
|
return s.NewAppConfigFunc(ctx, info)
|
|
}
|
|
|
|
func (s *DataStore) AppConfig(ctx context.Context) (*fleet.AppConfig, error) {
|
|
s.AppConfigFuncInvoked = true
|
|
return s.AppConfigFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) SaveAppConfig(ctx context.Context, info *fleet.AppConfig) error {
|
|
s.SaveAppConfigFuncInvoked = true
|
|
return s.SaveAppConfigFunc(ctx, info)
|
|
}
|
|
|
|
func (s *DataStore) GetEnrollSecrets(ctx context.Context, teamID *uint) ([]*fleet.EnrollSecret, error) {
|
|
s.GetEnrollSecretsFuncInvoked = true
|
|
return s.GetEnrollSecretsFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) ApplyEnrollSecrets(ctx context.Context, teamID *uint, secrets []*fleet.EnrollSecret) error {
|
|
s.ApplyEnrollSecretsFuncInvoked = true
|
|
return s.ApplyEnrollSecretsFunc(ctx, teamID, secrets)
|
|
}
|
|
|
|
func (s *DataStore) NewInvite(ctx context.Context, i *fleet.Invite) (*fleet.Invite, error) {
|
|
s.NewInviteFuncInvoked = true
|
|
return s.NewInviteFunc(ctx, i)
|
|
}
|
|
|
|
func (s *DataStore) ListInvites(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Invite, error) {
|
|
s.ListInvitesFuncInvoked = true
|
|
return s.ListInvitesFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) Invite(ctx context.Context, id uint) (*fleet.Invite, error) {
|
|
s.InviteFuncInvoked = true
|
|
return s.InviteFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) InviteByEmail(ctx context.Context, email string) (*fleet.Invite, error) {
|
|
s.InviteByEmailFuncInvoked = true
|
|
return s.InviteByEmailFunc(ctx, email)
|
|
}
|
|
|
|
func (s *DataStore) InviteByToken(ctx context.Context, token string) (*fleet.Invite, error) {
|
|
s.InviteByTokenFuncInvoked = true
|
|
return s.InviteByTokenFunc(ctx, token)
|
|
}
|
|
|
|
func (s *DataStore) DeleteInvite(ctx context.Context, id uint) error {
|
|
s.DeleteInviteFuncInvoked = true
|
|
return s.DeleteInviteFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) UpdateInvite(ctx context.Context, id uint, i *fleet.Invite) (*fleet.Invite, error) {
|
|
s.UpdateInviteFuncInvoked = true
|
|
return s.UpdateInviteFunc(ctx, id, i)
|
|
}
|
|
|
|
func (s *DataStore) ListScheduledQueriesInPackWithStats(ctx context.Context, id uint, opts fleet.ListOptions) ([]*fleet.ScheduledQuery, error) {
|
|
s.ListScheduledQueriesInPackWithStatsFuncInvoked = true
|
|
return s.ListScheduledQueriesInPackWithStatsFunc(ctx, id, opts)
|
|
}
|
|
|
|
func (s *DataStore) NewScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery, opts ...fleet.OptionalArg) (*fleet.ScheduledQuery, error) {
|
|
s.NewScheduledQueryFuncInvoked = true
|
|
return s.NewScheduledQueryFunc(ctx, sq, opts...)
|
|
}
|
|
|
|
func (s *DataStore) SaveScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery) (*fleet.ScheduledQuery, error) {
|
|
s.SaveScheduledQueryFuncInvoked = true
|
|
return s.SaveScheduledQueryFunc(ctx, sq)
|
|
}
|
|
|
|
func (s *DataStore) DeleteScheduledQuery(ctx context.Context, id uint) error {
|
|
s.DeleteScheduledQueryFuncInvoked = true
|
|
return s.DeleteScheduledQueryFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) ScheduledQuery(ctx context.Context, id uint) (*fleet.ScheduledQuery, error) {
|
|
s.ScheduledQueryFuncInvoked = true
|
|
return s.ScheduledQueryFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) CleanupExpiredHosts(ctx context.Context) ([]uint, error) {
|
|
s.CleanupExpiredHostsFuncInvoked = true
|
|
return s.CleanupExpiredHostsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) ScheduledQueryIDsByName(ctx context.Context, batchSize int, packAndSchedQueryNames ...[2]string) ([]uint, error) {
|
|
s.ScheduledQueryIDsByNameFuncInvoked = true
|
|
return s.ScheduledQueryIDsByNameFunc(ctx, batchSize, packAndSchedQueryNames...)
|
|
}
|
|
|
|
func (s *DataStore) NewTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
|
|
s.NewTeamFuncInvoked = true
|
|
return s.NewTeamFunc(ctx, team)
|
|
}
|
|
|
|
func (s *DataStore) SaveTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
|
|
s.SaveTeamFuncInvoked = true
|
|
return s.SaveTeamFunc(ctx, team)
|
|
}
|
|
|
|
func (s *DataStore) Team(ctx context.Context, tid uint) (*fleet.Team, error) {
|
|
s.TeamFuncInvoked = true
|
|
return s.TeamFunc(ctx, tid)
|
|
}
|
|
|
|
func (s *DataStore) DeleteTeam(ctx context.Context, tid uint) error {
|
|
s.DeleteTeamFuncInvoked = true
|
|
return s.DeleteTeamFunc(ctx, tid)
|
|
}
|
|
|
|
func (s *DataStore) TeamByName(ctx context.Context, name string) (*fleet.Team, error) {
|
|
s.TeamByNameFuncInvoked = true
|
|
return s.TeamByNameFunc(ctx, name)
|
|
}
|
|
|
|
func (s *DataStore) ListTeams(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Team, error) {
|
|
s.ListTeamsFuncInvoked = true
|
|
return s.ListTeamsFunc(ctx, filter, opt)
|
|
}
|
|
|
|
func (s *DataStore) TeamsSummary(ctx context.Context) ([]*fleet.TeamSummary, error) {
|
|
s.TeamsSummaryFuncInvoked = true
|
|
return s.TeamsSummaryFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) SearchTeams(ctx context.Context, filter fleet.TeamFilter, matchQuery string, omit ...uint) ([]*fleet.Team, error) {
|
|
s.SearchTeamsFuncInvoked = true
|
|
return s.SearchTeamsFunc(ctx, filter, matchQuery, omit...)
|
|
}
|
|
|
|
func (s *DataStore) TeamEnrollSecrets(ctx context.Context, teamID uint) ([]*fleet.EnrollSecret, error) {
|
|
s.TeamEnrollSecretsFuncInvoked = true
|
|
return s.TeamEnrollSecretsFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) DeleteIntegrationsFromTeams(ctx context.Context, deletedIntgs fleet.Integrations) error {
|
|
s.DeleteIntegrationsFromTeamsFuncInvoked = true
|
|
return s.DeleteIntegrationsFromTeamsFunc(ctx, deletedIntgs)
|
|
}
|
|
|
|
func (s *DataStore) ListSoftwareForVulnDetection(ctx context.Context, hostID uint) ([]fleet.Software, error) {
|
|
s.ListSoftwareForVulnDetectionFuncInvoked = true
|
|
return s.ListSoftwareForVulnDetectionFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) ListSoftwareVulnerabilities(ctx context.Context, hostIDs []uint) (map[uint][]fleet.SoftwareVulnerability, error) {
|
|
s.ListSoftwareVulnerabilitiesFuncInvoked = true
|
|
return s.ListSoftwareVulnerabilitiesFunc(ctx, hostIDs)
|
|
}
|
|
|
|
func (s *DataStore) LoadHostSoftware(ctx context.Context, host *fleet.Host, includeCVEScores bool) error {
|
|
s.LoadHostSoftwareFuncInvoked = true
|
|
return s.LoadHostSoftwareFunc(ctx, host, includeCVEScores)
|
|
}
|
|
|
|
func (s *DataStore) AllSoftwareWithoutCPEIterator(ctx context.Context, excludedPlatforms []string) (fleet.SoftwareIterator, error) {
|
|
s.AllSoftwareWithoutCPEIteratorFuncInvoked = true
|
|
return s.AllSoftwareWithoutCPEIteratorFunc(ctx, excludedPlatforms)
|
|
}
|
|
|
|
func (s *DataStore) AddCPEForSoftware(ctx context.Context, software fleet.Software, cpe string) error {
|
|
s.AddCPEForSoftwareFuncInvoked = true
|
|
return s.AddCPEForSoftwareFunc(ctx, software, cpe)
|
|
}
|
|
|
|
func (s *DataStore) ListSoftwareCPEs(ctx context.Context) ([]fleet.SoftwareCPE, error) {
|
|
s.ListSoftwareCPEsFuncInvoked = true
|
|
return s.ListSoftwareCPEsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) InsertVulnerabilities(ctx context.Context, vulns []fleet.SoftwareVulnerability, source fleet.VulnerabilitySource) (int64, error) {
|
|
s.InsertVulnerabilitiesFuncInvoked = true
|
|
return s.InsertVulnerabilitiesFunc(ctx, vulns, source)
|
|
}
|
|
|
|
func (s *DataStore) SoftwareByID(ctx context.Context, id uint, includeCVEScores bool) (*fleet.Software, error) {
|
|
s.SoftwareByIDFuncInvoked = true
|
|
return s.SoftwareByIDFunc(ctx, id, includeCVEScores)
|
|
}
|
|
|
|
func (s *DataStore) ListSoftwareByHostIDShort(ctx context.Context, hostID uint) ([]fleet.Software, error) {
|
|
s.ListSoftwareByHostIDShortFuncInvoked = true
|
|
return s.ListSoftwareByHostIDShortFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) SyncHostsSoftware(ctx context.Context, updatedAt time.Time) error {
|
|
s.SyncHostsSoftwareFuncInvoked = true
|
|
return s.SyncHostsSoftwareFunc(ctx, updatedAt)
|
|
}
|
|
|
|
func (s *DataStore) HostsBySoftwareIDs(ctx context.Context, softwareIDs []uint) ([]*fleet.HostShort, error) {
|
|
s.HostsBySoftwareIDsFuncInvoked = true
|
|
return s.HostsBySoftwareIDsFunc(ctx, softwareIDs)
|
|
}
|
|
|
|
func (s *DataStore) HostsByCVE(ctx context.Context, cve string) ([]*fleet.HostShort, error) {
|
|
s.HostsByCVEFuncInvoked = true
|
|
return s.HostsByCVEFunc(ctx, cve)
|
|
}
|
|
|
|
func (s *DataStore) InsertCVEMeta(ctx context.Context, cveMeta []fleet.CVEMeta) error {
|
|
s.InsertCVEMetaFuncInvoked = true
|
|
return s.InsertCVEMetaFunc(ctx, cveMeta)
|
|
}
|
|
|
|
func (s *DataStore) ListCVEs(ctx context.Context, maxAge time.Duration) ([]fleet.CVEMeta, error) {
|
|
s.ListCVEsFuncInvoked = true
|
|
return s.ListCVEsFunc(ctx, maxAge)
|
|
}
|
|
|
|
func (s *DataStore) ListOperatingSystems(ctx context.Context) ([]fleet.OperatingSystem, error) {
|
|
s.ListOperatingSystemsFuncInvoked = true
|
|
return s.ListOperatingSystemsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) UpdateHostOperatingSystem(ctx context.Context, hostID uint, hostOS fleet.OperatingSystem) error {
|
|
s.UpdateHostOperatingSystemFuncInvoked = true
|
|
return s.UpdateHostOperatingSystemFunc(ctx, hostID, hostOS)
|
|
}
|
|
|
|
func (s *DataStore) CleanupHostOperatingSystems(ctx context.Context) error {
|
|
s.CleanupHostOperatingSystemsFuncInvoked = true
|
|
return s.CleanupHostOperatingSystemsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) NewActivity(ctx context.Context, user *fleet.User, activityType string, details *map[string]interface{}) error {
|
|
s.NewActivityFuncInvoked = true
|
|
return s.NewActivityFunc(ctx, user, activityType, details)
|
|
}
|
|
|
|
func (s *DataStore) ListActivities(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Activity, error) {
|
|
s.ListActivitiesFuncInvoked = true
|
|
return s.ListActivitiesFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) ShouldSendStatistics(ctx context.Context, frequency time.Duration, config config.FleetConfig, license *fleet.LicenseInfo) (fleet.StatisticsPayload, bool, error) {
|
|
s.ShouldSendStatisticsFuncInvoked = true
|
|
return s.ShouldSendStatisticsFunc(ctx, frequency, config, license)
|
|
}
|
|
|
|
func (s *DataStore) RecordStatisticsSent(ctx context.Context) error {
|
|
s.RecordStatisticsSentFuncInvoked = true
|
|
return s.RecordStatisticsSentFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) ApplyPolicySpecs(ctx context.Context, authorID uint, specs []*fleet.PolicySpec) error {
|
|
s.ApplyPolicySpecsFuncInvoked = true
|
|
return s.ApplyPolicySpecsFunc(ctx, authorID, specs)
|
|
}
|
|
|
|
func (s *DataStore) NewGlobalPolicy(ctx context.Context, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
|
|
s.NewGlobalPolicyFuncInvoked = true
|
|
return s.NewGlobalPolicyFunc(ctx, authorID, args)
|
|
}
|
|
|
|
func (s *DataStore) Policy(ctx context.Context, id uint) (*fleet.Policy, error) {
|
|
s.PolicyFuncInvoked = true
|
|
return s.PolicyFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) SavePolicy(ctx context.Context, p *fleet.Policy) error {
|
|
s.SavePolicyFuncInvoked = true
|
|
return s.SavePolicyFunc(ctx, p)
|
|
}
|
|
|
|
func (s *DataStore) ListGlobalPolicies(ctx context.Context) ([]*fleet.Policy, error) {
|
|
s.ListGlobalPoliciesFuncInvoked = true
|
|
return s.ListGlobalPoliciesFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) PoliciesByID(ctx context.Context, ids []uint) (map[uint]*fleet.Policy, error) {
|
|
s.PoliciesByIDFuncInvoked = true
|
|
return s.PoliciesByIDFunc(ctx, ids)
|
|
}
|
|
|
|
func (s *DataStore) DeleteGlobalPolicies(ctx context.Context, ids []uint) ([]uint, error) {
|
|
s.DeleteGlobalPoliciesFuncInvoked = true
|
|
return s.DeleteGlobalPoliciesFunc(ctx, ids)
|
|
}
|
|
|
|
func (s *DataStore) PolicyQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
|
|
s.PolicyQueriesForHostFuncInvoked = true
|
|
return s.PolicyQueriesForHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchInsertPolicyMembership(ctx context.Context, batch []fleet.PolicyMembershipResult) error {
|
|
s.AsyncBatchInsertPolicyMembershipFuncInvoked = true
|
|
return s.AsyncBatchInsertPolicyMembershipFunc(ctx, batch)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchUpdatePolicyTimestamp(ctx context.Context, ids []uint, ts time.Time) error {
|
|
s.AsyncBatchUpdatePolicyTimestampFuncInvoked = true
|
|
return s.AsyncBatchUpdatePolicyTimestampFunc(ctx, ids, ts)
|
|
}
|
|
|
|
func (s *DataStore) MigrateTables(ctx context.Context) error {
|
|
s.MigrateTablesFuncInvoked = true
|
|
return s.MigrateTablesFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) MigrateData(ctx context.Context) error {
|
|
s.MigrateDataFuncInvoked = true
|
|
return s.MigrateDataFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) MigrationStatus(ctx context.Context) (*fleet.MigrationStatus, error) {
|
|
s.MigrationStatusFuncInvoked = true
|
|
return s.MigrationStatusFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) ListSoftware(ctx context.Context, opt fleet.SoftwareListOptions) ([]fleet.Software, error) {
|
|
s.ListSoftwareFuncInvoked = true
|
|
return s.ListSoftwareFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) CountSoftware(ctx context.Context, opt fleet.SoftwareListOptions) (int, error) {
|
|
s.CountSoftwareFuncInvoked = true
|
|
return s.CountSoftwareFunc(ctx, opt)
|
|
}
|
|
|
|
func (s *DataStore) DeleteSoftwareVulnerabilities(ctx context.Context, vulnerabilities []fleet.SoftwareVulnerability) error {
|
|
s.DeleteSoftwareVulnerabilitiesFuncInvoked = true
|
|
return s.DeleteSoftwareVulnerabilitiesFunc(ctx, vulnerabilities)
|
|
}
|
|
|
|
func (s *DataStore) NewTeamPolicy(ctx context.Context, teamID uint, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
|
|
s.NewTeamPolicyFuncInvoked = true
|
|
return s.NewTeamPolicyFunc(ctx, teamID, authorID, args)
|
|
}
|
|
|
|
func (s *DataStore) ListTeamPolicies(ctx context.Context, teamID uint) ([]*fleet.Policy, error) {
|
|
s.ListTeamPoliciesFuncInvoked = true
|
|
return s.ListTeamPoliciesFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) DeleteTeamPolicies(ctx context.Context, teamID uint, ids []uint) ([]uint, error) {
|
|
s.DeleteTeamPoliciesFuncInvoked = true
|
|
return s.DeleteTeamPoliciesFunc(ctx, teamID, ids)
|
|
}
|
|
|
|
func (s *DataStore) TeamPolicy(ctx context.Context, teamID uint, policyID uint) (*fleet.Policy, error) {
|
|
s.TeamPolicyFuncInvoked = true
|
|
return s.TeamPolicyFunc(ctx, teamID, policyID)
|
|
}
|
|
|
|
func (s *DataStore) CleanupPolicyMembership(ctx context.Context, now time.Time) error {
|
|
s.CleanupPolicyMembershipFuncInvoked = true
|
|
return s.CleanupPolicyMembershipFunc(ctx, now)
|
|
}
|
|
|
|
func (s *DataStore) Lock(ctx context.Context, name string, owner string, expiration time.Duration) (bool, error) {
|
|
s.LockFuncInvoked = true
|
|
return s.LockFunc(ctx, name, owner, expiration)
|
|
}
|
|
|
|
func (s *DataStore) Unlock(ctx context.Context, name string, owner string) error {
|
|
s.UnlockFuncInvoked = true
|
|
return s.UnlockFunc(ctx, name, owner)
|
|
}
|
|
|
|
func (s *DataStore) DBLocks(ctx context.Context) ([]*fleet.DBLock, error) {
|
|
s.DBLocksFuncInvoked = true
|
|
return s.DBLocksFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) UpdateScheduledQueryAggregatedStats(ctx context.Context) error {
|
|
s.UpdateScheduledQueryAggregatedStatsFuncInvoked = true
|
|
return s.UpdateScheduledQueryAggregatedStatsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) UpdateQueryAggregatedStats(ctx context.Context) error {
|
|
s.UpdateQueryAggregatedStatsFuncInvoked = true
|
|
return s.UpdateQueryAggregatedStatsFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) LoadHostByNodeKey(ctx context.Context, nodeKey string) (*fleet.Host, error) {
|
|
s.LoadHostByNodeKeyFuncInvoked = true
|
|
return s.LoadHostByNodeKeyFunc(ctx, nodeKey)
|
|
}
|
|
|
|
func (s *DataStore) LoadHostByOrbitNodeKey(ctx context.Context, nodeKey string) (*fleet.Host, error) {
|
|
s.LoadHostByOrbitNodeKeyFuncInvoked = true
|
|
return s.LoadHostByOrbitNodeKeyFunc(ctx, nodeKey)
|
|
}
|
|
|
|
func (s *DataStore) HostLite(ctx context.Context, hostID uint) (*fleet.Host, error) {
|
|
s.HostLiteFuncInvoked = true
|
|
return s.HostLiteFunc(ctx, hostID)
|
|
}
|
|
|
|
func (s *DataStore) UpdateHostOsqueryIntervals(ctx context.Context, hostID uint, intervals fleet.HostOsqueryIntervals) error {
|
|
s.UpdateHostOsqueryIntervalsFuncInvoked = true
|
|
return s.UpdateHostOsqueryIntervalsFunc(ctx, hostID, intervals)
|
|
}
|
|
|
|
func (s *DataStore) TeamAgentOptions(ctx context.Context, teamID uint) (*json.RawMessage, error) {
|
|
s.TeamAgentOptionsFuncInvoked = true
|
|
return s.TeamAgentOptionsFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) TeamFeatures(ctx context.Context, teamID uint) (*fleet.Features, error) {
|
|
s.TeamFeaturesFuncInvoked = true
|
|
return s.TeamFeaturesFunc(ctx, teamID)
|
|
}
|
|
|
|
func (s *DataStore) SaveHostPackStats(ctx context.Context, hostID uint, stats []fleet.PackStats) error {
|
|
s.SaveHostPackStatsFuncInvoked = true
|
|
return s.SaveHostPackStatsFunc(ctx, hostID, stats)
|
|
}
|
|
|
|
func (s *DataStore) AsyncBatchSaveHostsScheduledQueryStats(ctx context.Context, stats map[uint][]fleet.ScheduledQueryStats, batchSize int) (int, error) {
|
|
s.AsyncBatchSaveHostsScheduledQueryStatsFuncInvoked = true
|
|
return s.AsyncBatchSaveHostsScheduledQueryStatsFunc(ctx, stats, batchSize)
|
|
}
|
|
|
|
func (s *DataStore) UpdateHostSoftware(ctx context.Context, hostID uint, software []fleet.Software) error {
|
|
s.UpdateHostSoftwareFuncInvoked = true
|
|
return s.UpdateHostSoftwareFunc(ctx, hostID, software)
|
|
}
|
|
|
|
func (s *DataStore) UpdateHost(ctx context.Context, host *fleet.Host) error {
|
|
s.UpdateHostFuncInvoked = true
|
|
return s.UpdateHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) ListScheduledQueriesInPack(ctx context.Context, packID uint) ([]*fleet.ScheduledQuery, error) {
|
|
s.ListScheduledQueriesInPackFuncInvoked = true
|
|
return s.ListScheduledQueriesInPackFunc(ctx, packID)
|
|
}
|
|
|
|
func (s *DataStore) UpdateHostRefetchRequested(ctx context.Context, hostID uint, value bool) error {
|
|
s.UpdateHostRefetchRequestedFuncInvoked = true
|
|
return s.UpdateHostRefetchRequestedFunc(ctx, hostID, value)
|
|
}
|
|
|
|
func (s *DataStore) FlippingPoliciesForHost(ctx context.Context, hostID uint, incomingResults map[uint]*bool) (newFailing []uint, newPassing []uint, err error) {
|
|
s.FlippingPoliciesForHostFuncInvoked = true
|
|
return s.FlippingPoliciesForHostFunc(ctx, hostID, incomingResults)
|
|
}
|
|
|
|
func (s *DataStore) RecordPolicyQueryExecutions(ctx context.Context, host *fleet.Host, results map[uint]*bool, updated time.Time, deferredSaveHost bool) error {
|
|
s.RecordPolicyQueryExecutionsFuncInvoked = true
|
|
return s.RecordPolicyQueryExecutionsFunc(ctx, host, results, updated, deferredSaveHost)
|
|
}
|
|
|
|
func (s *DataStore) RecordLabelQueryExecutions(ctx context.Context, host *fleet.Host, results map[uint]*bool, t time.Time, deferredSaveHost bool) error {
|
|
s.RecordLabelQueryExecutionsFuncInvoked = true
|
|
return s.RecordLabelQueryExecutionsFunc(ctx, host, results, t, deferredSaveHost)
|
|
}
|
|
|
|
func (s *DataStore) SaveHostUsers(ctx context.Context, hostID uint, users []fleet.HostUser) error {
|
|
s.SaveHostUsersFuncInvoked = true
|
|
return s.SaveHostUsersFunc(ctx, hostID, users)
|
|
}
|
|
|
|
func (s *DataStore) SaveHostAdditional(ctx context.Context, hostID uint, additional *json.RawMessage) error {
|
|
s.SaveHostAdditionalFuncInvoked = true
|
|
return s.SaveHostAdditionalFunc(ctx, hostID, additional)
|
|
}
|
|
|
|
func (s *DataStore) SetOrUpdateMunkiInfo(ctx context.Context, hostID uint, version string, errors []string, warnings []string) error {
|
|
s.SetOrUpdateMunkiInfoFuncInvoked = true
|
|
return s.SetOrUpdateMunkiInfoFunc(ctx, hostID, version, errors, warnings)
|
|
}
|
|
|
|
func (s *DataStore) SetOrUpdateMDMData(ctx context.Context, hostID uint, enrolled bool, serverURL string, installedFromDep bool) error {
|
|
s.SetOrUpdateMDMDataFuncInvoked = true
|
|
return s.SetOrUpdateMDMDataFunc(ctx, hostID, enrolled, serverURL, installedFromDep)
|
|
}
|
|
|
|
func (s *DataStore) SetOrUpdateHostDisksSpace(ctx context.Context, hostID uint, gigsAvailable float64, percentAvailable float64) error {
|
|
s.SetOrUpdateHostDisksSpaceFuncInvoked = true
|
|
return s.SetOrUpdateHostDisksSpaceFunc(ctx, hostID, gigsAvailable, percentAvailable)
|
|
}
|
|
|
|
func (s *DataStore) ReplaceHostDeviceMapping(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping) error {
|
|
s.ReplaceHostDeviceMappingFuncInvoked = true
|
|
return s.ReplaceHostDeviceMappingFunc(ctx, id, mappings)
|
|
}
|
|
|
|
func (s *DataStore) ReplaceHostBatteries(ctx context.Context, id uint, mappings []*fleet.HostBattery) error {
|
|
s.ReplaceHostBatteriesFuncInvoked = true
|
|
return s.ReplaceHostBatteriesFunc(ctx, id, mappings)
|
|
}
|
|
|
|
func (s *DataStore) VerifyEnrollSecret(ctx context.Context, secret string) (*fleet.EnrollSecret, error) {
|
|
s.VerifyEnrollSecretFuncInvoked = true
|
|
return s.VerifyEnrollSecretFunc(ctx, secret)
|
|
}
|
|
|
|
func (s *DataStore) EnrollHost(ctx context.Context, osqueryHostId string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error) {
|
|
s.EnrollHostFuncInvoked = true
|
|
return s.EnrollHostFunc(ctx, osqueryHostId, nodeKey, teamID, cooldown)
|
|
}
|
|
|
|
func (s *DataStore) EnrollOrbit(ctx context.Context, hardwareUUID string, orbitNodeKey string, teamID *uint) (*fleet.Host, error) {
|
|
s.EnrollOrbitFuncInvoked = true
|
|
return s.EnrollOrbitFunc(ctx, hardwareUUID, orbitNodeKey, teamID)
|
|
}
|
|
|
|
func (s *DataStore) SerialUpdateHost(ctx context.Context, host *fleet.Host) error {
|
|
s.SerialUpdateHostFuncInvoked = true
|
|
return s.SerialUpdateHostFunc(ctx, host)
|
|
}
|
|
|
|
func (s *DataStore) NewJob(ctx context.Context, job *fleet.Job) (*fleet.Job, error) {
|
|
s.NewJobFuncInvoked = true
|
|
return s.NewJobFunc(ctx, job)
|
|
}
|
|
|
|
func (s *DataStore) GetQueuedJobs(ctx context.Context, maxNumJobs int) ([]*fleet.Job, error) {
|
|
s.GetQueuedJobsFuncInvoked = true
|
|
return s.GetQueuedJobsFunc(ctx, maxNumJobs)
|
|
}
|
|
|
|
func (s *DataStore) UpdateJob(ctx context.Context, id uint, job *fleet.Job) (*fleet.Job, error) {
|
|
s.UpdateJobFuncInvoked = true
|
|
return s.UpdateJobFunc(ctx, id, job)
|
|
}
|
|
|
|
func (s *DataStore) InnoDBStatus(ctx context.Context) (string, error) {
|
|
s.InnoDBStatusFuncInvoked = true
|
|
return s.InnoDBStatusFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) ProcessList(ctx context.Context) ([]fleet.MySQLProcess, error) {
|
|
s.ProcessListFuncInvoked = true
|
|
return s.ProcessListFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) InsertWindowsUpdates(ctx context.Context, hostID uint, updates []fleet.WindowsUpdate) error {
|
|
s.InsertWindowsUpdatesFuncInvoked = true
|
|
return s.InsertWindowsUpdatesFunc(ctx, hostID, updates)
|
|
}
|
|
|
|
func (s *DataStore) NewMDMAppleEnrollmentProfile(ctx context.Context, enrollmentPayload fleet.MDMAppleEnrollmentProfilePayload) (*fleet.MDMAppleEnrollmentProfile, error) {
|
|
s.NewMDMAppleEnrollmentProfileFuncInvoked = true
|
|
return s.NewMDMAppleEnrollmentProfileFunc(ctx, enrollmentPayload)
|
|
}
|
|
|
|
func (s *DataStore) GetMDMAppleEnrollmentProfileByToken(ctx context.Context, token string) (*fleet.MDMAppleEnrollmentProfile, error) {
|
|
s.GetMDMAppleEnrollmentProfileByTokenFuncInvoked = true
|
|
return s.GetMDMAppleEnrollmentProfileByTokenFunc(ctx, token)
|
|
}
|
|
|
|
func (s *DataStore) ListMDMAppleEnrollmentProfiles(ctx context.Context) ([]*fleet.MDMAppleEnrollmentProfile, error) {
|
|
s.ListMDMAppleEnrollmentProfilesFuncInvoked = true
|
|
return s.ListMDMAppleEnrollmentProfilesFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) GetMDMAppleCommandResults(ctx context.Context, commandUUID string) (map[string]*fleet.MDMAppleCommandResult, error) {
|
|
s.GetMDMAppleCommandResultsFuncInvoked = true
|
|
return s.GetMDMAppleCommandResultsFunc(ctx, commandUUID)
|
|
}
|
|
|
|
func (s *DataStore) NewMDMAppleInstaller(ctx context.Context, name string, size int64, manifest string, installer []byte, urlToken string) (*fleet.MDMAppleInstaller, error) {
|
|
s.NewMDMAppleInstallerFuncInvoked = true
|
|
return s.NewMDMAppleInstallerFunc(ctx, name, size, manifest, installer, urlToken)
|
|
}
|
|
|
|
func (s *DataStore) MDMAppleInstaller(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error) {
|
|
s.MDMAppleInstallerFuncInvoked = true
|
|
return s.MDMAppleInstallerFunc(ctx, token)
|
|
}
|
|
|
|
func (s *DataStore) MDMAppleInstallerDetailsByID(ctx context.Context, id uint) (*fleet.MDMAppleInstaller, error) {
|
|
s.MDMAppleInstallerDetailsByIDFuncInvoked = true
|
|
return s.MDMAppleInstallerDetailsByIDFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) DeleteMDMAppleInstaller(ctx context.Context, id uint) error {
|
|
s.DeleteMDMAppleInstallerFuncInvoked = true
|
|
return s.DeleteMDMAppleInstallerFunc(ctx, id)
|
|
}
|
|
|
|
func (s *DataStore) MDMAppleInstallerDetailsByToken(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error) {
|
|
s.MDMAppleInstallerDetailsByTokenFuncInvoked = true
|
|
return s.MDMAppleInstallerDetailsByTokenFunc(ctx, token)
|
|
}
|
|
|
|
func (s *DataStore) ListMDMAppleInstallers(ctx context.Context) ([]fleet.MDMAppleInstaller, error) {
|
|
s.ListMDMAppleInstallersFuncInvoked = true
|
|
return s.ListMDMAppleInstallersFunc(ctx)
|
|
}
|
|
|
|
func (s *DataStore) MDMAppleListDevices(ctx context.Context) ([]fleet.MDMAppleDevice, error) {
|
|
s.MDMAppleListDevicesFuncInvoked = true
|
|
return s.MDMAppleListDevicesFunc(ctx)
|
|
}
|