fleet/server/mock/datastore_mock.go
2024-03-28 15:44:14 -03:00

5304 lines
193 KiB
Go

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import (
"context"
"crypto/x509"
"encoding/json"
"math/big"
"sync"
"time"
"github.com/fleetdm/fleet/v4/server/config"
"github.com/fleetdm/fleet/v4/server/fleet"
"github.com/fleetdm/fleet/v4/server/mdm/apple/mobileconfig"
"github.com/fleetdm/fleet/v4/server/mdm/nanodep/godep"
)
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, queriesToDiscardResults map[uint]struct{}) 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, shouldDiscardResults bool, shouldDeleteStats bool) error
type DeleteQueryFunc func(ctx context.Context, teamID *uint, 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 ListScheduledQueriesForAgentsFunc func(ctx context.Context, teamID *uint, queryReportsDisabled bool) ([]*fleet.Query, error)
type QueryByNameFunc func(ctx context.Context, teamID *uint, name string) (*fleet.Query, error)
type ObserverCanRunQueryFunc func(ctx context.Context, queryID uint) (bool, error)
type CleanupGlobalDiscardQueryResultsFunc func(ctx context.Context) error
type IsSavedQueryFunc func(ctx context.Context, queryID uint) (bool, error)
type GetLiveQueryStatsFunc func(ctx context.Context, queryID uint, hostIDs []uint) ([]*fleet.LiveQueryStats, error)
type UpdateLiveQueryStatsFunc func(ctx context.Context, queryID uint, stats []*fleet.LiveQueryStats) error
type CalculateAggregatedPerfStatsPercentilesFunc func(ctx context.Context, aggregate fleet.AggregatedStatsType, queryID uint) 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 GetCompletedCampaignsFunc func(ctx context.Context, filter []uint) ([]uint, 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 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) (map[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 GetHostHealthFunc func(ctx context.Context, id uint) (*fleet.HostHealth, error)
type ListHostsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error)
type ListHostsLiteByUUIDsFunc func(ctx context.Context, filter fleet.TeamFilter, uuids []string) ([]*fleet.Host, error)
type ListHostsLiteByIDsFunc func(ctx context.Context, ids []uint) ([]*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 HostIDsByOSIDFunc func(ctx context.Context, osID uint, offset int, limit int) ([]uint, error)
type HostMemberOfAllLabelsFunc func(ctx context.Context, hostID uint, labelNames []string) (bool, 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 HostLiteByIdentifierFunc func(ctx context.Context, identifier string) (*fleet.HostLite, error)
type HostLiteByIDFunc func(ctx context.Context, id uint) (*fleet.HostLite, error)
type AddHostsToTeamFunc func(ctx context.Context, teamID *uint, hostIDs []uint) error
type TotalAndUnseenHostsSinceFunc func(ctx context.Context, teamID *uint, daysCount int) (total int, unseen []uint, 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 SetOrUpdateCustomHostDeviceMappingFunc func(ctx context.Context, hostID uint, email string, source string) ([]*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 GetHostMDMCheckinInfoFunc func(ctx context.Context, hostUUID string) (*fleet.HostMDMCheckinInfo, 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, platform string) (fleet.AggregatedMDMStatus, time.Time, error)
type AggregatedMDMSolutionsFunc func(ctx context.Context, teamID *uint, platform string) ([]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, teamFilter *fleet.TeamFilter, platform *string, name *string, version *string) (*fleet.OSVersions, error)
type OSVersionsByCVEFunc func(ctx context.Context, cve string, teamID *uint) ([]*fleet.VulnerableOS, time.Time, error)
type SoftwareByCVEFunc func(ctx context.Context, cve string, teamID *uint) ([]*fleet.VulnerableSoftware, time.Time, error)
type OSVersionFunc func(ctx context.Context, osVersionID uint, teamFilter *fleet.TeamFilter) (*fleet.OSVersion, *time.Time, 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 CleanupExpiredPasswordResetRequestsFunc func(ctx context.Context) 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 AggregateEnrollSecretPerTeamFunc func(ctx context.Context) ([]*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 QueryResultRowsFunc func(ctx context.Context, queryID uint, filter fleet.TeamFilter) ([]*fleet.ScheduledQueryResultRow, error)
type QueryResultRowsForHostFunc func(ctx context.Context, queryID uint, hostID uint) ([]*fleet.ScheduledQueryResultRow, error)
type ResultCountForQueryFunc func(ctx context.Context, queryID uint) (int, error)
type ResultCountForQueryAndHostFunc func(ctx context.Context, queryID uint, hostID uint) (int, error)
type OverwriteQueryResultRowsFunc func(ctx context.Context, rows []*fleet.ScheduledQueryResultRow) error
type CleanupDiscardedQueryResultsFunc func(ctx context.Context) 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 TeamExistsFunc func(ctx context.Context, teamID uint) (bool, error)
type ListSoftwareTitlesFunc func(ctx context.Context, opt fleet.SoftwareTitleListOptions, tmFilter fleet.TeamFilter) ([]fleet.SoftwareTitle, int, *fleet.PaginationMetadata, error)
type SoftwareTitleByIDFunc func(ctx context.Context, id uint, teamID *uint, tmFilter fleet.TeamFilter) (*fleet.SoftwareTitle, error)
type ListSoftwareForVulnDetectionFunc func(ctx context.Context, hostID uint) ([]fleet.Software, error)
type ListSoftwareVulnerabilitiesByHostIDsSourceFunc func(ctx context.Context, hostIDs []uint, source fleet.VulnerabilitySource) (map[uint][]fleet.SoftwareVulnerability, error)
type LoadHostSoftwareFunc func(ctx context.Context, host *fleet.Host, includeCVEScores bool) error
type AllSoftwareIteratorFunc func(ctx context.Context, query fleet.SoftwareIterQueryOptions) (fleet.SoftwareIterator, error)
type UpsertSoftwareCPEsFunc func(ctx context.Context, cpes []fleet.SoftwareCPE) (int64, error)
type DeleteSoftwareCPEsFunc func(ctx context.Context, cpes []fleet.SoftwareCPE) (int64, error)
type ListSoftwareCPEsFunc func(ctx context.Context) ([]fleet.SoftwareCPE, error)
type InsertSoftwareVulnerabilityFunc func(ctx context.Context, vuln fleet.SoftwareVulnerability, source fleet.VulnerabilitySource) (bool, error)
type SoftwareByIDFunc func(ctx context.Context, id uint, teamID *uint, includeCVEScores bool, tmFilter *fleet.TeamFilter) (*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 ReconcileSoftwareTitlesFunc func(ctx context.Context) error
type SyncHostsSoftwareTitlesFunc func(ctx context.Context, updatedAt time.Time) error
type HostVulnSummariesBySoftwareIDsFunc func(ctx context.Context, softwareIDs []uint) ([]fleet.HostVulnerabilitySummary, error)
type HostsByCVEFunc func(ctx context.Context, cve string) ([]fleet.HostVulnerabilitySummary, 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 ListOperatingSystemsForPlatformFunc func(ctx context.Context, platform string) ([]fleet.OperatingSystem, error)
type UpdateHostOperatingSystemFunc func(ctx context.Context, hostID uint, hostOS fleet.OperatingSystem) error
type CleanupHostOperatingSystemsFunc func(ctx context.Context) error
type UpdateHostTablesOnMDMUnenrollFunc func(ctx context.Context, uuid string) error
type NewActivityFunc func(ctx context.Context, user *fleet.User, activity fleet.ActivityDetails) error
type ListActivitiesFunc func(ctx context.Context, opt fleet.ListActivitiesOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error)
type MarkActivitiesAsStreamedFunc func(ctx context.Context, activityIDs []uint) error
type ListHostUpcomingActivitiesFunc func(ctx context.Context, hostID uint, opt fleet.ListOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error)
type ListHostPastActivitiesFunc func(ctx context.Context, hostID uint, opt fleet.ListOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error)
type IsExecutionPendingForHostFunc func(ctx context.Context, hostID uint, scriptID uint) ([]*uint, error)
type ShouldSendStatisticsFunc func(ctx context.Context, frequency time.Duration, config config.FleetConfig) (fleet.StatisticsPayload, bool, error)
type RecordStatisticsSentFunc func(ctx context.Context) error
type CleanupStatisticsFunc 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, shouldRemoveAllPolicyMemberships bool) error
type ListGlobalPoliciesFunc func(ctx context.Context, opts fleet.ListOptions) ([]*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 CountPoliciesFunc func(ctx context.Context, teamID *uint, matchQuery string) (int, error)
type UpdateHostPolicyCountsFunc func(ctx context.Context) error
type PolicyQueriesForHostFunc func(ctx context.Context, host *fleet.Host) (map[string]string, error)
type GetTeamHostsPolicyMembershipsFunc func(ctx context.Context, domain string, teamID uint, policyIDs []uint) ([]fleet.HostPolicyMembershipData, error)
type GetCalendarPoliciesFunc func(ctx context.Context, teamID uint) ([]fleet.PolicyCalendarData, 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, *fleet.PaginationMetadata, error)
type CountSoftwareFunc func(ctx context.Context, opt fleet.SoftwareListOptions) (int, error)
type DeleteSoftwareVulnerabilitiesFunc func(ctx context.Context, vulnerabilities []fleet.SoftwareVulnerability) error
type DeleteOutOfDateVulnerabilitiesFunc func(ctx context.Context, source fleet.VulnerabilitySource, duration time.Duration) error
type CreateOrUpdateCalendarEventFunc func(ctx context.Context, email string, startTime time.Time, endTime time.Time, data []byte, hostID uint, webhookStatus fleet.CalendarWebhookStatus) (*fleet.CalendarEvent, error)
type GetCalendarEventFunc func(ctx context.Context, email string) (*fleet.CalendarEvent, error)
type DeleteCalendarEventFunc func(ctx context.Context, calendarEventID uint) error
type UpdateCalendarEventFunc func(ctx context.Context, calendarEventID uint, startTime time.Time, endTime time.Time, data []byte) error
type GetHostCalendarEventFunc func(ctx context.Context, hostID uint) (*fleet.HostCalendarEvent, *fleet.CalendarEvent, error)
type GetHostCalendarEventByEmailFunc func(ctx context.Context, email string) (*fleet.HostCalendarEvent, *fleet.CalendarEvent, error)
type UpdateHostCalendarWebhookStatusFunc func(ctx context.Context, hostID uint, status fleet.CalendarWebhookStatus) error
type ListCalendarEventsFunc func(ctx context.Context, teamID *uint) ([]*fleet.CalendarEvent, error)
type ListOutOfDateCalendarEventsFunc func(ctx context.Context, t time.Time) ([]*fleet.CalendarEvent, 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, opts fleet.ListOptions, iopts fleet.ListOptions) (teamPolicies []*fleet.Policy, inheritedPolicies []*fleet.Policy, err 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 IncrementPolicyViolationDaysFunc func(ctx context.Context) error
type InitializePolicyViolationDaysFunc func(ctx context.Context) 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 GetLatestCronStatsFunc func(ctx context.Context, name string) ([]fleet.CronStats, error)
type InsertCronStatsFunc func(ctx context.Context, statsType fleet.CronStatsType, name string, instance string, status fleet.CronStatsStatus) (int, error)
type UpdateCronStatsFunc func(ctx context.Context, id int, status fleet.CronStatsStatus) error
type UpdateAllCronStatsForInstanceFunc func(ctx context.Context, instance string, fromStatus fleet.CronStatsStatus, toStatus fleet.CronStatsStatus) error
type CleanupCronStatsFunc 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 TeamMDMConfigFunc func(ctx context.Context, teamID uint) (*fleet.TeamMDM, error)
type SaveHostPackStatsFunc func(ctx context.Context, teamID *uint, 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) (*fleet.UpdateHostSoftwareDBResult, error)
type UpdateHostSoftwareInstalledPathsFunc func(ctx context.Context, hostID uint, reported map[string]struct{}, mutationResults *fleet.UpdateHostSoftwareDBResult) error
type UpdateHostFunc func(ctx context.Context, host *fleet.Host) error
type ListScheduledQueriesInPackFunc func(ctx context.Context, packID uint) (fleet.ScheduledQueryList, error)
type UpdateHostRefetchRequestedFunc func(ctx context.Context, hostID uint, value bool) error
type UpdateHostRefetchCriticalQueriesUntilFunc func(ctx context.Context, hostID uint, until *time.Time) 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, isServer bool, enrolled bool, serverURL string, installedFromDep bool, name string, fleetEnrollRef string) error
type SetOrUpdateHostEmailsFromMdmIdpAccountsFunc func(ctx context.Context, hostID uint, fleetEnrollmentRef string) error
type SetOrUpdateHostDisksSpaceFunc func(ctx context.Context, hostID uint, gigsAvailable float64, percentAvailable float64, gigsTotal float64) error
type SetOrUpdateHostDisksEncryptionFunc func(ctx context.Context, hostID uint, encrypted bool) error
type SetOrUpdateHostDiskEncryptionKeyFunc func(ctx context.Context, hostID uint, encryptedBase64Key string, clientError string, decryptable *bool) error
type GetUnverifiedDiskEncryptionKeysFunc func(ctx context.Context) ([]fleet.HostDiskEncryptionKey, error)
type SetHostsDiskEncryptionKeyStatusFunc func(ctx context.Context, hostIDs []uint, encryptable bool, threshold time.Time) error
type GetHostDiskEncryptionKeyFunc func(ctx context.Context, hostID uint) (*fleet.HostDiskEncryptionKey, error)
type SetDiskEncryptionResetStatusFunc func(ctx context.Context, hostID uint, status bool) error
type GetHostCertAssociationsToExpireFunc func(ctx context.Context, expiryDays int, limit int) ([]fleet.SCEPIdentityAssociation, error)
type SetCommandForPendingSCEPRenewalFunc func(ctx context.Context, assocs []fleet.SCEPIdentityAssociation, cmdUUID string) error
type CleanSCEPRenewRefsFunc func(ctx context.Context, hostUUID string) error
type UpdateHostMDMProfilesVerificationFunc func(ctx context.Context, host *fleet.Host, toVerify []string, toFail []string, toRetry []string) error
type GetHostMDMProfilesExpectedForVerificationFunc func(ctx context.Context, host *fleet.Host) (map[string]*fleet.ExpectedMDMProfile, error)
type GetHostMDMProfilesRetryCountsFunc func(ctx context.Context, host *fleet.Host) ([]fleet.HostMDMProfileRetryCount, error)
type GetHostMDMProfileRetryCountByCommandUUIDFunc func(ctx context.Context, host *fleet.Host, cmdUUID string) (fleet.HostMDMProfileRetryCount, error)
type SetOrUpdateHostOrbitInfoFunc func(ctx context.Context, hostID uint, version string) error
type ReplaceHostDeviceMappingFunc func(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping, source string) 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, isMDMEnabled bool, osqueryHostId string, hardwareUUID string, hardwareSerial string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error)
type EnrollOrbitFunc func(ctx context.Context, isMDMEnabled bool, hostInfo fleet.OrbitHostInfo, 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, now time.Time) ([]*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 ListWindowsUpdatesByHostIDFunc func(ctx context.Context, hostID uint) ([]fleet.WindowsUpdate, error)
type InsertWindowsUpdatesFunc func(ctx context.Context, hostID uint, updates []fleet.WindowsUpdate) error
type ListOSVulnerabilitiesByOSFunc func(ctx context.Context, osID uint) ([]fleet.OSVulnerability, error)
type ListVulnsByOsNameAndVersionFunc func(ctx context.Context, name string, version string, includeCVSS bool) (fleet.Vulnerabilities, error)
type InsertOSVulnerabilitiesFunc func(ctx context.Context, vulnerabilities []fleet.OSVulnerability, source fleet.VulnerabilitySource) (int64, error)
type DeleteOSVulnerabilitiesFunc func(ctx context.Context, vulnerabilities []fleet.OSVulnerability) error
type InsertOSVulnerabilityFunc func(ctx context.Context, vuln fleet.OSVulnerability, source fleet.VulnerabilitySource) (bool, error)
type DeleteOutOfDateOSVulnerabilitiesFunc func(ctx context.Context, source fleet.VulnerabilitySource, duration time.Duration) error
type ListVulnerabilitiesFunc func(ctx context.Context, opt fleet.VulnListOptions) ([]fleet.VulnerabilityWithMetadata, *fleet.PaginationMetadata, error)
type VulnerabilityFunc func(ctx context.Context, cve string, teamID *uint, includeCVEScores bool) (*fleet.VulnerabilityWithMetadata, error)
type CountVulnerabilitiesFunc func(ctx context.Context, opt fleet.VulnListOptions) (uint, error)
type UpdateVulnerabilityHostCountsFunc func(ctx context.Context) error
type NewMDMAppleConfigProfileFunc func(ctx context.Context, p fleet.MDMAppleConfigProfile) (*fleet.MDMAppleConfigProfile, error)
type BulkUpsertMDMAppleConfigProfilesFunc func(ctx context.Context, payload []*fleet.MDMAppleConfigProfile) error
type GetMDMAppleConfigProfileByDeprecatedIDFunc func(ctx context.Context, profileID uint) (*fleet.MDMAppleConfigProfile, error)
type GetMDMAppleConfigProfileFunc func(ctx context.Context, profileUUID string) (*fleet.MDMAppleConfigProfile, error)
type GetMDMAppleDeclarationFunc func(ctx context.Context, declUUID string) (*fleet.MDMAppleDeclaration, error)
type ListMDMAppleConfigProfilesFunc func(ctx context.Context, teamID *uint) ([]*fleet.MDMAppleConfigProfile, error)
type DeleteMDMAppleConfigProfileByDeprecatedIDFunc func(ctx context.Context, profileID uint) error
type DeleteMDMAppleConfigProfileFunc func(ctx context.Context, profileUUID string) error
type BulkDeleteMDMAppleHostsConfigProfilesFunc func(ctx context.Context, payload []*fleet.MDMAppleProfilePayload) error
type DeleteMDMAppleConfigProfileByTeamAndIdentifierFunc func(ctx context.Context, teamID *uint, profileIdentifier string) error
type GetHostMDMAppleProfilesFunc func(ctx context.Context, hostUUID string) ([]fleet.HostMDMAppleProfile, error)
type CleanupDiskEncryptionKeysOnTeamChangeFunc func(ctx context.Context, hostIDs []uint, newTeamID *uint) 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 GetMDMAppleEnrollmentProfileByTypeFunc func(ctx context.Context, typ fleet.MDMAppleEnrollmentType) (*fleet.MDMAppleEnrollmentProfile, error)
type ListMDMAppleEnrollmentProfilesFunc func(ctx context.Context) ([]*fleet.MDMAppleEnrollmentProfile, error)
type GetMDMAppleCommandResultsFunc func(ctx context.Context, commandUUID string) ([]*fleet.MDMCommandResult, error)
type ListMDMAppleCommandsFunc func(ctx context.Context, tmFilter fleet.TeamFilter, listOpts *fleet.MDMCommandListOptions) ([]*fleet.MDMAppleCommand, 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 BatchSetMDMAppleProfilesFunc func(ctx context.Context, tmID *uint, profiles []*fleet.MDMAppleConfigProfile) error
type MDMAppleListDevicesFunc func(ctx context.Context) ([]fleet.MDMAppleDevice, error)
type UpsertMDMAppleHostDEPAssignmentsFunc func(ctx context.Context, hosts []fleet.Host) error
type IngestMDMAppleDevicesFromDEPSyncFunc func(ctx context.Context, devices []godep.Device) (int64, *uint, error)
type IngestMDMAppleDeviceFromCheckinFunc func(ctx context.Context, mdmHost fleet.MDMAppleHostDetails) error
type RestoreMDMApplePendingDEPHostFunc func(ctx context.Context, host *fleet.Host) error
type ResetMDMAppleEnrollmentFunc func(ctx context.Context, hostUUID string) error
type ListMDMAppleDEPSerialsInTeamFunc func(ctx context.Context, teamID *uint) ([]string, error)
type ListMDMAppleDEPSerialsInHostIDsFunc func(ctx context.Context, hostIDs []uint) ([]string, error)
type GetHostDEPAssignmentFunc func(ctx context.Context, hostID uint) (*fleet.HostDEPAssignment, error)
type GetNanoMDMEnrollmentFunc func(ctx context.Context, id string) (*fleet.NanoEnrollment, error)
type IncreasePolicyAutomationIterationFunc func(ctx context.Context, policyID uint) error
type OutdatedAutomationBatchFunc func(ctx context.Context) ([]fleet.PolicyFailure, error)
type ListMDMAppleProfilesToInstallFunc func(ctx context.Context) ([]*fleet.MDMAppleProfilePayload, error)
type ListMDMAppleProfilesToRemoveFunc func(ctx context.Context) ([]*fleet.MDMAppleProfilePayload, error)
type BulkUpsertMDMAppleHostProfilesFunc func(ctx context.Context, payload []*fleet.MDMAppleBulkUpsertHostProfilePayload) error
type BulkSetPendingMDMHostProfilesFunc func(ctx context.Context, hostIDs []uint, teamIDs []uint, profileUUIDs []string, hostUUIDs []string) error
type GetMDMAppleProfilesContentsFunc func(ctx context.Context, profileUUIDs []string) (map[string]mobileconfig.Mobileconfig, error)
type UpdateOrDeleteHostMDMAppleProfileFunc func(ctx context.Context, profile *fleet.HostMDMAppleProfile) error
type GetMDMAppleCommandRequestTypeFunc func(ctx context.Context, commandUUID string) (string, error)
type GetMDMAppleProfilesSummaryFunc func(ctx context.Context, teamID *uint) (*fleet.MDMProfilesSummary, error)
type InsertMDMIdPAccountFunc func(ctx context.Context, account *fleet.MDMIdPAccount) error
type GetMDMIdPAccountByUUIDFunc func(ctx context.Context, uuid string) (*fleet.MDMIdPAccount, error)
type GetMDMIdPAccountByEmailFunc func(ctx context.Context, email string) (*fleet.MDMIdPAccount, error)
type GetMDMAppleFileVaultSummaryFunc func(ctx context.Context, teamID *uint) (*fleet.MDMAppleFileVaultSummary, error)
type InsertMDMAppleBootstrapPackageFunc func(ctx context.Context, bp *fleet.MDMAppleBootstrapPackage) error
type CopyDefaultMDMAppleBootstrapPackageFunc func(ctx context.Context, ac *fleet.AppConfig, toTeamID uint) error
type DeleteMDMAppleBootstrapPackageFunc func(ctx context.Context, teamID uint) error
type GetMDMAppleBootstrapPackageMetaFunc func(ctx context.Context, teamID uint) (*fleet.MDMAppleBootstrapPackage, error)
type GetMDMAppleBootstrapPackageBytesFunc func(ctx context.Context, token string) (*fleet.MDMAppleBootstrapPackage, error)
type GetMDMAppleBootstrapPackageSummaryFunc func(ctx context.Context, teamID uint) (*fleet.MDMAppleBootstrapPackageSummary, error)
type RecordHostBootstrapPackageFunc func(ctx context.Context, commandUUID string, hostUUID string) error
type GetHostMDMMacOSSetupFunc func(ctx context.Context, hostID uint) (*fleet.HostMDMMacOSSetup, error)
type MDMGetEULAMetadataFunc func(ctx context.Context) (*fleet.MDMEULA, error)
type MDMGetEULABytesFunc func(ctx context.Context, token string) (*fleet.MDMEULA, error)
type MDMInsertEULAFunc func(ctx context.Context, eula *fleet.MDMEULA) error
type MDMDeleteEULAFunc func(ctx context.Context, token string) error
type SetOrUpdateMDMAppleSetupAssistantFunc func(ctx context.Context, asst *fleet.MDMAppleSetupAssistant) (*fleet.MDMAppleSetupAssistant, error)
type GetMDMAppleSetupAssistantFunc func(ctx context.Context, teamID *uint) (*fleet.MDMAppleSetupAssistant, error)
type DeleteMDMAppleSetupAssistantFunc func(ctx context.Context, teamID *uint) error
type SetMDMAppleSetupAssistantProfileUUIDFunc func(ctx context.Context, teamID *uint, profileUUID string) error
type SetMDMAppleDefaultSetupAssistantProfileUUIDFunc func(ctx context.Context, teamID *uint, profileUUID string) error
type GetMDMAppleDefaultSetupAssistantFunc func(ctx context.Context, teamID *uint) (profileUUID string, updatedAt time.Time, err error)
type GetMatchingHostSerialsFunc func(ctx context.Context, serials []string) (map[string]*fleet.Host, error)
type DeleteHostDEPAssignmentsFunc func(ctx context.Context, serials []string) error
type UpdateHostDEPAssignProfileResponsesFunc func(ctx context.Context, resp *godep.ProfileResponse) error
type ScreenDEPAssignProfileSerialsForCooldownFunc func(ctx context.Context, serials []string) (skipSerials []string, assignSerials []string, err error)
type GetDEPAssignProfileExpiredCooldownsFunc func(ctx context.Context) (map[uint][]string, error)
type UpdateDEPAssignProfileRetryPendingFunc func(ctx context.Context, jobID uint, serials []string) error
type InsertMDMAppleDDMRequestFunc func(ctx context.Context, hostUUID string, messageType string, rawJSON string) error
type MDMAppleDDMDeclarationsTokenFunc func(ctx context.Context, hostUUID string) (*fleet.MDMAppleDDMDeclarationsToken, error)
type MDMAppleDDMDeclarationItemsFunc func(ctx context.Context, hostUUID string) ([]fleet.MDMAppleDDMDeclarationItem, error)
type MDMAppleDDMDeclarationsResponseFunc func(ctx context.Context, identifier string, hostUUID string) (*fleet.MDMAppleDeclaration, error)
type MDMAppleBatchSetHostDeclarationStateFunc func(ctx context.Context) ([]string, error)
type MDMAppleStoreDDMStatusReportFunc func(ctx context.Context, hostUUID string, updates []*fleet.MDMAppleHostDeclaration) error
type MDMAppleSetPendingDeclarationsAsFunc func(ctx context.Context, hostUUID string, status *fleet.MDMDeliveryStatus, detail string) error
type WSTEPStoreCertificateFunc func(ctx context.Context, name string, crt *x509.Certificate) error
type WSTEPNewSerialFunc func(ctx context.Context) (*big.Int, error)
type WSTEPAssociateCertHashFunc func(ctx context.Context, deviceUUID string, hash string) error
type MDMWindowsInsertEnrolledDeviceFunc func(ctx context.Context, device *fleet.MDMWindowsEnrolledDevice) error
type MDMWindowsDeleteEnrolledDeviceFunc func(ctx context.Context, mdmDeviceHWID string) error
type MDMWindowsGetEnrolledDeviceWithDeviceIDFunc func(ctx context.Context, mdmDeviceID string) (*fleet.MDMWindowsEnrolledDevice, error)
type MDMWindowsDeleteEnrolledDeviceWithDeviceIDFunc func(ctx context.Context, mdmDeviceID string) error
type MDMWindowsInsertCommandForHostsFunc func(ctx context.Context, hostUUIDs []string, cmd *fleet.MDMWindowsCommand) error
type MDMWindowsGetPendingCommandsFunc func(ctx context.Context, deviceID string) ([]*fleet.MDMWindowsCommand, error)
type MDMWindowsSaveResponseFunc func(ctx context.Context, deviceID string, fullResponse *fleet.SyncML) error
type GetMDMWindowsCommandResultsFunc func(ctx context.Context, commandUUID string) ([]*fleet.MDMCommandResult, error)
type UpdateMDMWindowsEnrollmentsHostUUIDFunc func(ctx context.Context, hostUUID string, mdmDeviceID string) error
type GetMDMWindowsConfigProfileFunc func(ctx context.Context, profileUUID string) (*fleet.MDMWindowsConfigProfile, error)
type DeleteMDMWindowsConfigProfileFunc func(ctx context.Context, profileUUID string) error
type DeleteMDMWindowsConfigProfileByTeamAndNameFunc func(ctx context.Context, teamID *uint, profileName string) error
type GetHostMDMWindowsProfilesFunc func(ctx context.Context, hostUUID string) ([]fleet.HostMDMWindowsProfile, error)
type ListMDMConfigProfilesFunc func(ctx context.Context, teamID *uint, opt fleet.ListOptions) ([]*fleet.MDMConfigProfilePayload, *fleet.PaginationMetadata, error)
type GetMDMCommandPlatformFunc func(ctx context.Context, commandUUID string) (string, error)
type ListMDMCommandsFunc func(ctx context.Context, tmFilter fleet.TeamFilter, listOpts *fleet.MDMCommandListOptions) ([]*fleet.MDMCommand, error)
type GetMDMWindowsBitLockerSummaryFunc func(ctx context.Context, teamID *uint) (*fleet.MDMWindowsBitLockerSummary, error)
type GetMDMWindowsBitLockerStatusFunc func(ctx context.Context, host *fleet.Host) (*fleet.HostMDMDiskEncryption, error)
type GetMDMWindowsProfilesSummaryFunc func(ctx context.Context, teamID *uint) (*fleet.MDMProfilesSummary, error)
type ListMDMWindowsProfilesToInstallFunc func(ctx context.Context) ([]*fleet.MDMWindowsProfilePayload, error)
type ListMDMWindowsProfilesToRemoveFunc func(ctx context.Context) ([]*fleet.MDMWindowsProfilePayload, error)
type BulkUpsertMDMWindowsHostProfilesFunc func(ctx context.Context, payload []*fleet.MDMWindowsBulkUpsertHostProfilePayload) error
type GetMDMWindowsProfilesContentsFunc func(ctx context.Context, profileUUIDs []string) (map[string][]byte, error)
type BulkDeleteMDMWindowsHostsConfigProfilesFunc func(ctx context.Context, payload []*fleet.MDMWindowsProfilePayload) error
type NewMDMWindowsConfigProfileFunc func(ctx context.Context, cp fleet.MDMWindowsConfigProfile) (*fleet.MDMWindowsConfigProfile, error)
type SetOrUpdateMDMWindowsConfigProfileFunc func(ctx context.Context, cp fleet.MDMWindowsConfigProfile) error
type BatchSetMDMProfilesFunc func(ctx context.Context, tmID *uint, macProfiles []*fleet.MDMAppleConfigProfile, winProfiles []*fleet.MDMWindowsConfigProfile, macDeclarations []*fleet.MDMAppleDeclaration) error
type NewMDMAppleDeclarationFunc func(ctx context.Context, declaration *fleet.MDMAppleDeclaration) (*fleet.MDMAppleDeclaration, error)
type NewHostScriptExecutionRequestFunc func(ctx context.Context, request *fleet.HostScriptRequestPayload) (*fleet.HostScriptResult, error)
type SetHostScriptExecutionResultFunc func(ctx context.Context, result *fleet.HostScriptResultPayload) (*fleet.HostScriptResult, error)
type GetHostScriptExecutionResultFunc func(ctx context.Context, execID string) (*fleet.HostScriptResult, error)
type ListPendingHostScriptExecutionsFunc func(ctx context.Context, hostID uint) ([]*fleet.HostScriptResult, error)
type NewScriptFunc func(ctx context.Context, script *fleet.Script) (*fleet.Script, error)
type ScriptFunc func(ctx context.Context, id uint) (*fleet.Script, error)
type GetScriptContentsFunc func(ctx context.Context, id uint) ([]byte, error)
type DeleteScriptFunc func(ctx context.Context, id uint) error
type ListScriptsFunc func(ctx context.Context, teamID *uint, opt fleet.ListOptions) ([]*fleet.Script, *fleet.PaginationMetadata, error)
type GetScriptIDByNameFunc func(ctx context.Context, name string, teamID *uint) (uint, error)
type GetHostScriptDetailsFunc func(ctx context.Context, hostID uint, teamID *uint, opts fleet.ListOptions, hostPlatform string) ([]*fleet.HostScriptDetail, *fleet.PaginationMetadata, error)
type BatchSetScriptsFunc func(ctx context.Context, tmID *uint, scripts []*fleet.Script) error
type GetHostLockWipeStatusFunc func(ctx context.Context, host *fleet.Host) (*fleet.HostLockWipeStatus, error)
type LockHostViaScriptFunc func(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error
type UnlockHostViaScriptFunc func(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error
type UnlockHostManuallyFunc func(ctx context.Context, hostID uint, hostFleetPlatform string, ts time.Time) error
type CleanMacOSMDMLockFunc func(ctx context.Context, hostUUID string) error
type CleanupUnusedScriptContentsFunc func(ctx context.Context) error
type WipeHostViaScriptFunc func(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error
type WipeHostViaWindowsMDMFunc func(ctx context.Context, host *fleet.Host, cmd *fleet.MDMWindowsCommand) error
type UpdateHostLockWipeStatusFromAppleMDMResultFunc func(ctx context.Context, hostUUID string, cmdUUID string, requestType string, succeeded bool) 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
ListScheduledQueriesForAgentsFunc ListScheduledQueriesForAgentsFunc
ListScheduledQueriesForAgentsFuncInvoked bool
QueryByNameFunc QueryByNameFunc
QueryByNameFuncInvoked bool
ObserverCanRunQueryFunc ObserverCanRunQueryFunc
ObserverCanRunQueryFuncInvoked bool
CleanupGlobalDiscardQueryResultsFunc CleanupGlobalDiscardQueryResultsFunc
CleanupGlobalDiscardQueryResultsFuncInvoked bool
IsSavedQueryFunc IsSavedQueryFunc
IsSavedQueryFuncInvoked bool
GetLiveQueryStatsFunc GetLiveQueryStatsFunc
GetLiveQueryStatsFuncInvoked bool
UpdateLiveQueryStatsFunc UpdateLiveQueryStatsFunc
UpdateLiveQueryStatsFuncInvoked bool
CalculateAggregatedPerfStatsPercentilesFunc CalculateAggregatedPerfStatsPercentilesFunc
CalculateAggregatedPerfStatsPercentilesFuncInvoked 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
GetCompletedCampaignsFunc GetCompletedCampaignsFunc
GetCompletedCampaignsFuncInvoked 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
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
GetHostHealthFunc GetHostHealthFunc
GetHostHealthFuncInvoked bool
ListHostsFunc ListHostsFunc
ListHostsFuncInvoked bool
ListHostsLiteByUUIDsFunc ListHostsLiteByUUIDsFunc
ListHostsLiteByUUIDsFuncInvoked bool
ListHostsLiteByIDsFunc ListHostsLiteByIDsFunc
ListHostsLiteByIDsFuncInvoked 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
HostIDsByOSIDFunc HostIDsByOSIDFunc
HostIDsByOSIDFuncInvoked bool
HostMemberOfAllLabelsFunc HostMemberOfAllLabelsFunc
HostMemberOfAllLabelsFuncInvoked bool
HostIDsByOSVersionFunc HostIDsByOSVersionFunc
HostIDsByOSVersionFuncInvoked bool
HostByIdentifierFunc HostByIdentifierFunc
HostByIdentifierFuncInvoked bool
HostLiteByIdentifierFunc HostLiteByIdentifierFunc
HostLiteByIdentifierFuncInvoked bool
HostLiteByIDFunc HostLiteByIDFunc
HostLiteByIDFuncInvoked 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
SetOrUpdateCustomHostDeviceMappingFunc SetOrUpdateCustomHostDeviceMappingFunc
SetOrUpdateCustomHostDeviceMappingFuncInvoked 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
GetHostMDMCheckinInfoFunc GetHostMDMCheckinInfoFunc
GetHostMDMCheckinInfoFuncInvoked 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
OSVersionsByCVEFunc OSVersionsByCVEFunc
OSVersionsByCVEFuncInvoked bool
SoftwareByCVEFunc SoftwareByCVEFunc
SoftwareByCVEFuncInvoked bool
OSVersionFunc OSVersionFunc
OSVersionFuncInvoked 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
CleanupExpiredPasswordResetRequestsFunc CleanupExpiredPasswordResetRequestsFunc
CleanupExpiredPasswordResetRequestsFuncInvoked 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
AggregateEnrollSecretPerTeamFunc AggregateEnrollSecretPerTeamFunc
AggregateEnrollSecretPerTeamFuncInvoked 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
QueryResultRowsFunc QueryResultRowsFunc
QueryResultRowsFuncInvoked bool
QueryResultRowsForHostFunc QueryResultRowsForHostFunc
QueryResultRowsForHostFuncInvoked bool
ResultCountForQueryFunc ResultCountForQueryFunc
ResultCountForQueryFuncInvoked bool
ResultCountForQueryAndHostFunc ResultCountForQueryAndHostFunc
ResultCountForQueryAndHostFuncInvoked bool
OverwriteQueryResultRowsFunc OverwriteQueryResultRowsFunc
OverwriteQueryResultRowsFuncInvoked bool
CleanupDiscardedQueryResultsFunc CleanupDiscardedQueryResultsFunc
CleanupDiscardedQueryResultsFuncInvoked 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
TeamExistsFunc TeamExistsFunc
TeamExistsFuncInvoked bool
ListSoftwareTitlesFunc ListSoftwareTitlesFunc
ListSoftwareTitlesFuncInvoked bool
SoftwareTitleByIDFunc SoftwareTitleByIDFunc
SoftwareTitleByIDFuncInvoked bool
ListSoftwareForVulnDetectionFunc ListSoftwareForVulnDetectionFunc
ListSoftwareForVulnDetectionFuncInvoked bool
ListSoftwareVulnerabilitiesByHostIDsSourceFunc ListSoftwareVulnerabilitiesByHostIDsSourceFunc
ListSoftwareVulnerabilitiesByHostIDsSourceFuncInvoked bool
LoadHostSoftwareFunc LoadHostSoftwareFunc
LoadHostSoftwareFuncInvoked bool
AllSoftwareIteratorFunc AllSoftwareIteratorFunc
AllSoftwareIteratorFuncInvoked bool
UpsertSoftwareCPEsFunc UpsertSoftwareCPEsFunc
UpsertSoftwareCPEsFuncInvoked bool
DeleteSoftwareCPEsFunc DeleteSoftwareCPEsFunc
DeleteSoftwareCPEsFuncInvoked bool
ListSoftwareCPEsFunc ListSoftwareCPEsFunc
ListSoftwareCPEsFuncInvoked bool
InsertSoftwareVulnerabilityFunc InsertSoftwareVulnerabilityFunc
InsertSoftwareVulnerabilityFuncInvoked bool
SoftwareByIDFunc SoftwareByIDFunc
SoftwareByIDFuncInvoked bool
ListSoftwareByHostIDShortFunc ListSoftwareByHostIDShortFunc
ListSoftwareByHostIDShortFuncInvoked bool
SyncHostsSoftwareFunc SyncHostsSoftwareFunc
SyncHostsSoftwareFuncInvoked bool
ReconcileSoftwareTitlesFunc ReconcileSoftwareTitlesFunc
ReconcileSoftwareTitlesFuncInvoked bool
SyncHostsSoftwareTitlesFunc SyncHostsSoftwareTitlesFunc
SyncHostsSoftwareTitlesFuncInvoked bool
HostVulnSummariesBySoftwareIDsFunc HostVulnSummariesBySoftwareIDsFunc
HostVulnSummariesBySoftwareIDsFuncInvoked bool
HostsByCVEFunc HostsByCVEFunc
HostsByCVEFuncInvoked bool
InsertCVEMetaFunc InsertCVEMetaFunc
InsertCVEMetaFuncInvoked bool
ListCVEsFunc ListCVEsFunc
ListCVEsFuncInvoked bool
ListOperatingSystemsFunc ListOperatingSystemsFunc
ListOperatingSystemsFuncInvoked bool
ListOperatingSystemsForPlatformFunc ListOperatingSystemsForPlatformFunc
ListOperatingSystemsForPlatformFuncInvoked bool
UpdateHostOperatingSystemFunc UpdateHostOperatingSystemFunc
UpdateHostOperatingSystemFuncInvoked bool
CleanupHostOperatingSystemsFunc CleanupHostOperatingSystemsFunc
CleanupHostOperatingSystemsFuncInvoked bool
UpdateHostTablesOnMDMUnenrollFunc UpdateHostTablesOnMDMUnenrollFunc
UpdateHostTablesOnMDMUnenrollFuncInvoked bool
NewActivityFunc NewActivityFunc
NewActivityFuncInvoked bool
ListActivitiesFunc ListActivitiesFunc
ListActivitiesFuncInvoked bool
MarkActivitiesAsStreamedFunc MarkActivitiesAsStreamedFunc
MarkActivitiesAsStreamedFuncInvoked bool
ListHostUpcomingActivitiesFunc ListHostUpcomingActivitiesFunc
ListHostUpcomingActivitiesFuncInvoked bool
ListHostPastActivitiesFunc ListHostPastActivitiesFunc
ListHostPastActivitiesFuncInvoked bool
IsExecutionPendingForHostFunc IsExecutionPendingForHostFunc
IsExecutionPendingForHostFuncInvoked bool
ShouldSendStatisticsFunc ShouldSendStatisticsFunc
ShouldSendStatisticsFuncInvoked bool
RecordStatisticsSentFunc RecordStatisticsSentFunc
RecordStatisticsSentFuncInvoked bool
CleanupStatisticsFunc CleanupStatisticsFunc
CleanupStatisticsFuncInvoked 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
CountPoliciesFunc CountPoliciesFunc
CountPoliciesFuncInvoked bool
UpdateHostPolicyCountsFunc UpdateHostPolicyCountsFunc
UpdateHostPolicyCountsFuncInvoked bool
PolicyQueriesForHostFunc PolicyQueriesForHostFunc
PolicyQueriesForHostFuncInvoked bool
GetTeamHostsPolicyMembershipsFunc GetTeamHostsPolicyMembershipsFunc
GetTeamHostsPolicyMembershipsFuncInvoked bool
GetCalendarPoliciesFunc GetCalendarPoliciesFunc
GetCalendarPoliciesFuncInvoked 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
DeleteOutOfDateVulnerabilitiesFunc DeleteOutOfDateVulnerabilitiesFunc
DeleteOutOfDateVulnerabilitiesFuncInvoked bool
CreateOrUpdateCalendarEventFunc CreateOrUpdateCalendarEventFunc
CreateOrUpdateCalendarEventFuncInvoked bool
GetCalendarEventFunc GetCalendarEventFunc
GetCalendarEventFuncInvoked bool
DeleteCalendarEventFunc DeleteCalendarEventFunc
DeleteCalendarEventFuncInvoked bool
UpdateCalendarEventFunc UpdateCalendarEventFunc
UpdateCalendarEventFuncInvoked bool
GetHostCalendarEventFunc GetHostCalendarEventFunc
GetHostCalendarEventFuncInvoked bool
GetHostCalendarEventByEmailFunc GetHostCalendarEventByEmailFunc
GetHostCalendarEventByEmailFuncInvoked bool
UpdateHostCalendarWebhookStatusFunc UpdateHostCalendarWebhookStatusFunc
UpdateHostCalendarWebhookStatusFuncInvoked bool
ListCalendarEventsFunc ListCalendarEventsFunc
ListCalendarEventsFuncInvoked bool
ListOutOfDateCalendarEventsFunc ListOutOfDateCalendarEventsFunc
ListOutOfDateCalendarEventsFuncInvoked bool
NewTeamPolicyFunc NewTeamPolicyFunc
NewTeamPolicyFuncInvoked bool
ListTeamPoliciesFunc ListTeamPoliciesFunc
ListTeamPoliciesFuncInvoked bool
DeleteTeamPoliciesFunc DeleteTeamPoliciesFunc
DeleteTeamPoliciesFuncInvoked bool
TeamPolicyFunc TeamPolicyFunc
TeamPolicyFuncInvoked bool
CleanupPolicyMembershipFunc CleanupPolicyMembershipFunc
CleanupPolicyMembershipFuncInvoked bool
IncrementPolicyViolationDaysFunc IncrementPolicyViolationDaysFunc
IncrementPolicyViolationDaysFuncInvoked bool
InitializePolicyViolationDaysFunc InitializePolicyViolationDaysFunc
InitializePolicyViolationDaysFuncInvoked bool
LockFunc LockFunc
LockFuncInvoked bool
UnlockFunc UnlockFunc
UnlockFuncInvoked bool
DBLocksFunc DBLocksFunc
DBLocksFuncInvoked bool
GetLatestCronStatsFunc GetLatestCronStatsFunc
GetLatestCronStatsFuncInvoked bool
InsertCronStatsFunc InsertCronStatsFunc
InsertCronStatsFuncInvoked bool
UpdateCronStatsFunc UpdateCronStatsFunc
UpdateCronStatsFuncInvoked bool
UpdateAllCronStatsForInstanceFunc UpdateAllCronStatsForInstanceFunc
UpdateAllCronStatsForInstanceFuncInvoked bool
CleanupCronStatsFunc CleanupCronStatsFunc
CleanupCronStatsFuncInvoked 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
TeamMDMConfigFunc TeamMDMConfigFunc
TeamMDMConfigFuncInvoked bool
SaveHostPackStatsFunc SaveHostPackStatsFunc
SaveHostPackStatsFuncInvoked bool
AsyncBatchSaveHostsScheduledQueryStatsFunc AsyncBatchSaveHostsScheduledQueryStatsFunc
AsyncBatchSaveHostsScheduledQueryStatsFuncInvoked bool
UpdateHostSoftwareFunc UpdateHostSoftwareFunc
UpdateHostSoftwareFuncInvoked bool
UpdateHostSoftwareInstalledPathsFunc UpdateHostSoftwareInstalledPathsFunc
UpdateHostSoftwareInstalledPathsFuncInvoked bool
UpdateHostFunc UpdateHostFunc
UpdateHostFuncInvoked bool
ListScheduledQueriesInPackFunc ListScheduledQueriesInPackFunc
ListScheduledQueriesInPackFuncInvoked bool
UpdateHostRefetchRequestedFunc UpdateHostRefetchRequestedFunc
UpdateHostRefetchRequestedFuncInvoked bool
UpdateHostRefetchCriticalQueriesUntilFunc UpdateHostRefetchCriticalQueriesUntilFunc
UpdateHostRefetchCriticalQueriesUntilFuncInvoked 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
SetOrUpdateHostEmailsFromMdmIdpAccountsFunc SetOrUpdateHostEmailsFromMdmIdpAccountsFunc
SetOrUpdateHostEmailsFromMdmIdpAccountsFuncInvoked bool
SetOrUpdateHostDisksSpaceFunc SetOrUpdateHostDisksSpaceFunc
SetOrUpdateHostDisksSpaceFuncInvoked bool
SetOrUpdateHostDisksEncryptionFunc SetOrUpdateHostDisksEncryptionFunc
SetOrUpdateHostDisksEncryptionFuncInvoked bool
SetOrUpdateHostDiskEncryptionKeyFunc SetOrUpdateHostDiskEncryptionKeyFunc
SetOrUpdateHostDiskEncryptionKeyFuncInvoked bool
GetUnverifiedDiskEncryptionKeysFunc GetUnverifiedDiskEncryptionKeysFunc
GetUnverifiedDiskEncryptionKeysFuncInvoked bool
SetHostsDiskEncryptionKeyStatusFunc SetHostsDiskEncryptionKeyStatusFunc
SetHostsDiskEncryptionKeyStatusFuncInvoked bool
GetHostDiskEncryptionKeyFunc GetHostDiskEncryptionKeyFunc
GetHostDiskEncryptionKeyFuncInvoked bool
SetDiskEncryptionResetStatusFunc SetDiskEncryptionResetStatusFunc
SetDiskEncryptionResetStatusFuncInvoked bool
GetHostCertAssociationsToExpireFunc GetHostCertAssociationsToExpireFunc
GetHostCertAssociationsToExpireFuncInvoked bool
SetCommandForPendingSCEPRenewalFunc SetCommandForPendingSCEPRenewalFunc
SetCommandForPendingSCEPRenewalFuncInvoked bool
CleanSCEPRenewRefsFunc CleanSCEPRenewRefsFunc
CleanSCEPRenewRefsFuncInvoked bool
UpdateHostMDMProfilesVerificationFunc UpdateHostMDMProfilesVerificationFunc
UpdateHostMDMProfilesVerificationFuncInvoked bool
GetHostMDMProfilesExpectedForVerificationFunc GetHostMDMProfilesExpectedForVerificationFunc
GetHostMDMProfilesExpectedForVerificationFuncInvoked bool
GetHostMDMProfilesRetryCountsFunc GetHostMDMProfilesRetryCountsFunc
GetHostMDMProfilesRetryCountsFuncInvoked bool
GetHostMDMProfileRetryCountByCommandUUIDFunc GetHostMDMProfileRetryCountByCommandUUIDFunc
GetHostMDMProfileRetryCountByCommandUUIDFuncInvoked bool
SetOrUpdateHostOrbitInfoFunc SetOrUpdateHostOrbitInfoFunc
SetOrUpdateHostOrbitInfoFuncInvoked 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
ListWindowsUpdatesByHostIDFunc ListWindowsUpdatesByHostIDFunc
ListWindowsUpdatesByHostIDFuncInvoked bool
InsertWindowsUpdatesFunc InsertWindowsUpdatesFunc
InsertWindowsUpdatesFuncInvoked bool
ListOSVulnerabilitiesByOSFunc ListOSVulnerabilitiesByOSFunc
ListOSVulnerabilitiesByOSFuncInvoked bool
ListVulnsByOsNameAndVersionFunc ListVulnsByOsNameAndVersionFunc
ListVulnsByOsNameAndVersionFuncInvoked bool
InsertOSVulnerabilitiesFunc InsertOSVulnerabilitiesFunc
InsertOSVulnerabilitiesFuncInvoked bool
DeleteOSVulnerabilitiesFunc DeleteOSVulnerabilitiesFunc
DeleteOSVulnerabilitiesFuncInvoked bool
InsertOSVulnerabilityFunc InsertOSVulnerabilityFunc
InsertOSVulnerabilityFuncInvoked bool
DeleteOutOfDateOSVulnerabilitiesFunc DeleteOutOfDateOSVulnerabilitiesFunc
DeleteOutOfDateOSVulnerabilitiesFuncInvoked bool
ListVulnerabilitiesFunc ListVulnerabilitiesFunc
ListVulnerabilitiesFuncInvoked bool
VulnerabilityFunc VulnerabilityFunc
VulnerabilityFuncInvoked bool
CountVulnerabilitiesFunc CountVulnerabilitiesFunc
CountVulnerabilitiesFuncInvoked bool
UpdateVulnerabilityHostCountsFunc UpdateVulnerabilityHostCountsFunc
UpdateVulnerabilityHostCountsFuncInvoked bool
NewMDMAppleConfigProfileFunc NewMDMAppleConfigProfileFunc
NewMDMAppleConfigProfileFuncInvoked bool
BulkUpsertMDMAppleConfigProfilesFunc BulkUpsertMDMAppleConfigProfilesFunc
BulkUpsertMDMAppleConfigProfilesFuncInvoked bool
GetMDMAppleConfigProfileByDeprecatedIDFunc GetMDMAppleConfigProfileByDeprecatedIDFunc
GetMDMAppleConfigProfileByDeprecatedIDFuncInvoked bool
GetMDMAppleConfigProfileFunc GetMDMAppleConfigProfileFunc
GetMDMAppleConfigProfileFuncInvoked bool
GetMDMAppleDeclarationFunc GetMDMAppleDeclarationFunc
GetMDMAppleDeclarationFuncInvoked bool
ListMDMAppleConfigProfilesFunc ListMDMAppleConfigProfilesFunc
ListMDMAppleConfigProfilesFuncInvoked bool
DeleteMDMAppleConfigProfileByDeprecatedIDFunc DeleteMDMAppleConfigProfileByDeprecatedIDFunc
DeleteMDMAppleConfigProfileByDeprecatedIDFuncInvoked bool
DeleteMDMAppleConfigProfileFunc DeleteMDMAppleConfigProfileFunc
DeleteMDMAppleConfigProfileFuncInvoked bool
BulkDeleteMDMAppleHostsConfigProfilesFunc BulkDeleteMDMAppleHostsConfigProfilesFunc
BulkDeleteMDMAppleHostsConfigProfilesFuncInvoked bool
DeleteMDMAppleConfigProfileByTeamAndIdentifierFunc DeleteMDMAppleConfigProfileByTeamAndIdentifierFunc
DeleteMDMAppleConfigProfileByTeamAndIdentifierFuncInvoked bool
GetHostMDMAppleProfilesFunc GetHostMDMAppleProfilesFunc
GetHostMDMAppleProfilesFuncInvoked bool
CleanupDiskEncryptionKeysOnTeamChangeFunc CleanupDiskEncryptionKeysOnTeamChangeFunc
CleanupDiskEncryptionKeysOnTeamChangeFuncInvoked bool
NewMDMAppleEnrollmentProfileFunc NewMDMAppleEnrollmentProfileFunc
NewMDMAppleEnrollmentProfileFuncInvoked bool
GetMDMAppleEnrollmentProfileByTokenFunc GetMDMAppleEnrollmentProfileByTokenFunc
GetMDMAppleEnrollmentProfileByTokenFuncInvoked bool
GetMDMAppleEnrollmentProfileByTypeFunc GetMDMAppleEnrollmentProfileByTypeFunc
GetMDMAppleEnrollmentProfileByTypeFuncInvoked bool
ListMDMAppleEnrollmentProfilesFunc ListMDMAppleEnrollmentProfilesFunc
ListMDMAppleEnrollmentProfilesFuncInvoked bool
GetMDMAppleCommandResultsFunc GetMDMAppleCommandResultsFunc
GetMDMAppleCommandResultsFuncInvoked bool
ListMDMAppleCommandsFunc ListMDMAppleCommandsFunc
ListMDMAppleCommandsFuncInvoked 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
BatchSetMDMAppleProfilesFunc BatchSetMDMAppleProfilesFunc
BatchSetMDMAppleProfilesFuncInvoked bool
MDMAppleListDevicesFunc MDMAppleListDevicesFunc
MDMAppleListDevicesFuncInvoked bool
UpsertMDMAppleHostDEPAssignmentsFunc UpsertMDMAppleHostDEPAssignmentsFunc
UpsertMDMAppleHostDEPAssignmentsFuncInvoked bool
IngestMDMAppleDevicesFromDEPSyncFunc IngestMDMAppleDevicesFromDEPSyncFunc
IngestMDMAppleDevicesFromDEPSyncFuncInvoked bool
IngestMDMAppleDeviceFromCheckinFunc IngestMDMAppleDeviceFromCheckinFunc
IngestMDMAppleDeviceFromCheckinFuncInvoked bool
RestoreMDMApplePendingDEPHostFunc RestoreMDMApplePendingDEPHostFunc
RestoreMDMApplePendingDEPHostFuncInvoked bool
ResetMDMAppleEnrollmentFunc ResetMDMAppleEnrollmentFunc
ResetMDMAppleEnrollmentFuncInvoked bool
ListMDMAppleDEPSerialsInTeamFunc ListMDMAppleDEPSerialsInTeamFunc
ListMDMAppleDEPSerialsInTeamFuncInvoked bool
ListMDMAppleDEPSerialsInHostIDsFunc ListMDMAppleDEPSerialsInHostIDsFunc
ListMDMAppleDEPSerialsInHostIDsFuncInvoked bool
GetHostDEPAssignmentFunc GetHostDEPAssignmentFunc
GetHostDEPAssignmentFuncInvoked bool
GetNanoMDMEnrollmentFunc GetNanoMDMEnrollmentFunc
GetNanoMDMEnrollmentFuncInvoked bool
IncreasePolicyAutomationIterationFunc IncreasePolicyAutomationIterationFunc
IncreasePolicyAutomationIterationFuncInvoked bool
OutdatedAutomationBatchFunc OutdatedAutomationBatchFunc
OutdatedAutomationBatchFuncInvoked bool
ListMDMAppleProfilesToInstallFunc ListMDMAppleProfilesToInstallFunc
ListMDMAppleProfilesToInstallFuncInvoked bool
ListMDMAppleProfilesToRemoveFunc ListMDMAppleProfilesToRemoveFunc
ListMDMAppleProfilesToRemoveFuncInvoked bool
BulkUpsertMDMAppleHostProfilesFunc BulkUpsertMDMAppleHostProfilesFunc
BulkUpsertMDMAppleHostProfilesFuncInvoked bool
BulkSetPendingMDMHostProfilesFunc BulkSetPendingMDMHostProfilesFunc
BulkSetPendingMDMHostProfilesFuncInvoked bool
GetMDMAppleProfilesContentsFunc GetMDMAppleProfilesContentsFunc
GetMDMAppleProfilesContentsFuncInvoked bool
UpdateOrDeleteHostMDMAppleProfileFunc UpdateOrDeleteHostMDMAppleProfileFunc
UpdateOrDeleteHostMDMAppleProfileFuncInvoked bool
GetMDMAppleCommandRequestTypeFunc GetMDMAppleCommandRequestTypeFunc
GetMDMAppleCommandRequestTypeFuncInvoked bool
GetMDMAppleProfilesSummaryFunc GetMDMAppleProfilesSummaryFunc
GetMDMAppleProfilesSummaryFuncInvoked bool
InsertMDMIdPAccountFunc InsertMDMIdPAccountFunc
InsertMDMIdPAccountFuncInvoked bool
GetMDMIdPAccountByUUIDFunc GetMDMIdPAccountByUUIDFunc
GetMDMIdPAccountByUUIDFuncInvoked bool
GetMDMIdPAccountByEmailFunc GetMDMIdPAccountByEmailFunc
GetMDMIdPAccountByEmailFuncInvoked bool
GetMDMAppleFileVaultSummaryFunc GetMDMAppleFileVaultSummaryFunc
GetMDMAppleFileVaultSummaryFuncInvoked bool
InsertMDMAppleBootstrapPackageFunc InsertMDMAppleBootstrapPackageFunc
InsertMDMAppleBootstrapPackageFuncInvoked bool
CopyDefaultMDMAppleBootstrapPackageFunc CopyDefaultMDMAppleBootstrapPackageFunc
CopyDefaultMDMAppleBootstrapPackageFuncInvoked bool
DeleteMDMAppleBootstrapPackageFunc DeleteMDMAppleBootstrapPackageFunc
DeleteMDMAppleBootstrapPackageFuncInvoked bool
GetMDMAppleBootstrapPackageMetaFunc GetMDMAppleBootstrapPackageMetaFunc
GetMDMAppleBootstrapPackageMetaFuncInvoked bool
GetMDMAppleBootstrapPackageBytesFunc GetMDMAppleBootstrapPackageBytesFunc
GetMDMAppleBootstrapPackageBytesFuncInvoked bool
GetMDMAppleBootstrapPackageSummaryFunc GetMDMAppleBootstrapPackageSummaryFunc
GetMDMAppleBootstrapPackageSummaryFuncInvoked bool
RecordHostBootstrapPackageFunc RecordHostBootstrapPackageFunc
RecordHostBootstrapPackageFuncInvoked bool
GetHostMDMMacOSSetupFunc GetHostMDMMacOSSetupFunc
GetHostMDMMacOSSetupFuncInvoked bool
MDMGetEULAMetadataFunc MDMGetEULAMetadataFunc
MDMGetEULAMetadataFuncInvoked bool
MDMGetEULABytesFunc MDMGetEULABytesFunc
MDMGetEULABytesFuncInvoked bool
MDMInsertEULAFunc MDMInsertEULAFunc
MDMInsertEULAFuncInvoked bool
MDMDeleteEULAFunc MDMDeleteEULAFunc
MDMDeleteEULAFuncInvoked bool
SetOrUpdateMDMAppleSetupAssistantFunc SetOrUpdateMDMAppleSetupAssistantFunc
SetOrUpdateMDMAppleSetupAssistantFuncInvoked bool
GetMDMAppleSetupAssistantFunc GetMDMAppleSetupAssistantFunc
GetMDMAppleSetupAssistantFuncInvoked bool
DeleteMDMAppleSetupAssistantFunc DeleteMDMAppleSetupAssistantFunc
DeleteMDMAppleSetupAssistantFuncInvoked bool
SetMDMAppleSetupAssistantProfileUUIDFunc SetMDMAppleSetupAssistantProfileUUIDFunc
SetMDMAppleSetupAssistantProfileUUIDFuncInvoked bool
SetMDMAppleDefaultSetupAssistantProfileUUIDFunc SetMDMAppleDefaultSetupAssistantProfileUUIDFunc
SetMDMAppleDefaultSetupAssistantProfileUUIDFuncInvoked bool
GetMDMAppleDefaultSetupAssistantFunc GetMDMAppleDefaultSetupAssistantFunc
GetMDMAppleDefaultSetupAssistantFuncInvoked bool
GetMatchingHostSerialsFunc GetMatchingHostSerialsFunc
GetMatchingHostSerialsFuncInvoked bool
DeleteHostDEPAssignmentsFunc DeleteHostDEPAssignmentsFunc
DeleteHostDEPAssignmentsFuncInvoked bool
UpdateHostDEPAssignProfileResponsesFunc UpdateHostDEPAssignProfileResponsesFunc
UpdateHostDEPAssignProfileResponsesFuncInvoked bool
ScreenDEPAssignProfileSerialsForCooldownFunc ScreenDEPAssignProfileSerialsForCooldownFunc
ScreenDEPAssignProfileSerialsForCooldownFuncInvoked bool
GetDEPAssignProfileExpiredCooldownsFunc GetDEPAssignProfileExpiredCooldownsFunc
GetDEPAssignProfileExpiredCooldownsFuncInvoked bool
UpdateDEPAssignProfileRetryPendingFunc UpdateDEPAssignProfileRetryPendingFunc
UpdateDEPAssignProfileRetryPendingFuncInvoked bool
InsertMDMAppleDDMRequestFunc InsertMDMAppleDDMRequestFunc
InsertMDMAppleDDMRequestFuncInvoked bool
MDMAppleDDMDeclarationsTokenFunc MDMAppleDDMDeclarationsTokenFunc
MDMAppleDDMDeclarationsTokenFuncInvoked bool
MDMAppleDDMDeclarationItemsFunc MDMAppleDDMDeclarationItemsFunc
MDMAppleDDMDeclarationItemsFuncInvoked bool
MDMAppleDDMDeclarationsResponseFunc MDMAppleDDMDeclarationsResponseFunc
MDMAppleDDMDeclarationsResponseFuncInvoked bool
MDMAppleBatchSetHostDeclarationStateFunc MDMAppleBatchSetHostDeclarationStateFunc
MDMAppleBatchSetHostDeclarationStateFuncInvoked bool
MDMAppleStoreDDMStatusReportFunc MDMAppleStoreDDMStatusReportFunc
MDMAppleStoreDDMStatusReportFuncInvoked bool
MDMAppleSetPendingDeclarationsAsFunc MDMAppleSetPendingDeclarationsAsFunc
MDMAppleSetPendingDeclarationsAsFuncInvoked bool
WSTEPStoreCertificateFunc WSTEPStoreCertificateFunc
WSTEPStoreCertificateFuncInvoked bool
WSTEPNewSerialFunc WSTEPNewSerialFunc
WSTEPNewSerialFuncInvoked bool
WSTEPAssociateCertHashFunc WSTEPAssociateCertHashFunc
WSTEPAssociateCertHashFuncInvoked bool
MDMWindowsInsertEnrolledDeviceFunc MDMWindowsInsertEnrolledDeviceFunc
MDMWindowsInsertEnrolledDeviceFuncInvoked bool
MDMWindowsDeleteEnrolledDeviceFunc MDMWindowsDeleteEnrolledDeviceFunc
MDMWindowsDeleteEnrolledDeviceFuncInvoked bool
MDMWindowsGetEnrolledDeviceWithDeviceIDFunc MDMWindowsGetEnrolledDeviceWithDeviceIDFunc
MDMWindowsGetEnrolledDeviceWithDeviceIDFuncInvoked bool
MDMWindowsDeleteEnrolledDeviceWithDeviceIDFunc MDMWindowsDeleteEnrolledDeviceWithDeviceIDFunc
MDMWindowsDeleteEnrolledDeviceWithDeviceIDFuncInvoked bool
MDMWindowsInsertCommandForHostsFunc MDMWindowsInsertCommandForHostsFunc
MDMWindowsInsertCommandForHostsFuncInvoked bool
MDMWindowsGetPendingCommandsFunc MDMWindowsGetPendingCommandsFunc
MDMWindowsGetPendingCommandsFuncInvoked bool
MDMWindowsSaveResponseFunc MDMWindowsSaveResponseFunc
MDMWindowsSaveResponseFuncInvoked bool
GetMDMWindowsCommandResultsFunc GetMDMWindowsCommandResultsFunc
GetMDMWindowsCommandResultsFuncInvoked bool
UpdateMDMWindowsEnrollmentsHostUUIDFunc UpdateMDMWindowsEnrollmentsHostUUIDFunc
UpdateMDMWindowsEnrollmentsHostUUIDFuncInvoked bool
GetMDMWindowsConfigProfileFunc GetMDMWindowsConfigProfileFunc
GetMDMWindowsConfigProfileFuncInvoked bool
DeleteMDMWindowsConfigProfileFunc DeleteMDMWindowsConfigProfileFunc
DeleteMDMWindowsConfigProfileFuncInvoked bool
DeleteMDMWindowsConfigProfileByTeamAndNameFunc DeleteMDMWindowsConfigProfileByTeamAndNameFunc
DeleteMDMWindowsConfigProfileByTeamAndNameFuncInvoked bool
GetHostMDMWindowsProfilesFunc GetHostMDMWindowsProfilesFunc
GetHostMDMWindowsProfilesFuncInvoked bool
ListMDMConfigProfilesFunc ListMDMConfigProfilesFunc
ListMDMConfigProfilesFuncInvoked bool
GetMDMCommandPlatformFunc GetMDMCommandPlatformFunc
GetMDMCommandPlatformFuncInvoked bool
ListMDMCommandsFunc ListMDMCommandsFunc
ListMDMCommandsFuncInvoked bool
GetMDMWindowsBitLockerSummaryFunc GetMDMWindowsBitLockerSummaryFunc
GetMDMWindowsBitLockerSummaryFuncInvoked bool
GetMDMWindowsBitLockerStatusFunc GetMDMWindowsBitLockerStatusFunc
GetMDMWindowsBitLockerStatusFuncInvoked bool
GetMDMWindowsProfilesSummaryFunc GetMDMWindowsProfilesSummaryFunc
GetMDMWindowsProfilesSummaryFuncInvoked bool
ListMDMWindowsProfilesToInstallFunc ListMDMWindowsProfilesToInstallFunc
ListMDMWindowsProfilesToInstallFuncInvoked bool
ListMDMWindowsProfilesToRemoveFunc ListMDMWindowsProfilesToRemoveFunc
ListMDMWindowsProfilesToRemoveFuncInvoked bool
BulkUpsertMDMWindowsHostProfilesFunc BulkUpsertMDMWindowsHostProfilesFunc
BulkUpsertMDMWindowsHostProfilesFuncInvoked bool
GetMDMWindowsProfilesContentsFunc GetMDMWindowsProfilesContentsFunc
GetMDMWindowsProfilesContentsFuncInvoked bool
BulkDeleteMDMWindowsHostsConfigProfilesFunc BulkDeleteMDMWindowsHostsConfigProfilesFunc
BulkDeleteMDMWindowsHostsConfigProfilesFuncInvoked bool
NewMDMWindowsConfigProfileFunc NewMDMWindowsConfigProfileFunc
NewMDMWindowsConfigProfileFuncInvoked bool
SetOrUpdateMDMWindowsConfigProfileFunc SetOrUpdateMDMWindowsConfigProfileFunc
SetOrUpdateMDMWindowsConfigProfileFuncInvoked bool
BatchSetMDMProfilesFunc BatchSetMDMProfilesFunc
BatchSetMDMProfilesFuncInvoked bool
NewMDMAppleDeclarationFunc NewMDMAppleDeclarationFunc
NewMDMAppleDeclarationFuncInvoked bool
NewHostScriptExecutionRequestFunc NewHostScriptExecutionRequestFunc
NewHostScriptExecutionRequestFuncInvoked bool
SetHostScriptExecutionResultFunc SetHostScriptExecutionResultFunc
SetHostScriptExecutionResultFuncInvoked bool
GetHostScriptExecutionResultFunc GetHostScriptExecutionResultFunc
GetHostScriptExecutionResultFuncInvoked bool
ListPendingHostScriptExecutionsFunc ListPendingHostScriptExecutionsFunc
ListPendingHostScriptExecutionsFuncInvoked bool
NewScriptFunc NewScriptFunc
NewScriptFuncInvoked bool
ScriptFunc ScriptFunc
ScriptFuncInvoked bool
GetScriptContentsFunc GetScriptContentsFunc
GetScriptContentsFuncInvoked bool
DeleteScriptFunc DeleteScriptFunc
DeleteScriptFuncInvoked bool
ListScriptsFunc ListScriptsFunc
ListScriptsFuncInvoked bool
GetScriptIDByNameFunc GetScriptIDByNameFunc
GetScriptIDByNameFuncInvoked bool
GetHostScriptDetailsFunc GetHostScriptDetailsFunc
GetHostScriptDetailsFuncInvoked bool
BatchSetScriptsFunc BatchSetScriptsFunc
BatchSetScriptsFuncInvoked bool
GetHostLockWipeStatusFunc GetHostLockWipeStatusFunc
GetHostLockWipeStatusFuncInvoked bool
LockHostViaScriptFunc LockHostViaScriptFunc
LockHostViaScriptFuncInvoked bool
UnlockHostViaScriptFunc UnlockHostViaScriptFunc
UnlockHostViaScriptFuncInvoked bool
UnlockHostManuallyFunc UnlockHostManuallyFunc
UnlockHostManuallyFuncInvoked bool
CleanMacOSMDMLockFunc CleanMacOSMDMLockFunc
CleanMacOSMDMLockFuncInvoked bool
CleanupUnusedScriptContentsFunc CleanupUnusedScriptContentsFunc
CleanupUnusedScriptContentsFuncInvoked bool
WipeHostViaScriptFunc WipeHostViaScriptFunc
WipeHostViaScriptFuncInvoked bool
WipeHostViaWindowsMDMFunc WipeHostViaWindowsMDMFunc
WipeHostViaWindowsMDMFuncInvoked bool
UpdateHostLockWipeStatusFromAppleMDMResultFunc UpdateHostLockWipeStatusFromAppleMDMResultFunc
UpdateHostLockWipeStatusFromAppleMDMResultFuncInvoked bool
mu sync.Mutex
}
func (s *DataStore) HealthCheck() error {
s.mu.Lock()
s.HealthCheckFuncInvoked = true
s.mu.Unlock()
return s.HealthCheckFunc()
}
func (s *DataStore) NewCarve(ctx context.Context, metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error) {
s.mu.Lock()
s.NewCarveFuncInvoked = true
s.mu.Unlock()
return s.NewCarveFunc(ctx, metadata)
}
func (s *DataStore) UpdateCarve(ctx context.Context, metadata *fleet.CarveMetadata) error {
s.mu.Lock()
s.UpdateCarveFuncInvoked = true
s.mu.Unlock()
return s.UpdateCarveFunc(ctx, metadata)
}
func (s *DataStore) Carve(ctx context.Context, carveId int64) (*fleet.CarveMetadata, error) {
s.mu.Lock()
s.CarveFuncInvoked = true
s.mu.Unlock()
return s.CarveFunc(ctx, carveId)
}
func (s *DataStore) CarveBySessionId(ctx context.Context, sessionId string) (*fleet.CarveMetadata, error) {
s.mu.Lock()
s.CarveBySessionIdFuncInvoked = true
s.mu.Unlock()
return s.CarveBySessionIdFunc(ctx, sessionId)
}
func (s *DataStore) CarveByName(ctx context.Context, name string) (*fleet.CarveMetadata, error) {
s.mu.Lock()
s.CarveByNameFuncInvoked = true
s.mu.Unlock()
return s.CarveByNameFunc(ctx, name)
}
func (s *DataStore) ListCarves(ctx context.Context, opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error) {
s.mu.Lock()
s.ListCarvesFuncInvoked = true
s.mu.Unlock()
return s.ListCarvesFunc(ctx, opt)
}
func (s *DataStore) NewBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64, data []byte) error {
s.mu.Lock()
s.NewBlockFuncInvoked = true
s.mu.Unlock()
return s.NewBlockFunc(ctx, metadata, blockId, data)
}
func (s *DataStore) GetBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64) ([]byte, error) {
s.mu.Lock()
s.GetBlockFuncInvoked = true
s.mu.Unlock()
return s.GetBlockFunc(ctx, metadata, blockId)
}
func (s *DataStore) CleanupCarves(ctx context.Context, now time.Time) (expired int, err error) {
s.mu.Lock()
s.CleanupCarvesFuncInvoked = true
s.mu.Unlock()
return s.CleanupCarvesFunc(ctx, now)
}
func (s *DataStore) NewUser(ctx context.Context, user *fleet.User) (*fleet.User, error) {
s.mu.Lock()
s.NewUserFuncInvoked = true
s.mu.Unlock()
return s.NewUserFunc(ctx, user)
}
func (s *DataStore) ListUsers(ctx context.Context, opt fleet.UserListOptions) ([]*fleet.User, error) {
s.mu.Lock()
s.ListUsersFuncInvoked = true
s.mu.Unlock()
return s.ListUsersFunc(ctx, opt)
}
func (s *DataStore) UserByEmail(ctx context.Context, email string) (*fleet.User, error) {
s.mu.Lock()
s.UserByEmailFuncInvoked = true
s.mu.Unlock()
return s.UserByEmailFunc(ctx, email)
}
func (s *DataStore) UserByID(ctx context.Context, id uint) (*fleet.User, error) {
s.mu.Lock()
s.UserByIDFuncInvoked = true
s.mu.Unlock()
return s.UserByIDFunc(ctx, id)
}
func (s *DataStore) SaveUser(ctx context.Context, user *fleet.User) error {
s.mu.Lock()
s.SaveUserFuncInvoked = true
s.mu.Unlock()
return s.SaveUserFunc(ctx, user)
}
func (s *DataStore) SaveUsers(ctx context.Context, users []*fleet.User) error {
s.mu.Lock()
s.SaveUsersFuncInvoked = true
s.mu.Unlock()
return s.SaveUsersFunc(ctx, users)
}
func (s *DataStore) DeleteUser(ctx context.Context, id uint) error {
s.mu.Lock()
s.DeleteUserFuncInvoked = true
s.mu.Unlock()
return s.DeleteUserFunc(ctx, id)
}
func (s *DataStore) PendingEmailChange(ctx context.Context, userID uint, newEmail string, token string) error {
s.mu.Lock()
s.PendingEmailChangeFuncInvoked = true
s.mu.Unlock()
return s.PendingEmailChangeFunc(ctx, userID, newEmail, token)
}
func (s *DataStore) ConfirmPendingEmailChange(ctx context.Context, userID uint, token string) (string, error) {
s.mu.Lock()
s.ConfirmPendingEmailChangeFuncInvoked = true
s.mu.Unlock()
return s.ConfirmPendingEmailChangeFunc(ctx, userID, token)
}
func (s *DataStore) ApplyQueries(ctx context.Context, authorID uint, queries []*fleet.Query, queriesToDiscardResults map[uint]struct{}) error {
s.mu.Lock()
s.ApplyQueriesFuncInvoked = true
s.mu.Unlock()
return s.ApplyQueriesFunc(ctx, authorID, queries, queriesToDiscardResults)
}
func (s *DataStore) NewQuery(ctx context.Context, query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error) {
s.mu.Lock()
s.NewQueryFuncInvoked = true
s.mu.Unlock()
return s.NewQueryFunc(ctx, query, opts...)
}
func (s *DataStore) SaveQuery(ctx context.Context, query *fleet.Query, shouldDiscardResults bool, shouldDeleteStats bool) error {
s.mu.Lock()
s.SaveQueryFuncInvoked = true
s.mu.Unlock()
return s.SaveQueryFunc(ctx, query, shouldDiscardResults, shouldDeleteStats)
}
func (s *DataStore) DeleteQuery(ctx context.Context, teamID *uint, name string) error {
s.mu.Lock()
s.DeleteQueryFuncInvoked = true
s.mu.Unlock()
return s.DeleteQueryFunc(ctx, teamID, name)
}
func (s *DataStore) DeleteQueries(ctx context.Context, ids []uint) (uint, error) {
s.mu.Lock()
s.DeleteQueriesFuncInvoked = true
s.mu.Unlock()
return s.DeleteQueriesFunc(ctx, ids)
}
func (s *DataStore) Query(ctx context.Context, id uint) (*fleet.Query, error) {
s.mu.Lock()
s.QueryFuncInvoked = true
s.mu.Unlock()
return s.QueryFunc(ctx, id)
}
func (s *DataStore) ListQueries(ctx context.Context, opt fleet.ListQueryOptions) ([]*fleet.Query, error) {
s.mu.Lock()
s.ListQueriesFuncInvoked = true
s.mu.Unlock()
return s.ListQueriesFunc(ctx, opt)
}
func (s *DataStore) ListScheduledQueriesForAgents(ctx context.Context, teamID *uint, queryReportsDisabled bool) ([]*fleet.Query, error) {
s.mu.Lock()
s.ListScheduledQueriesForAgentsFuncInvoked = true
s.mu.Unlock()
return s.ListScheduledQueriesForAgentsFunc(ctx, teamID, queryReportsDisabled)
}
func (s *DataStore) QueryByName(ctx context.Context, teamID *uint, name string) (*fleet.Query, error) {
s.mu.Lock()
s.QueryByNameFuncInvoked = true
s.mu.Unlock()
return s.QueryByNameFunc(ctx, teamID, name)
}
func (s *DataStore) ObserverCanRunQuery(ctx context.Context, queryID uint) (bool, error) {
s.mu.Lock()
s.ObserverCanRunQueryFuncInvoked = true
s.mu.Unlock()
return s.ObserverCanRunQueryFunc(ctx, queryID)
}
func (s *DataStore) CleanupGlobalDiscardQueryResults(ctx context.Context) error {
s.mu.Lock()
s.CleanupGlobalDiscardQueryResultsFuncInvoked = true
s.mu.Unlock()
return s.CleanupGlobalDiscardQueryResultsFunc(ctx)
}
func (s *DataStore) IsSavedQuery(ctx context.Context, queryID uint) (bool, error) {
s.mu.Lock()
s.IsSavedQueryFuncInvoked = true
s.mu.Unlock()
return s.IsSavedQueryFunc(ctx, queryID)
}
func (s *DataStore) GetLiveQueryStats(ctx context.Context, queryID uint, hostIDs []uint) ([]*fleet.LiveQueryStats, error) {
s.mu.Lock()
s.GetLiveQueryStatsFuncInvoked = true
s.mu.Unlock()
return s.GetLiveQueryStatsFunc(ctx, queryID, hostIDs)
}
func (s *DataStore) UpdateLiveQueryStats(ctx context.Context, queryID uint, stats []*fleet.LiveQueryStats) error {
s.mu.Lock()
s.UpdateLiveQueryStatsFuncInvoked = true
s.mu.Unlock()
return s.UpdateLiveQueryStatsFunc(ctx, queryID, stats)
}
func (s *DataStore) CalculateAggregatedPerfStatsPercentiles(ctx context.Context, aggregate fleet.AggregatedStatsType, queryID uint) error {
s.mu.Lock()
s.CalculateAggregatedPerfStatsPercentilesFuncInvoked = true
s.mu.Unlock()
return s.CalculateAggregatedPerfStatsPercentilesFunc(ctx, aggregate, queryID)
}
func (s *DataStore) NewDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) (*fleet.DistributedQueryCampaign, error) {
s.mu.Lock()
s.NewDistributedQueryCampaignFuncInvoked = true
s.mu.Unlock()
return s.NewDistributedQueryCampaignFunc(ctx, camp)
}
func (s *DataStore) DistributedQueryCampaign(ctx context.Context, id uint) (*fleet.DistributedQueryCampaign, error) {
s.mu.Lock()
s.DistributedQueryCampaignFuncInvoked = true
s.mu.Unlock()
return s.DistributedQueryCampaignFunc(ctx, id)
}
func (s *DataStore) SaveDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) error {
s.mu.Lock()
s.SaveDistributedQueryCampaignFuncInvoked = true
s.mu.Unlock()
return s.SaveDistributedQueryCampaignFunc(ctx, camp)
}
func (s *DataStore) DistributedQueryCampaignTargetIDs(ctx context.Context, id uint) (targets *fleet.HostTargets, err error) {
s.mu.Lock()
s.DistributedQueryCampaignTargetIDsFuncInvoked = true
s.mu.Unlock()
return s.DistributedQueryCampaignTargetIDsFunc(ctx, id)
}
func (s *DataStore) NewDistributedQueryCampaignTarget(ctx context.Context, target *fleet.DistributedQueryCampaignTarget) (*fleet.DistributedQueryCampaignTarget, error) {
s.mu.Lock()
s.NewDistributedQueryCampaignTargetFuncInvoked = true
s.mu.Unlock()
return s.NewDistributedQueryCampaignTargetFunc(ctx, target)
}
func (s *DataStore) CleanupDistributedQueryCampaigns(ctx context.Context, now time.Time) (expired uint, err error) {
s.mu.Lock()
s.CleanupDistributedQueryCampaignsFuncInvoked = true
s.mu.Unlock()
return s.CleanupDistributedQueryCampaignsFunc(ctx, now)
}
func (s *DataStore) GetCompletedCampaigns(ctx context.Context, filter []uint) ([]uint, error) {
s.mu.Lock()
s.GetCompletedCampaignsFuncInvoked = true
s.mu.Unlock()
return s.GetCompletedCampaignsFunc(ctx, filter)
}
func (s *DataStore) DistributedQueryCampaignsForQuery(ctx context.Context, queryID uint) ([]*fleet.DistributedQueryCampaign, error) {
s.mu.Lock()
s.DistributedQueryCampaignsForQueryFuncInvoked = true
s.mu.Unlock()
return s.DistributedQueryCampaignsForQueryFunc(ctx, queryID)
}
func (s *DataStore) ApplyPackSpecs(ctx context.Context, specs []*fleet.PackSpec) error {
s.mu.Lock()
s.ApplyPackSpecsFuncInvoked = true
s.mu.Unlock()
return s.ApplyPackSpecsFunc(ctx, specs)
}
func (s *DataStore) GetPackSpecs(ctx context.Context) ([]*fleet.PackSpec, error) {
s.mu.Lock()
s.GetPackSpecsFuncInvoked = true
s.mu.Unlock()
return s.GetPackSpecsFunc(ctx)
}
func (s *DataStore) GetPackSpec(ctx context.Context, name string) (*fleet.PackSpec, error) {
s.mu.Lock()
s.GetPackSpecFuncInvoked = true
s.mu.Unlock()
return s.GetPackSpecFunc(ctx, name)
}
func (s *DataStore) NewPack(ctx context.Context, pack *fleet.Pack, opts ...fleet.OptionalArg) (*fleet.Pack, error) {
s.mu.Lock()
s.NewPackFuncInvoked = true
s.mu.Unlock()
return s.NewPackFunc(ctx, pack, opts...)
}
func (s *DataStore) SavePack(ctx context.Context, pack *fleet.Pack) error {
s.mu.Lock()
s.SavePackFuncInvoked = true
s.mu.Unlock()
return s.SavePackFunc(ctx, pack)
}
func (s *DataStore) DeletePack(ctx context.Context, name string) error {
s.mu.Lock()
s.DeletePackFuncInvoked = true
s.mu.Unlock()
return s.DeletePackFunc(ctx, name)
}
func (s *DataStore) Pack(ctx context.Context, pid uint) (*fleet.Pack, error) {
s.mu.Lock()
s.PackFuncInvoked = true
s.mu.Unlock()
return s.PackFunc(ctx, pid)
}
func (s *DataStore) ListPacks(ctx context.Context, opt fleet.PackListOptions) ([]*fleet.Pack, error) {
s.mu.Lock()
s.ListPacksFuncInvoked = true
s.mu.Unlock()
return s.ListPacksFunc(ctx, opt)
}
func (s *DataStore) PackByName(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Pack, bool, error) {
s.mu.Lock()
s.PackByNameFuncInvoked = true
s.mu.Unlock()
return s.PackByNameFunc(ctx, name, opts...)
}
func (s *DataStore) ListPacksForHost(ctx context.Context, hid uint) (packs []*fleet.Pack, err error) {
s.mu.Lock()
s.ListPacksForHostFuncInvoked = true
s.mu.Unlock()
return s.ListPacksForHostFunc(ctx, hid)
}
func (s *DataStore) ApplyLabelSpecs(ctx context.Context, specs []*fleet.LabelSpec) error {
s.mu.Lock()
s.ApplyLabelSpecsFuncInvoked = true
s.mu.Unlock()
return s.ApplyLabelSpecsFunc(ctx, specs)
}
func (s *DataStore) GetLabelSpecs(ctx context.Context) ([]*fleet.LabelSpec, error) {
s.mu.Lock()
s.GetLabelSpecsFuncInvoked = true
s.mu.Unlock()
return s.GetLabelSpecsFunc(ctx)
}
func (s *DataStore) GetLabelSpec(ctx context.Context, name string) (*fleet.LabelSpec, error) {
s.mu.Lock()
s.GetLabelSpecFuncInvoked = true
s.mu.Unlock()
return s.GetLabelSpecFunc(ctx, name)
}
func (s *DataStore) NewLabel(ctx context.Context, Label *fleet.Label, opts ...fleet.OptionalArg) (*fleet.Label, error) {
s.mu.Lock()
s.NewLabelFuncInvoked = true
s.mu.Unlock()
return s.NewLabelFunc(ctx, Label, opts...)
}
func (s *DataStore) SaveLabel(ctx context.Context, label *fleet.Label) (*fleet.Label, error) {
s.mu.Lock()
s.SaveLabelFuncInvoked = true
s.mu.Unlock()
return s.SaveLabelFunc(ctx, label)
}
func (s *DataStore) DeleteLabel(ctx context.Context, name string) error {
s.mu.Lock()
s.DeleteLabelFuncInvoked = true
s.mu.Unlock()
return s.DeleteLabelFunc(ctx, name)
}
func (s *DataStore) Label(ctx context.Context, lid uint) (*fleet.Label, error) {
s.mu.Lock()
s.LabelFuncInvoked = true
s.mu.Unlock()
return s.LabelFunc(ctx, lid)
}
func (s *DataStore) ListLabels(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Label, error) {
s.mu.Lock()
s.ListLabelsFuncInvoked = true
s.mu.Unlock()
return s.ListLabelsFunc(ctx, filter, opt)
}
func (s *DataStore) LabelsSummary(ctx context.Context) ([]*fleet.LabelSummary, error) {
s.mu.Lock()
s.LabelsSummaryFuncInvoked = true
s.mu.Unlock()
return s.LabelsSummaryFunc(ctx)
}
func (s *DataStore) LabelQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
s.mu.Lock()
s.LabelQueriesForHostFuncInvoked = true
s.mu.Unlock()
return s.LabelQueriesForHostFunc(ctx, host)
}
func (s *DataStore) ListLabelsForHost(ctx context.Context, hid uint) ([]*fleet.Label, error) {
s.mu.Lock()
s.ListLabelsForHostFuncInvoked = true
s.mu.Unlock()
return s.ListLabelsForHostFunc(ctx, hid)
}
func (s *DataStore) ListHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) ([]*fleet.Host, error) {
s.mu.Lock()
s.ListHostsInLabelFuncInvoked = true
s.mu.Unlock()
return s.ListHostsInLabelFunc(ctx, filter, lid, opt)
}
func (s *DataStore) ListUniqueHostsInLabels(ctx context.Context, filter fleet.TeamFilter, labels []uint) ([]*fleet.Host, error) {
s.mu.Lock()
s.ListUniqueHostsInLabelsFuncInvoked = true
s.mu.Unlock()
return s.ListUniqueHostsInLabelsFunc(ctx, filter, labels)
}
func (s *DataStore) SearchLabels(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Label, error) {
s.mu.Lock()
s.SearchLabelsFuncInvoked = true
s.mu.Unlock()
return s.SearchLabelsFunc(ctx, filter, query, omit...)
}
func (s *DataStore) LabelIDsByName(ctx context.Context, labels []string) (map[string]uint, error) {
s.mu.Lock()
s.LabelIDsByNameFuncInvoked = true
s.mu.Unlock()
return s.LabelIDsByNameFunc(ctx, labels)
}
func (s *DataStore) AsyncBatchInsertLabelMembership(ctx context.Context, batch [][2]uint) error {
s.mu.Lock()
s.AsyncBatchInsertLabelMembershipFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchInsertLabelMembershipFunc(ctx, batch)
}
func (s *DataStore) AsyncBatchDeleteLabelMembership(ctx context.Context, batch [][2]uint) error {
s.mu.Lock()
s.AsyncBatchDeleteLabelMembershipFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchDeleteLabelMembershipFunc(ctx, batch)
}
func (s *DataStore) AsyncBatchUpdateLabelTimestamp(ctx context.Context, ids []uint, ts time.Time) error {
s.mu.Lock()
s.AsyncBatchUpdateLabelTimestampFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchUpdateLabelTimestampFunc(ctx, ids, ts)
}
func (s *DataStore) NewHost(ctx context.Context, host *fleet.Host) (*fleet.Host, error) {
s.mu.Lock()
s.NewHostFuncInvoked = true
s.mu.Unlock()
return s.NewHostFunc(ctx, host)
}
func (s *DataStore) DeleteHost(ctx context.Context, hid uint) error {
s.mu.Lock()
s.DeleteHostFuncInvoked = true
s.mu.Unlock()
return s.DeleteHostFunc(ctx, hid)
}
func (s *DataStore) Host(ctx context.Context, id uint) (*fleet.Host, error) {
s.mu.Lock()
s.HostFuncInvoked = true
s.mu.Unlock()
return s.HostFunc(ctx, id)
}
func (s *DataStore) GetHostHealth(ctx context.Context, id uint) (*fleet.HostHealth, error) {
s.mu.Lock()
s.GetHostHealthFuncInvoked = true
s.mu.Unlock()
return s.GetHostHealthFunc(ctx, id)
}
func (s *DataStore) ListHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error) {
s.mu.Lock()
s.ListHostsFuncInvoked = true
s.mu.Unlock()
return s.ListHostsFunc(ctx, filter, opt)
}
func (s *DataStore) ListHostsLiteByUUIDs(ctx context.Context, filter fleet.TeamFilter, uuids []string) ([]*fleet.Host, error) {
s.mu.Lock()
s.ListHostsLiteByUUIDsFuncInvoked = true
s.mu.Unlock()
return s.ListHostsLiteByUUIDsFunc(ctx, filter, uuids)
}
func (s *DataStore) ListHostsLiteByIDs(ctx context.Context, ids []uint) ([]*fleet.Host, error) {
s.mu.Lock()
s.ListHostsLiteByIDsFuncInvoked = true
s.mu.Unlock()
return s.ListHostsLiteByIDsFunc(ctx, ids)
}
func (s *DataStore) MarkHostsSeen(ctx context.Context, hostIDs []uint, t time.Time) error {
s.mu.Lock()
s.MarkHostsSeenFuncInvoked = true
s.mu.Unlock()
return s.MarkHostsSeenFunc(ctx, hostIDs, t)
}
func (s *DataStore) SearchHosts(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Host, error) {
s.mu.Lock()
s.SearchHostsFuncInvoked = true
s.mu.Unlock()
return s.SearchHostsFunc(ctx, filter, query, omit...)
}
func (s *DataStore) EnrolledHostIDs(ctx context.Context) ([]uint, error) {
s.mu.Lock()
s.EnrolledHostIDsFuncInvoked = true
s.mu.Unlock()
return s.EnrolledHostIDsFunc(ctx)
}
func (s *DataStore) CountEnrolledHosts(ctx context.Context) (int, error) {
s.mu.Lock()
s.CountEnrolledHostsFuncInvoked = true
s.mu.Unlock()
return s.CountEnrolledHostsFunc(ctx)
}
func (s *DataStore) CleanupIncomingHosts(ctx context.Context, now time.Time) ([]uint, error) {
s.mu.Lock()
s.CleanupIncomingHostsFuncInvoked = true
s.mu.Unlock()
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.mu.Lock()
s.GenerateHostStatusStatisticsFuncInvoked = true
s.mu.Unlock()
return s.GenerateHostStatusStatisticsFunc(ctx, filter, now, platform, lowDiskSpace)
}
func (s *DataStore) HostIDsByName(ctx context.Context, filter fleet.TeamFilter, hostnames []string) ([]uint, error) {
s.mu.Lock()
s.HostIDsByNameFuncInvoked = true
s.mu.Unlock()
return s.HostIDsByNameFunc(ctx, filter, hostnames)
}
func (s *DataStore) HostIDsByOSID(ctx context.Context, osID uint, offset int, limit int) ([]uint, error) {
s.mu.Lock()
s.HostIDsByOSIDFuncInvoked = true
s.mu.Unlock()
return s.HostIDsByOSIDFunc(ctx, osID, offset, limit)
}
func (s *DataStore) HostMemberOfAllLabels(ctx context.Context, hostID uint, labelNames []string) (bool, error) {
s.mu.Lock()
s.HostMemberOfAllLabelsFuncInvoked = true
s.mu.Unlock()
return s.HostMemberOfAllLabelsFunc(ctx, hostID, labelNames)
}
func (s *DataStore) HostIDsByOSVersion(ctx context.Context, osVersion fleet.OSVersion, offset int, limit int) ([]uint, error) {
s.mu.Lock()
s.HostIDsByOSVersionFuncInvoked = true
s.mu.Unlock()
return s.HostIDsByOSVersionFunc(ctx, osVersion, offset, limit)
}
func (s *DataStore) HostByIdentifier(ctx context.Context, identifier string) (*fleet.Host, error) {
s.mu.Lock()
s.HostByIdentifierFuncInvoked = true
s.mu.Unlock()
return s.HostByIdentifierFunc(ctx, identifier)
}
func (s *DataStore) HostLiteByIdentifier(ctx context.Context, identifier string) (*fleet.HostLite, error) {
s.mu.Lock()
s.HostLiteByIdentifierFuncInvoked = true
s.mu.Unlock()
return s.HostLiteByIdentifierFunc(ctx, identifier)
}
func (s *DataStore) HostLiteByID(ctx context.Context, id uint) (*fleet.HostLite, error) {
s.mu.Lock()
s.HostLiteByIDFuncInvoked = true
s.mu.Unlock()
return s.HostLiteByIDFunc(ctx, id)
}
func (s *DataStore) AddHostsToTeam(ctx context.Context, teamID *uint, hostIDs []uint) error {
s.mu.Lock()
s.AddHostsToTeamFuncInvoked = true
s.mu.Unlock()
return s.AddHostsToTeamFunc(ctx, teamID, hostIDs)
}
func (s *DataStore) TotalAndUnseenHostsSince(ctx context.Context, teamID *uint, daysCount int) (total int, unseen []uint, err error) {
s.mu.Lock()
s.TotalAndUnseenHostsSinceFuncInvoked = true
s.mu.Unlock()
return s.TotalAndUnseenHostsSinceFunc(ctx, teamID, daysCount)
}
func (s *DataStore) DeleteHosts(ctx context.Context, ids []uint) error {
s.mu.Lock()
s.DeleteHostsFuncInvoked = true
s.mu.Unlock()
return s.DeleteHostsFunc(ctx, ids)
}
func (s *DataStore) CountHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) (int, error) {
s.mu.Lock()
s.CountHostsFuncInvoked = true
s.mu.Unlock()
return s.CountHostsFunc(ctx, filter, opt)
}
func (s *DataStore) CountHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) (int, error) {
s.mu.Lock()
s.CountHostsInLabelFuncInvoked = true
s.mu.Unlock()
return s.CountHostsInLabelFunc(ctx, filter, lid, opt)
}
func (s *DataStore) ListHostDeviceMapping(ctx context.Context, id uint) ([]*fleet.HostDeviceMapping, error) {
s.mu.Lock()
s.ListHostDeviceMappingFuncInvoked = true
s.mu.Unlock()
return s.ListHostDeviceMappingFunc(ctx, id)
}
func (s *DataStore) SetOrUpdateCustomHostDeviceMapping(ctx context.Context, hostID uint, email string, source string) ([]*fleet.HostDeviceMapping, error) {
s.mu.Lock()
s.SetOrUpdateCustomHostDeviceMappingFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateCustomHostDeviceMappingFunc(ctx, hostID, email, source)
}
func (s *DataStore) ListHostBatteries(ctx context.Context, id uint) ([]*fleet.HostBattery, error) {
s.mu.Lock()
s.ListHostBatteriesFuncInvoked = true
s.mu.Unlock()
return s.ListHostBatteriesFunc(ctx, id)
}
func (s *DataStore) LoadHostByDeviceAuthToken(ctx context.Context, authToken string, tokenTTL time.Duration) (*fleet.Host, error) {
s.mu.Lock()
s.LoadHostByDeviceAuthTokenFuncInvoked = true
s.mu.Unlock()
return s.LoadHostByDeviceAuthTokenFunc(ctx, authToken, tokenTTL)
}
func (s *DataStore) SetOrUpdateDeviceAuthToken(ctx context.Context, hostID uint, authToken string) error {
s.mu.Lock()
s.SetOrUpdateDeviceAuthTokenFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateDeviceAuthTokenFunc(ctx, hostID, authToken)
}
func (s *DataStore) FailingPoliciesCount(ctx context.Context, host *fleet.Host) (uint, error) {
s.mu.Lock()
s.FailingPoliciesCountFuncInvoked = true
s.mu.Unlock()
return s.FailingPoliciesCountFunc(ctx, host)
}
func (s *DataStore) ListPoliciesForHost(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error) {
s.mu.Lock()
s.ListPoliciesForHostFuncInvoked = true
s.mu.Unlock()
return s.ListPoliciesForHostFunc(ctx, host)
}
func (s *DataStore) GetHostMunkiVersion(ctx context.Context, hostID uint) (string, error) {
s.mu.Lock()
s.GetHostMunkiVersionFuncInvoked = true
s.mu.Unlock()
return s.GetHostMunkiVersionFunc(ctx, hostID)
}
func (s *DataStore) GetHostMunkiIssues(ctx context.Context, hostID uint) ([]*fleet.HostMunkiIssue, error) {
s.mu.Lock()
s.GetHostMunkiIssuesFuncInvoked = true
s.mu.Unlock()
return s.GetHostMunkiIssuesFunc(ctx, hostID)
}
func (s *DataStore) GetHostMDM(ctx context.Context, hostID uint) (*fleet.HostMDM, error) {
s.mu.Lock()
s.GetHostMDMFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMFunc(ctx, hostID)
}
func (s *DataStore) GetHostMDMCheckinInfo(ctx context.Context, hostUUID string) (*fleet.HostMDMCheckinInfo, error) {
s.mu.Lock()
s.GetHostMDMCheckinInfoFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMCheckinInfoFunc(ctx, hostUUID)
}
func (s *DataStore) AggregatedMunkiVersion(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiVersion, time.Time, error) {
s.mu.Lock()
s.AggregatedMunkiVersionFuncInvoked = true
s.mu.Unlock()
return s.AggregatedMunkiVersionFunc(ctx, teamID)
}
func (s *DataStore) AggregatedMunkiIssues(ctx context.Context, teamID *uint) ([]fleet.AggregatedMunkiIssue, time.Time, error) {
s.mu.Lock()
s.AggregatedMunkiIssuesFuncInvoked = true
s.mu.Unlock()
return s.AggregatedMunkiIssuesFunc(ctx, teamID)
}
func (s *DataStore) AggregatedMDMStatus(ctx context.Context, teamID *uint, platform string) (fleet.AggregatedMDMStatus, time.Time, error) {
s.mu.Lock()
s.AggregatedMDMStatusFuncInvoked = true
s.mu.Unlock()
return s.AggregatedMDMStatusFunc(ctx, teamID, platform)
}
func (s *DataStore) AggregatedMDMSolutions(ctx context.Context, teamID *uint, platform string) ([]fleet.AggregatedMDMSolutions, time.Time, error) {
s.mu.Lock()
s.AggregatedMDMSolutionsFuncInvoked = true
s.mu.Unlock()
return s.AggregatedMDMSolutionsFunc(ctx, teamID, platform)
}
func (s *DataStore) GenerateAggregatedMunkiAndMDM(ctx context.Context) error {
s.mu.Lock()
s.GenerateAggregatedMunkiAndMDMFuncInvoked = true
s.mu.Unlock()
return s.GenerateAggregatedMunkiAndMDMFunc(ctx)
}
func (s *DataStore) GetMunkiIssue(ctx context.Context, munkiIssueID uint) (*fleet.MunkiIssue, error) {
s.mu.Lock()
s.GetMunkiIssueFuncInvoked = true
s.mu.Unlock()
return s.GetMunkiIssueFunc(ctx, munkiIssueID)
}
func (s *DataStore) GetMDMSolution(ctx context.Context, mdmID uint) (*fleet.MDMSolution, error) {
s.mu.Lock()
s.GetMDMSolutionFuncInvoked = true
s.mu.Unlock()
return s.GetMDMSolutionFunc(ctx, mdmID)
}
func (s *DataStore) OSVersions(ctx context.Context, teamFilter *fleet.TeamFilter, platform *string, name *string, version *string) (*fleet.OSVersions, error) {
s.mu.Lock()
s.OSVersionsFuncInvoked = true
s.mu.Unlock()
return s.OSVersionsFunc(ctx, teamFilter, platform, name, version)
}
func (s *DataStore) OSVersionsByCVE(ctx context.Context, cve string, teamID *uint) ([]*fleet.VulnerableOS, time.Time, error) {
s.mu.Lock()
s.OSVersionsByCVEFuncInvoked = true
s.mu.Unlock()
return s.OSVersionsByCVEFunc(ctx, cve, teamID)
}
func (s *DataStore) SoftwareByCVE(ctx context.Context, cve string, teamID *uint) ([]*fleet.VulnerableSoftware, time.Time, error) {
s.mu.Lock()
s.SoftwareByCVEFuncInvoked = true
s.mu.Unlock()
return s.SoftwareByCVEFunc(ctx, cve, teamID)
}
func (s *DataStore) OSVersion(ctx context.Context, osVersionID uint, teamFilter *fleet.TeamFilter) (*fleet.OSVersion, *time.Time, error) {
s.mu.Lock()
s.OSVersionFuncInvoked = true
s.mu.Unlock()
return s.OSVersionFunc(ctx, osVersionID, teamFilter)
}
func (s *DataStore) UpdateOSVersions(ctx context.Context) error {
s.mu.Lock()
s.UpdateOSVersionsFuncInvoked = true
s.mu.Unlock()
return s.UpdateOSVersionsFunc(ctx)
}
func (s *DataStore) CountHostsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets, now time.Time) (fleet.TargetMetrics, error) {
s.mu.Lock()
s.CountHostsInTargetsFuncInvoked = true
s.mu.Unlock()
return s.CountHostsInTargetsFunc(ctx, filter, targets, now)
}
func (s *DataStore) HostIDsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets) ([]uint, error) {
s.mu.Lock()
s.HostIDsInTargetsFuncInvoked = true
s.mu.Unlock()
return s.HostIDsInTargetsFunc(ctx, filter, targets)
}
func (s *DataStore) NewPasswordResetRequest(ctx context.Context, req *fleet.PasswordResetRequest) (*fleet.PasswordResetRequest, error) {
s.mu.Lock()
s.NewPasswordResetRequestFuncInvoked = true
s.mu.Unlock()
return s.NewPasswordResetRequestFunc(ctx, req)
}
func (s *DataStore) DeletePasswordResetRequestsForUser(ctx context.Context, userID uint) error {
s.mu.Lock()
s.DeletePasswordResetRequestsForUserFuncInvoked = true
s.mu.Unlock()
return s.DeletePasswordResetRequestsForUserFunc(ctx, userID)
}
func (s *DataStore) FindPasswordResetByToken(ctx context.Context, token string) (*fleet.PasswordResetRequest, error) {
s.mu.Lock()
s.FindPasswordResetByTokenFuncInvoked = true
s.mu.Unlock()
return s.FindPasswordResetByTokenFunc(ctx, token)
}
func (s *DataStore) CleanupExpiredPasswordResetRequests(ctx context.Context) error {
s.mu.Lock()
s.CleanupExpiredPasswordResetRequestsFuncInvoked = true
s.mu.Unlock()
return s.CleanupExpiredPasswordResetRequestsFunc(ctx)
}
func (s *DataStore) SessionByKey(ctx context.Context, key string) (*fleet.Session, error) {
s.mu.Lock()
s.SessionByKeyFuncInvoked = true
s.mu.Unlock()
return s.SessionByKeyFunc(ctx, key)
}
func (s *DataStore) SessionByID(ctx context.Context, id uint) (*fleet.Session, error) {
s.mu.Lock()
s.SessionByIDFuncInvoked = true
s.mu.Unlock()
return s.SessionByIDFunc(ctx, id)
}
func (s *DataStore) ListSessionsForUser(ctx context.Context, id uint) ([]*fleet.Session, error) {
s.mu.Lock()
s.ListSessionsForUserFuncInvoked = true
s.mu.Unlock()
return s.ListSessionsForUserFunc(ctx, id)
}
func (s *DataStore) NewSession(ctx context.Context, userID uint, sessionKey string) (*fleet.Session, error) {
s.mu.Lock()
s.NewSessionFuncInvoked = true
s.mu.Unlock()
return s.NewSessionFunc(ctx, userID, sessionKey)
}
func (s *DataStore) DestroySession(ctx context.Context, session *fleet.Session) error {
s.mu.Lock()
s.DestroySessionFuncInvoked = true
s.mu.Unlock()
return s.DestroySessionFunc(ctx, session)
}
func (s *DataStore) DestroyAllSessionsForUser(ctx context.Context, id uint) error {
s.mu.Lock()
s.DestroyAllSessionsForUserFuncInvoked = true
s.mu.Unlock()
return s.DestroyAllSessionsForUserFunc(ctx, id)
}
func (s *DataStore) MarkSessionAccessed(ctx context.Context, session *fleet.Session) error {
s.mu.Lock()
s.MarkSessionAccessedFuncInvoked = true
s.mu.Unlock()
return s.MarkSessionAccessedFunc(ctx, session)
}
func (s *DataStore) NewAppConfig(ctx context.Context, info *fleet.AppConfig) (*fleet.AppConfig, error) {
s.mu.Lock()
s.NewAppConfigFuncInvoked = true
s.mu.Unlock()
return s.NewAppConfigFunc(ctx, info)
}
func (s *DataStore) AppConfig(ctx context.Context) (*fleet.AppConfig, error) {
s.mu.Lock()
s.AppConfigFuncInvoked = true
s.mu.Unlock()
return s.AppConfigFunc(ctx)
}
func (s *DataStore) SaveAppConfig(ctx context.Context, info *fleet.AppConfig) error {
s.mu.Lock()
s.SaveAppConfigFuncInvoked = true
s.mu.Unlock()
return s.SaveAppConfigFunc(ctx, info)
}
func (s *DataStore) GetEnrollSecrets(ctx context.Context, teamID *uint) ([]*fleet.EnrollSecret, error) {
s.mu.Lock()
s.GetEnrollSecretsFuncInvoked = true
s.mu.Unlock()
return s.GetEnrollSecretsFunc(ctx, teamID)
}
func (s *DataStore) ApplyEnrollSecrets(ctx context.Context, teamID *uint, secrets []*fleet.EnrollSecret) error {
s.mu.Lock()
s.ApplyEnrollSecretsFuncInvoked = true
s.mu.Unlock()
return s.ApplyEnrollSecretsFunc(ctx, teamID, secrets)
}
func (s *DataStore) AggregateEnrollSecretPerTeam(ctx context.Context) ([]*fleet.EnrollSecret, error) {
s.mu.Lock()
s.AggregateEnrollSecretPerTeamFuncInvoked = true
s.mu.Unlock()
return s.AggregateEnrollSecretPerTeamFunc(ctx)
}
func (s *DataStore) NewInvite(ctx context.Context, i *fleet.Invite) (*fleet.Invite, error) {
s.mu.Lock()
s.NewInviteFuncInvoked = true
s.mu.Unlock()
return s.NewInviteFunc(ctx, i)
}
func (s *DataStore) ListInvites(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Invite, error) {
s.mu.Lock()
s.ListInvitesFuncInvoked = true
s.mu.Unlock()
return s.ListInvitesFunc(ctx, opt)
}
func (s *DataStore) Invite(ctx context.Context, id uint) (*fleet.Invite, error) {
s.mu.Lock()
s.InviteFuncInvoked = true
s.mu.Unlock()
return s.InviteFunc(ctx, id)
}
func (s *DataStore) InviteByEmail(ctx context.Context, email string) (*fleet.Invite, error) {
s.mu.Lock()
s.InviteByEmailFuncInvoked = true
s.mu.Unlock()
return s.InviteByEmailFunc(ctx, email)
}
func (s *DataStore) InviteByToken(ctx context.Context, token string) (*fleet.Invite, error) {
s.mu.Lock()
s.InviteByTokenFuncInvoked = true
s.mu.Unlock()
return s.InviteByTokenFunc(ctx, token)
}
func (s *DataStore) DeleteInvite(ctx context.Context, id uint) error {
s.mu.Lock()
s.DeleteInviteFuncInvoked = true
s.mu.Unlock()
return s.DeleteInviteFunc(ctx, id)
}
func (s *DataStore) UpdateInvite(ctx context.Context, id uint, i *fleet.Invite) (*fleet.Invite, error) {
s.mu.Lock()
s.UpdateInviteFuncInvoked = true
s.mu.Unlock()
return s.UpdateInviteFunc(ctx, id, i)
}
func (s *DataStore) ListScheduledQueriesInPackWithStats(ctx context.Context, id uint, opts fleet.ListOptions) ([]*fleet.ScheduledQuery, error) {
s.mu.Lock()
s.ListScheduledQueriesInPackWithStatsFuncInvoked = true
s.mu.Unlock()
return s.ListScheduledQueriesInPackWithStatsFunc(ctx, id, opts)
}
func (s *DataStore) NewScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery, opts ...fleet.OptionalArg) (*fleet.ScheduledQuery, error) {
s.mu.Lock()
s.NewScheduledQueryFuncInvoked = true
s.mu.Unlock()
return s.NewScheduledQueryFunc(ctx, sq, opts...)
}
func (s *DataStore) SaveScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery) (*fleet.ScheduledQuery, error) {
s.mu.Lock()
s.SaveScheduledQueryFuncInvoked = true
s.mu.Unlock()
return s.SaveScheduledQueryFunc(ctx, sq)
}
func (s *DataStore) DeleteScheduledQuery(ctx context.Context, id uint) error {
s.mu.Lock()
s.DeleteScheduledQueryFuncInvoked = true
s.mu.Unlock()
return s.DeleteScheduledQueryFunc(ctx, id)
}
func (s *DataStore) ScheduledQuery(ctx context.Context, id uint) (*fleet.ScheduledQuery, error) {
s.mu.Lock()
s.ScheduledQueryFuncInvoked = true
s.mu.Unlock()
return s.ScheduledQueryFunc(ctx, id)
}
func (s *DataStore) CleanupExpiredHosts(ctx context.Context) ([]uint, error) {
s.mu.Lock()
s.CleanupExpiredHostsFuncInvoked = true
s.mu.Unlock()
return s.CleanupExpiredHostsFunc(ctx)
}
func (s *DataStore) ScheduledQueryIDsByName(ctx context.Context, batchSize int, packAndSchedQueryNames ...[2]string) ([]uint, error) {
s.mu.Lock()
s.ScheduledQueryIDsByNameFuncInvoked = true
s.mu.Unlock()
return s.ScheduledQueryIDsByNameFunc(ctx, batchSize, packAndSchedQueryNames...)
}
func (s *DataStore) QueryResultRows(ctx context.Context, queryID uint, filter fleet.TeamFilter) ([]*fleet.ScheduledQueryResultRow, error) {
s.mu.Lock()
s.QueryResultRowsFuncInvoked = true
s.mu.Unlock()
return s.QueryResultRowsFunc(ctx, queryID, filter)
}
func (s *DataStore) QueryResultRowsForHost(ctx context.Context, queryID uint, hostID uint) ([]*fleet.ScheduledQueryResultRow, error) {
s.mu.Lock()
s.QueryResultRowsForHostFuncInvoked = true
s.mu.Unlock()
return s.QueryResultRowsForHostFunc(ctx, queryID, hostID)
}
func (s *DataStore) ResultCountForQuery(ctx context.Context, queryID uint) (int, error) {
s.mu.Lock()
s.ResultCountForQueryFuncInvoked = true
s.mu.Unlock()
return s.ResultCountForQueryFunc(ctx, queryID)
}
func (s *DataStore) ResultCountForQueryAndHost(ctx context.Context, queryID uint, hostID uint) (int, error) {
s.mu.Lock()
s.ResultCountForQueryAndHostFuncInvoked = true
s.mu.Unlock()
return s.ResultCountForQueryAndHostFunc(ctx, queryID, hostID)
}
func (s *DataStore) OverwriteQueryResultRows(ctx context.Context, rows []*fleet.ScheduledQueryResultRow) error {
s.mu.Lock()
s.OverwriteQueryResultRowsFuncInvoked = true
s.mu.Unlock()
return s.OverwriteQueryResultRowsFunc(ctx, rows)
}
func (s *DataStore) CleanupDiscardedQueryResults(ctx context.Context) error {
s.mu.Lock()
s.CleanupDiscardedQueryResultsFuncInvoked = true
s.mu.Unlock()
return s.CleanupDiscardedQueryResultsFunc(ctx)
}
func (s *DataStore) NewTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
s.mu.Lock()
s.NewTeamFuncInvoked = true
s.mu.Unlock()
return s.NewTeamFunc(ctx, team)
}
func (s *DataStore) SaveTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
s.mu.Lock()
s.SaveTeamFuncInvoked = true
s.mu.Unlock()
return s.SaveTeamFunc(ctx, team)
}
func (s *DataStore) Team(ctx context.Context, tid uint) (*fleet.Team, error) {
s.mu.Lock()
s.TeamFuncInvoked = true
s.mu.Unlock()
return s.TeamFunc(ctx, tid)
}
func (s *DataStore) DeleteTeam(ctx context.Context, tid uint) error {
s.mu.Lock()
s.DeleteTeamFuncInvoked = true
s.mu.Unlock()
return s.DeleteTeamFunc(ctx, tid)
}
func (s *DataStore) TeamByName(ctx context.Context, name string) (*fleet.Team, error) {
s.mu.Lock()
s.TeamByNameFuncInvoked = true
s.mu.Unlock()
return s.TeamByNameFunc(ctx, name)
}
func (s *DataStore) ListTeams(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Team, error) {
s.mu.Lock()
s.ListTeamsFuncInvoked = true
s.mu.Unlock()
return s.ListTeamsFunc(ctx, filter, opt)
}
func (s *DataStore) TeamsSummary(ctx context.Context) ([]*fleet.TeamSummary, error) {
s.mu.Lock()
s.TeamsSummaryFuncInvoked = true
s.mu.Unlock()
return s.TeamsSummaryFunc(ctx)
}
func (s *DataStore) SearchTeams(ctx context.Context, filter fleet.TeamFilter, matchQuery string, omit ...uint) ([]*fleet.Team, error) {
s.mu.Lock()
s.SearchTeamsFuncInvoked = true
s.mu.Unlock()
return s.SearchTeamsFunc(ctx, filter, matchQuery, omit...)
}
func (s *DataStore) TeamEnrollSecrets(ctx context.Context, teamID uint) ([]*fleet.EnrollSecret, error) {
s.mu.Lock()
s.TeamEnrollSecretsFuncInvoked = true
s.mu.Unlock()
return s.TeamEnrollSecretsFunc(ctx, teamID)
}
func (s *DataStore) DeleteIntegrationsFromTeams(ctx context.Context, deletedIntgs fleet.Integrations) error {
s.mu.Lock()
s.DeleteIntegrationsFromTeamsFuncInvoked = true
s.mu.Unlock()
return s.DeleteIntegrationsFromTeamsFunc(ctx, deletedIntgs)
}
func (s *DataStore) TeamExists(ctx context.Context, teamID uint) (bool, error) {
s.mu.Lock()
s.TeamExistsFuncInvoked = true
s.mu.Unlock()
return s.TeamExistsFunc(ctx, teamID)
}
func (s *DataStore) ListSoftwareTitles(ctx context.Context, opt fleet.SoftwareTitleListOptions, tmFilter fleet.TeamFilter) ([]fleet.SoftwareTitle, int, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListSoftwareTitlesFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareTitlesFunc(ctx, opt, tmFilter)
}
func (s *DataStore) SoftwareTitleByID(ctx context.Context, id uint, teamID *uint, tmFilter fleet.TeamFilter) (*fleet.SoftwareTitle, error) {
s.mu.Lock()
s.SoftwareTitleByIDFuncInvoked = true
s.mu.Unlock()
return s.SoftwareTitleByIDFunc(ctx, id, teamID, tmFilter)
}
func (s *DataStore) ListSoftwareForVulnDetection(ctx context.Context, hostID uint) ([]fleet.Software, error) {
s.mu.Lock()
s.ListSoftwareForVulnDetectionFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareForVulnDetectionFunc(ctx, hostID)
}
func (s *DataStore) ListSoftwareVulnerabilitiesByHostIDsSource(ctx context.Context, hostIDs []uint, source fleet.VulnerabilitySource) (map[uint][]fleet.SoftwareVulnerability, error) {
s.mu.Lock()
s.ListSoftwareVulnerabilitiesByHostIDsSourceFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareVulnerabilitiesByHostIDsSourceFunc(ctx, hostIDs, source)
}
func (s *DataStore) LoadHostSoftware(ctx context.Context, host *fleet.Host, includeCVEScores bool) error {
s.mu.Lock()
s.LoadHostSoftwareFuncInvoked = true
s.mu.Unlock()
return s.LoadHostSoftwareFunc(ctx, host, includeCVEScores)
}
func (s *DataStore) AllSoftwareIterator(ctx context.Context, query fleet.SoftwareIterQueryOptions) (fleet.SoftwareIterator, error) {
s.mu.Lock()
s.AllSoftwareIteratorFuncInvoked = true
s.mu.Unlock()
return s.AllSoftwareIteratorFunc(ctx, query)
}
func (s *DataStore) UpsertSoftwareCPEs(ctx context.Context, cpes []fleet.SoftwareCPE) (int64, error) {
s.mu.Lock()
s.UpsertSoftwareCPEsFuncInvoked = true
s.mu.Unlock()
return s.UpsertSoftwareCPEsFunc(ctx, cpes)
}
func (s *DataStore) DeleteSoftwareCPEs(ctx context.Context, cpes []fleet.SoftwareCPE) (int64, error) {
s.mu.Lock()
s.DeleteSoftwareCPEsFuncInvoked = true
s.mu.Unlock()
return s.DeleteSoftwareCPEsFunc(ctx, cpes)
}
func (s *DataStore) ListSoftwareCPEs(ctx context.Context) ([]fleet.SoftwareCPE, error) {
s.mu.Lock()
s.ListSoftwareCPEsFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareCPEsFunc(ctx)
}
func (s *DataStore) InsertSoftwareVulnerability(ctx context.Context, vuln fleet.SoftwareVulnerability, source fleet.VulnerabilitySource) (bool, error) {
s.mu.Lock()
s.InsertSoftwareVulnerabilityFuncInvoked = true
s.mu.Unlock()
return s.InsertSoftwareVulnerabilityFunc(ctx, vuln, source)
}
func (s *DataStore) SoftwareByID(ctx context.Context, id uint, teamID *uint, includeCVEScores bool, tmFilter *fleet.TeamFilter) (*fleet.Software, error) {
s.mu.Lock()
s.SoftwareByIDFuncInvoked = true
s.mu.Unlock()
return s.SoftwareByIDFunc(ctx, id, teamID, includeCVEScores, tmFilter)
}
func (s *DataStore) ListSoftwareByHostIDShort(ctx context.Context, hostID uint) ([]fleet.Software, error) {
s.mu.Lock()
s.ListSoftwareByHostIDShortFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareByHostIDShortFunc(ctx, hostID)
}
func (s *DataStore) SyncHostsSoftware(ctx context.Context, updatedAt time.Time) error {
s.mu.Lock()
s.SyncHostsSoftwareFuncInvoked = true
s.mu.Unlock()
return s.SyncHostsSoftwareFunc(ctx, updatedAt)
}
func (s *DataStore) ReconcileSoftwareTitles(ctx context.Context) error {
s.mu.Lock()
s.ReconcileSoftwareTitlesFuncInvoked = true
s.mu.Unlock()
return s.ReconcileSoftwareTitlesFunc(ctx)
}
func (s *DataStore) SyncHostsSoftwareTitles(ctx context.Context, updatedAt time.Time) error {
s.mu.Lock()
s.SyncHostsSoftwareTitlesFuncInvoked = true
s.mu.Unlock()
return s.SyncHostsSoftwareTitlesFunc(ctx, updatedAt)
}
func (s *DataStore) HostVulnSummariesBySoftwareIDs(ctx context.Context, softwareIDs []uint) ([]fleet.HostVulnerabilitySummary, error) {
s.mu.Lock()
s.HostVulnSummariesBySoftwareIDsFuncInvoked = true
s.mu.Unlock()
return s.HostVulnSummariesBySoftwareIDsFunc(ctx, softwareIDs)
}
func (s *DataStore) HostsByCVE(ctx context.Context, cve string) ([]fleet.HostVulnerabilitySummary, error) {
s.mu.Lock()
s.HostsByCVEFuncInvoked = true
s.mu.Unlock()
return s.HostsByCVEFunc(ctx, cve)
}
func (s *DataStore) InsertCVEMeta(ctx context.Context, cveMeta []fleet.CVEMeta) error {
s.mu.Lock()
s.InsertCVEMetaFuncInvoked = true
s.mu.Unlock()
return s.InsertCVEMetaFunc(ctx, cveMeta)
}
func (s *DataStore) ListCVEs(ctx context.Context, maxAge time.Duration) ([]fleet.CVEMeta, error) {
s.mu.Lock()
s.ListCVEsFuncInvoked = true
s.mu.Unlock()
return s.ListCVEsFunc(ctx, maxAge)
}
func (s *DataStore) ListOperatingSystems(ctx context.Context) ([]fleet.OperatingSystem, error) {
s.mu.Lock()
s.ListOperatingSystemsFuncInvoked = true
s.mu.Unlock()
return s.ListOperatingSystemsFunc(ctx)
}
func (s *DataStore) ListOperatingSystemsForPlatform(ctx context.Context, platform string) ([]fleet.OperatingSystem, error) {
s.mu.Lock()
s.ListOperatingSystemsForPlatformFuncInvoked = true
s.mu.Unlock()
return s.ListOperatingSystemsForPlatformFunc(ctx, platform)
}
func (s *DataStore) UpdateHostOperatingSystem(ctx context.Context, hostID uint, hostOS fleet.OperatingSystem) error {
s.mu.Lock()
s.UpdateHostOperatingSystemFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostOperatingSystemFunc(ctx, hostID, hostOS)
}
func (s *DataStore) CleanupHostOperatingSystems(ctx context.Context) error {
s.mu.Lock()
s.CleanupHostOperatingSystemsFuncInvoked = true
s.mu.Unlock()
return s.CleanupHostOperatingSystemsFunc(ctx)
}
func (s *DataStore) UpdateHostTablesOnMDMUnenroll(ctx context.Context, uuid string) error {
s.mu.Lock()
s.UpdateHostTablesOnMDMUnenrollFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostTablesOnMDMUnenrollFunc(ctx, uuid)
}
func (s *DataStore) NewActivity(ctx context.Context, user *fleet.User, activity fleet.ActivityDetails) error {
s.mu.Lock()
s.NewActivityFuncInvoked = true
s.mu.Unlock()
return s.NewActivityFunc(ctx, user, activity)
}
func (s *DataStore) ListActivities(ctx context.Context, opt fleet.ListActivitiesOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListActivitiesFuncInvoked = true
s.mu.Unlock()
return s.ListActivitiesFunc(ctx, opt)
}
func (s *DataStore) MarkActivitiesAsStreamed(ctx context.Context, activityIDs []uint) error {
s.mu.Lock()
s.MarkActivitiesAsStreamedFuncInvoked = true
s.mu.Unlock()
return s.MarkActivitiesAsStreamedFunc(ctx, activityIDs)
}
func (s *DataStore) ListHostUpcomingActivities(ctx context.Context, hostID uint, opt fleet.ListOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListHostUpcomingActivitiesFuncInvoked = true
s.mu.Unlock()
return s.ListHostUpcomingActivitiesFunc(ctx, hostID, opt)
}
func (s *DataStore) ListHostPastActivities(ctx context.Context, hostID uint, opt fleet.ListOptions) ([]*fleet.Activity, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListHostPastActivitiesFuncInvoked = true
s.mu.Unlock()
return s.ListHostPastActivitiesFunc(ctx, hostID, opt)
}
func (s *DataStore) IsExecutionPendingForHost(ctx context.Context, hostID uint, scriptID uint) ([]*uint, error) {
s.mu.Lock()
s.IsExecutionPendingForHostFuncInvoked = true
s.mu.Unlock()
return s.IsExecutionPendingForHostFunc(ctx, hostID, scriptID)
}
func (s *DataStore) ShouldSendStatistics(ctx context.Context, frequency time.Duration, config config.FleetConfig) (fleet.StatisticsPayload, bool, error) {
s.mu.Lock()
s.ShouldSendStatisticsFuncInvoked = true
s.mu.Unlock()
return s.ShouldSendStatisticsFunc(ctx, frequency, config)
}
func (s *DataStore) RecordStatisticsSent(ctx context.Context) error {
s.mu.Lock()
s.RecordStatisticsSentFuncInvoked = true
s.mu.Unlock()
return s.RecordStatisticsSentFunc(ctx)
}
func (s *DataStore) CleanupStatistics(ctx context.Context) error {
s.mu.Lock()
s.CleanupStatisticsFuncInvoked = true
s.mu.Unlock()
return s.CleanupStatisticsFunc(ctx)
}
func (s *DataStore) ApplyPolicySpecs(ctx context.Context, authorID uint, specs []*fleet.PolicySpec) error {
s.mu.Lock()
s.ApplyPolicySpecsFuncInvoked = true
s.mu.Unlock()
return s.ApplyPolicySpecsFunc(ctx, authorID, specs)
}
func (s *DataStore) NewGlobalPolicy(ctx context.Context, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
s.mu.Lock()
s.NewGlobalPolicyFuncInvoked = true
s.mu.Unlock()
return s.NewGlobalPolicyFunc(ctx, authorID, args)
}
func (s *DataStore) Policy(ctx context.Context, id uint) (*fleet.Policy, error) {
s.mu.Lock()
s.PolicyFuncInvoked = true
s.mu.Unlock()
return s.PolicyFunc(ctx, id)
}
func (s *DataStore) SavePolicy(ctx context.Context, p *fleet.Policy, shouldRemoveAllPolicyMemberships bool) error {
s.mu.Lock()
s.SavePolicyFuncInvoked = true
s.mu.Unlock()
return s.SavePolicyFunc(ctx, p, shouldRemoveAllPolicyMemberships)
}
func (s *DataStore) ListGlobalPolicies(ctx context.Context, opts fleet.ListOptions) ([]*fleet.Policy, error) {
s.mu.Lock()
s.ListGlobalPoliciesFuncInvoked = true
s.mu.Unlock()
return s.ListGlobalPoliciesFunc(ctx, opts)
}
func (s *DataStore) PoliciesByID(ctx context.Context, ids []uint) (map[uint]*fleet.Policy, error) {
s.mu.Lock()
s.PoliciesByIDFuncInvoked = true
s.mu.Unlock()
return s.PoliciesByIDFunc(ctx, ids)
}
func (s *DataStore) DeleteGlobalPolicies(ctx context.Context, ids []uint) ([]uint, error) {
s.mu.Lock()
s.DeleteGlobalPoliciesFuncInvoked = true
s.mu.Unlock()
return s.DeleteGlobalPoliciesFunc(ctx, ids)
}
func (s *DataStore) CountPolicies(ctx context.Context, teamID *uint, matchQuery string) (int, error) {
s.mu.Lock()
s.CountPoliciesFuncInvoked = true
s.mu.Unlock()
return s.CountPoliciesFunc(ctx, teamID, matchQuery)
}
func (s *DataStore) UpdateHostPolicyCounts(ctx context.Context) error {
s.mu.Lock()
s.UpdateHostPolicyCountsFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostPolicyCountsFunc(ctx)
}
func (s *DataStore) PolicyQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
s.mu.Lock()
s.PolicyQueriesForHostFuncInvoked = true
s.mu.Unlock()
return s.PolicyQueriesForHostFunc(ctx, host)
}
func (s *DataStore) GetTeamHostsPolicyMemberships(ctx context.Context, domain string, teamID uint, policyIDs []uint) ([]fleet.HostPolicyMembershipData, error) {
s.mu.Lock()
s.GetTeamHostsPolicyMembershipsFuncInvoked = true
s.mu.Unlock()
return s.GetTeamHostsPolicyMembershipsFunc(ctx, domain, teamID, policyIDs)
}
func (s *DataStore) GetCalendarPolicies(ctx context.Context, teamID uint) ([]fleet.PolicyCalendarData, error) {
s.mu.Lock()
s.GetCalendarPoliciesFuncInvoked = true
s.mu.Unlock()
return s.GetCalendarPoliciesFunc(ctx, teamID)
}
func (s *DataStore) AsyncBatchInsertPolicyMembership(ctx context.Context, batch []fleet.PolicyMembershipResult) error {
s.mu.Lock()
s.AsyncBatchInsertPolicyMembershipFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchInsertPolicyMembershipFunc(ctx, batch)
}
func (s *DataStore) AsyncBatchUpdatePolicyTimestamp(ctx context.Context, ids []uint, ts time.Time) error {
s.mu.Lock()
s.AsyncBatchUpdatePolicyTimestampFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchUpdatePolicyTimestampFunc(ctx, ids, ts)
}
func (s *DataStore) MigrateTables(ctx context.Context) error {
s.mu.Lock()
s.MigrateTablesFuncInvoked = true
s.mu.Unlock()
return s.MigrateTablesFunc(ctx)
}
func (s *DataStore) MigrateData(ctx context.Context) error {
s.mu.Lock()
s.MigrateDataFuncInvoked = true
s.mu.Unlock()
return s.MigrateDataFunc(ctx)
}
func (s *DataStore) MigrationStatus(ctx context.Context) (*fleet.MigrationStatus, error) {
s.mu.Lock()
s.MigrationStatusFuncInvoked = true
s.mu.Unlock()
return s.MigrationStatusFunc(ctx)
}
func (s *DataStore) ListSoftware(ctx context.Context, opt fleet.SoftwareListOptions) ([]fleet.Software, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListSoftwareFuncInvoked = true
s.mu.Unlock()
return s.ListSoftwareFunc(ctx, opt)
}
func (s *DataStore) CountSoftware(ctx context.Context, opt fleet.SoftwareListOptions) (int, error) {
s.mu.Lock()
s.CountSoftwareFuncInvoked = true
s.mu.Unlock()
return s.CountSoftwareFunc(ctx, opt)
}
func (s *DataStore) DeleteSoftwareVulnerabilities(ctx context.Context, vulnerabilities []fleet.SoftwareVulnerability) error {
s.mu.Lock()
s.DeleteSoftwareVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.DeleteSoftwareVulnerabilitiesFunc(ctx, vulnerabilities)
}
func (s *DataStore) DeleteOutOfDateVulnerabilities(ctx context.Context, source fleet.VulnerabilitySource, duration time.Duration) error {
s.mu.Lock()
s.DeleteOutOfDateVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.DeleteOutOfDateVulnerabilitiesFunc(ctx, source, duration)
}
func (s *DataStore) CreateOrUpdateCalendarEvent(ctx context.Context, email string, startTime time.Time, endTime time.Time, data []byte, hostID uint, webhookStatus fleet.CalendarWebhookStatus) (*fleet.CalendarEvent, error) {
s.mu.Lock()
s.CreateOrUpdateCalendarEventFuncInvoked = true
s.mu.Unlock()
return s.CreateOrUpdateCalendarEventFunc(ctx, email, startTime, endTime, data, hostID, webhookStatus)
}
func (s *DataStore) GetCalendarEvent(ctx context.Context, email string) (*fleet.CalendarEvent, error) {
s.mu.Lock()
s.GetCalendarEventFuncInvoked = true
s.mu.Unlock()
return s.GetCalendarEventFunc(ctx, email)
}
func (s *DataStore) DeleteCalendarEvent(ctx context.Context, calendarEventID uint) error {
s.mu.Lock()
s.DeleteCalendarEventFuncInvoked = true
s.mu.Unlock()
return s.DeleteCalendarEventFunc(ctx, calendarEventID)
}
func (s *DataStore) UpdateCalendarEvent(ctx context.Context, calendarEventID uint, startTime time.Time, endTime time.Time, data []byte) error {
s.mu.Lock()
s.UpdateCalendarEventFuncInvoked = true
s.mu.Unlock()
return s.UpdateCalendarEventFunc(ctx, calendarEventID, startTime, endTime, data)
}
func (s *DataStore) GetHostCalendarEvent(ctx context.Context, hostID uint) (*fleet.HostCalendarEvent, *fleet.CalendarEvent, error) {
s.mu.Lock()
s.GetHostCalendarEventFuncInvoked = true
s.mu.Unlock()
return s.GetHostCalendarEventFunc(ctx, hostID)
}
func (s *DataStore) GetHostCalendarEventByEmail(ctx context.Context, email string) (*fleet.HostCalendarEvent, *fleet.CalendarEvent, error) {
s.mu.Lock()
s.GetHostCalendarEventByEmailFuncInvoked = true
s.mu.Unlock()
return s.GetHostCalendarEventByEmailFunc(ctx, email)
}
func (s *DataStore) UpdateHostCalendarWebhookStatus(ctx context.Context, hostID uint, status fleet.CalendarWebhookStatus) error {
s.mu.Lock()
s.UpdateHostCalendarWebhookStatusFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostCalendarWebhookStatusFunc(ctx, hostID, status)
}
func (s *DataStore) ListCalendarEvents(ctx context.Context, teamID *uint) ([]*fleet.CalendarEvent, error) {
s.mu.Lock()
s.ListCalendarEventsFuncInvoked = true
s.mu.Unlock()
return s.ListCalendarEventsFunc(ctx, teamID)
}
func (s *DataStore) ListOutOfDateCalendarEvents(ctx context.Context, t time.Time) ([]*fleet.CalendarEvent, error) {
s.mu.Lock()
s.ListOutOfDateCalendarEventsFuncInvoked = true
s.mu.Unlock()
return s.ListOutOfDateCalendarEventsFunc(ctx, t)
}
func (s *DataStore) NewTeamPolicy(ctx context.Context, teamID uint, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
s.mu.Lock()
s.NewTeamPolicyFuncInvoked = true
s.mu.Unlock()
return s.NewTeamPolicyFunc(ctx, teamID, authorID, args)
}
func (s *DataStore) ListTeamPolicies(ctx context.Context, teamID uint, opts fleet.ListOptions, iopts fleet.ListOptions) (teamPolicies []*fleet.Policy, inheritedPolicies []*fleet.Policy, err error) {
s.mu.Lock()
s.ListTeamPoliciesFuncInvoked = true
s.mu.Unlock()
return s.ListTeamPoliciesFunc(ctx, teamID, opts, iopts)
}
func (s *DataStore) DeleteTeamPolicies(ctx context.Context, teamID uint, ids []uint) ([]uint, error) {
s.mu.Lock()
s.DeleteTeamPoliciesFuncInvoked = true
s.mu.Unlock()
return s.DeleteTeamPoliciesFunc(ctx, teamID, ids)
}
func (s *DataStore) TeamPolicy(ctx context.Context, teamID uint, policyID uint) (*fleet.Policy, error) {
s.mu.Lock()
s.TeamPolicyFuncInvoked = true
s.mu.Unlock()
return s.TeamPolicyFunc(ctx, teamID, policyID)
}
func (s *DataStore) CleanupPolicyMembership(ctx context.Context, now time.Time) error {
s.mu.Lock()
s.CleanupPolicyMembershipFuncInvoked = true
s.mu.Unlock()
return s.CleanupPolicyMembershipFunc(ctx, now)
}
func (s *DataStore) IncrementPolicyViolationDays(ctx context.Context) error {
s.mu.Lock()
s.IncrementPolicyViolationDaysFuncInvoked = true
s.mu.Unlock()
return s.IncrementPolicyViolationDaysFunc(ctx)
}
func (s *DataStore) InitializePolicyViolationDays(ctx context.Context) error {
s.mu.Lock()
s.InitializePolicyViolationDaysFuncInvoked = true
s.mu.Unlock()
return s.InitializePolicyViolationDaysFunc(ctx)
}
func (s *DataStore) Lock(ctx context.Context, name string, owner string, expiration time.Duration) (bool, error) {
s.mu.Lock()
s.LockFuncInvoked = true
s.mu.Unlock()
return s.LockFunc(ctx, name, owner, expiration)
}
func (s *DataStore) Unlock(ctx context.Context, name string, owner string) error {
s.mu.Lock()
s.UnlockFuncInvoked = true
s.mu.Unlock()
return s.UnlockFunc(ctx, name, owner)
}
func (s *DataStore) DBLocks(ctx context.Context) ([]*fleet.DBLock, error) {
s.mu.Lock()
s.DBLocksFuncInvoked = true
s.mu.Unlock()
return s.DBLocksFunc(ctx)
}
func (s *DataStore) GetLatestCronStats(ctx context.Context, name string) ([]fleet.CronStats, error) {
s.mu.Lock()
s.GetLatestCronStatsFuncInvoked = true
s.mu.Unlock()
return s.GetLatestCronStatsFunc(ctx, name)
}
func (s *DataStore) InsertCronStats(ctx context.Context, statsType fleet.CronStatsType, name string, instance string, status fleet.CronStatsStatus) (int, error) {
s.mu.Lock()
s.InsertCronStatsFuncInvoked = true
s.mu.Unlock()
return s.InsertCronStatsFunc(ctx, statsType, name, instance, status)
}
func (s *DataStore) UpdateCronStats(ctx context.Context, id int, status fleet.CronStatsStatus) error {
s.mu.Lock()
s.UpdateCronStatsFuncInvoked = true
s.mu.Unlock()
return s.UpdateCronStatsFunc(ctx, id, status)
}
func (s *DataStore) UpdateAllCronStatsForInstance(ctx context.Context, instance string, fromStatus fleet.CronStatsStatus, toStatus fleet.CronStatsStatus) error {
s.mu.Lock()
s.UpdateAllCronStatsForInstanceFuncInvoked = true
s.mu.Unlock()
return s.UpdateAllCronStatsForInstanceFunc(ctx, instance, fromStatus, toStatus)
}
func (s *DataStore) CleanupCronStats(ctx context.Context) error {
s.mu.Lock()
s.CleanupCronStatsFuncInvoked = true
s.mu.Unlock()
return s.CleanupCronStatsFunc(ctx)
}
func (s *DataStore) UpdateQueryAggregatedStats(ctx context.Context) error {
s.mu.Lock()
s.UpdateQueryAggregatedStatsFuncInvoked = true
s.mu.Unlock()
return s.UpdateQueryAggregatedStatsFunc(ctx)
}
func (s *DataStore) LoadHostByNodeKey(ctx context.Context, nodeKey string) (*fleet.Host, error) {
s.mu.Lock()
s.LoadHostByNodeKeyFuncInvoked = true
s.mu.Unlock()
return s.LoadHostByNodeKeyFunc(ctx, nodeKey)
}
func (s *DataStore) LoadHostByOrbitNodeKey(ctx context.Context, nodeKey string) (*fleet.Host, error) {
s.mu.Lock()
s.LoadHostByOrbitNodeKeyFuncInvoked = true
s.mu.Unlock()
return s.LoadHostByOrbitNodeKeyFunc(ctx, nodeKey)
}
func (s *DataStore) HostLite(ctx context.Context, hostID uint) (*fleet.Host, error) {
s.mu.Lock()
s.HostLiteFuncInvoked = true
s.mu.Unlock()
return s.HostLiteFunc(ctx, hostID)
}
func (s *DataStore) UpdateHostOsqueryIntervals(ctx context.Context, hostID uint, intervals fleet.HostOsqueryIntervals) error {
s.mu.Lock()
s.UpdateHostOsqueryIntervalsFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostOsqueryIntervalsFunc(ctx, hostID, intervals)
}
func (s *DataStore) TeamAgentOptions(ctx context.Context, teamID uint) (*json.RawMessage, error) {
s.mu.Lock()
s.TeamAgentOptionsFuncInvoked = true
s.mu.Unlock()
return s.TeamAgentOptionsFunc(ctx, teamID)
}
func (s *DataStore) TeamFeatures(ctx context.Context, teamID uint) (*fleet.Features, error) {
s.mu.Lock()
s.TeamFeaturesFuncInvoked = true
s.mu.Unlock()
return s.TeamFeaturesFunc(ctx, teamID)
}
func (s *DataStore) TeamMDMConfig(ctx context.Context, teamID uint) (*fleet.TeamMDM, error) {
s.mu.Lock()
s.TeamMDMConfigFuncInvoked = true
s.mu.Unlock()
return s.TeamMDMConfigFunc(ctx, teamID)
}
func (s *DataStore) SaveHostPackStats(ctx context.Context, teamID *uint, hostID uint, stats []fleet.PackStats) error {
s.mu.Lock()
s.SaveHostPackStatsFuncInvoked = true
s.mu.Unlock()
return s.SaveHostPackStatsFunc(ctx, teamID, hostID, stats)
}
func (s *DataStore) AsyncBatchSaveHostsScheduledQueryStats(ctx context.Context, stats map[uint][]fleet.ScheduledQueryStats, batchSize int) (int, error) {
s.mu.Lock()
s.AsyncBatchSaveHostsScheduledQueryStatsFuncInvoked = true
s.mu.Unlock()
return s.AsyncBatchSaveHostsScheduledQueryStatsFunc(ctx, stats, batchSize)
}
func (s *DataStore) UpdateHostSoftware(ctx context.Context, hostID uint, software []fleet.Software) (*fleet.UpdateHostSoftwareDBResult, error) {
s.mu.Lock()
s.UpdateHostSoftwareFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostSoftwareFunc(ctx, hostID, software)
}
func (s *DataStore) UpdateHostSoftwareInstalledPaths(ctx context.Context, hostID uint, reported map[string]struct{}, mutationResults *fleet.UpdateHostSoftwareDBResult) error {
s.mu.Lock()
s.UpdateHostSoftwareInstalledPathsFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostSoftwareInstalledPathsFunc(ctx, hostID, reported, mutationResults)
}
func (s *DataStore) UpdateHost(ctx context.Context, host *fleet.Host) error {
s.mu.Lock()
s.UpdateHostFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostFunc(ctx, host)
}
func (s *DataStore) ListScheduledQueriesInPack(ctx context.Context, packID uint) (fleet.ScheduledQueryList, error) {
s.mu.Lock()
s.ListScheduledQueriesInPackFuncInvoked = true
s.mu.Unlock()
return s.ListScheduledQueriesInPackFunc(ctx, packID)
}
func (s *DataStore) UpdateHostRefetchRequested(ctx context.Context, hostID uint, value bool) error {
s.mu.Lock()
s.UpdateHostRefetchRequestedFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostRefetchRequestedFunc(ctx, hostID, value)
}
func (s *DataStore) UpdateHostRefetchCriticalQueriesUntil(ctx context.Context, hostID uint, until *time.Time) error {
s.mu.Lock()
s.UpdateHostRefetchCriticalQueriesUntilFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostRefetchCriticalQueriesUntilFunc(ctx, hostID, until)
}
func (s *DataStore) FlippingPoliciesForHost(ctx context.Context, hostID uint, incomingResults map[uint]*bool) (newFailing []uint, newPassing []uint, err error) {
s.mu.Lock()
s.FlippingPoliciesForHostFuncInvoked = true
s.mu.Unlock()
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.mu.Lock()
s.RecordPolicyQueryExecutionsFuncInvoked = true
s.mu.Unlock()
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.mu.Lock()
s.RecordLabelQueryExecutionsFuncInvoked = true
s.mu.Unlock()
return s.RecordLabelQueryExecutionsFunc(ctx, host, results, t, deferredSaveHost)
}
func (s *DataStore) SaveHostUsers(ctx context.Context, hostID uint, users []fleet.HostUser) error {
s.mu.Lock()
s.SaveHostUsersFuncInvoked = true
s.mu.Unlock()
return s.SaveHostUsersFunc(ctx, hostID, users)
}
func (s *DataStore) SaveHostAdditional(ctx context.Context, hostID uint, additional *json.RawMessage) error {
s.mu.Lock()
s.SaveHostAdditionalFuncInvoked = true
s.mu.Unlock()
return s.SaveHostAdditionalFunc(ctx, hostID, additional)
}
func (s *DataStore) SetOrUpdateMunkiInfo(ctx context.Context, hostID uint, version string, errors []string, warnings []string) error {
s.mu.Lock()
s.SetOrUpdateMunkiInfoFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateMunkiInfoFunc(ctx, hostID, version, errors, warnings)
}
func (s *DataStore) SetOrUpdateMDMData(ctx context.Context, hostID uint, isServer bool, enrolled bool, serverURL string, installedFromDep bool, name string, fleetEnrollRef string) error {
s.mu.Lock()
s.SetOrUpdateMDMDataFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateMDMDataFunc(ctx, hostID, isServer, enrolled, serverURL, installedFromDep, name, fleetEnrollRef)
}
func (s *DataStore) SetOrUpdateHostEmailsFromMdmIdpAccounts(ctx context.Context, hostID uint, fleetEnrollmentRef string) error {
s.mu.Lock()
s.SetOrUpdateHostEmailsFromMdmIdpAccountsFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateHostEmailsFromMdmIdpAccountsFunc(ctx, hostID, fleetEnrollmentRef)
}
func (s *DataStore) SetOrUpdateHostDisksSpace(ctx context.Context, hostID uint, gigsAvailable float64, percentAvailable float64, gigsTotal float64) error {
s.mu.Lock()
s.SetOrUpdateHostDisksSpaceFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateHostDisksSpaceFunc(ctx, hostID, gigsAvailable, percentAvailable, gigsTotal)
}
func (s *DataStore) SetOrUpdateHostDisksEncryption(ctx context.Context, hostID uint, encrypted bool) error {
s.mu.Lock()
s.SetOrUpdateHostDisksEncryptionFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateHostDisksEncryptionFunc(ctx, hostID, encrypted)
}
func (s *DataStore) SetOrUpdateHostDiskEncryptionKey(ctx context.Context, hostID uint, encryptedBase64Key string, clientError string, decryptable *bool) error {
s.mu.Lock()
s.SetOrUpdateHostDiskEncryptionKeyFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateHostDiskEncryptionKeyFunc(ctx, hostID, encryptedBase64Key, clientError, decryptable)
}
func (s *DataStore) GetUnverifiedDiskEncryptionKeys(ctx context.Context) ([]fleet.HostDiskEncryptionKey, error) {
s.mu.Lock()
s.GetUnverifiedDiskEncryptionKeysFuncInvoked = true
s.mu.Unlock()
return s.GetUnverifiedDiskEncryptionKeysFunc(ctx)
}
func (s *DataStore) SetHostsDiskEncryptionKeyStatus(ctx context.Context, hostIDs []uint, encryptable bool, threshold time.Time) error {
s.mu.Lock()
s.SetHostsDiskEncryptionKeyStatusFuncInvoked = true
s.mu.Unlock()
return s.SetHostsDiskEncryptionKeyStatusFunc(ctx, hostIDs, encryptable, threshold)
}
func (s *DataStore) GetHostDiskEncryptionKey(ctx context.Context, hostID uint) (*fleet.HostDiskEncryptionKey, error) {
s.mu.Lock()
s.GetHostDiskEncryptionKeyFuncInvoked = true
s.mu.Unlock()
return s.GetHostDiskEncryptionKeyFunc(ctx, hostID)
}
func (s *DataStore) SetDiskEncryptionResetStatus(ctx context.Context, hostID uint, status bool) error {
s.mu.Lock()
s.SetDiskEncryptionResetStatusFuncInvoked = true
s.mu.Unlock()
return s.SetDiskEncryptionResetStatusFunc(ctx, hostID, status)
}
func (s *DataStore) GetHostCertAssociationsToExpire(ctx context.Context, expiryDays int, limit int) ([]fleet.SCEPIdentityAssociation, error) {
s.mu.Lock()
s.GetHostCertAssociationsToExpireFuncInvoked = true
s.mu.Unlock()
return s.GetHostCertAssociationsToExpireFunc(ctx, expiryDays, limit)
}
func (s *DataStore) SetCommandForPendingSCEPRenewal(ctx context.Context, assocs []fleet.SCEPIdentityAssociation, cmdUUID string) error {
s.mu.Lock()
s.SetCommandForPendingSCEPRenewalFuncInvoked = true
s.mu.Unlock()
return s.SetCommandForPendingSCEPRenewalFunc(ctx, assocs, cmdUUID)
}
func (s *DataStore) CleanSCEPRenewRefs(ctx context.Context, hostUUID string) error {
s.mu.Lock()
s.CleanSCEPRenewRefsFuncInvoked = true
s.mu.Unlock()
return s.CleanSCEPRenewRefsFunc(ctx, hostUUID)
}
func (s *DataStore) UpdateHostMDMProfilesVerification(ctx context.Context, host *fleet.Host, toVerify []string, toFail []string, toRetry []string) error {
s.mu.Lock()
s.UpdateHostMDMProfilesVerificationFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostMDMProfilesVerificationFunc(ctx, host, toVerify, toFail, toRetry)
}
func (s *DataStore) GetHostMDMProfilesExpectedForVerification(ctx context.Context, host *fleet.Host) (map[string]*fleet.ExpectedMDMProfile, error) {
s.mu.Lock()
s.GetHostMDMProfilesExpectedForVerificationFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMProfilesExpectedForVerificationFunc(ctx, host)
}
func (s *DataStore) GetHostMDMProfilesRetryCounts(ctx context.Context, host *fleet.Host) ([]fleet.HostMDMProfileRetryCount, error) {
s.mu.Lock()
s.GetHostMDMProfilesRetryCountsFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMProfilesRetryCountsFunc(ctx, host)
}
func (s *DataStore) GetHostMDMProfileRetryCountByCommandUUID(ctx context.Context, host *fleet.Host, cmdUUID string) (fleet.HostMDMProfileRetryCount, error) {
s.mu.Lock()
s.GetHostMDMProfileRetryCountByCommandUUIDFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMProfileRetryCountByCommandUUIDFunc(ctx, host, cmdUUID)
}
func (s *DataStore) SetOrUpdateHostOrbitInfo(ctx context.Context, hostID uint, version string) error {
s.mu.Lock()
s.SetOrUpdateHostOrbitInfoFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateHostOrbitInfoFunc(ctx, hostID, version)
}
func (s *DataStore) ReplaceHostDeviceMapping(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping, source string) error {
s.mu.Lock()
s.ReplaceHostDeviceMappingFuncInvoked = true
s.mu.Unlock()
return s.ReplaceHostDeviceMappingFunc(ctx, id, mappings, source)
}
func (s *DataStore) ReplaceHostBatteries(ctx context.Context, id uint, mappings []*fleet.HostBattery) error {
s.mu.Lock()
s.ReplaceHostBatteriesFuncInvoked = true
s.mu.Unlock()
return s.ReplaceHostBatteriesFunc(ctx, id, mappings)
}
func (s *DataStore) VerifyEnrollSecret(ctx context.Context, secret string) (*fleet.EnrollSecret, error) {
s.mu.Lock()
s.VerifyEnrollSecretFuncInvoked = true
s.mu.Unlock()
return s.VerifyEnrollSecretFunc(ctx, secret)
}
func (s *DataStore) EnrollHost(ctx context.Context, isMDMEnabled bool, osqueryHostId string, hardwareUUID string, hardwareSerial string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error) {
s.mu.Lock()
s.EnrollHostFuncInvoked = true
s.mu.Unlock()
return s.EnrollHostFunc(ctx, isMDMEnabled, osqueryHostId, hardwareUUID, hardwareSerial, nodeKey, teamID, cooldown)
}
func (s *DataStore) EnrollOrbit(ctx context.Context, isMDMEnabled bool, hostInfo fleet.OrbitHostInfo, orbitNodeKey string, teamID *uint) (*fleet.Host, error) {
s.mu.Lock()
s.EnrollOrbitFuncInvoked = true
s.mu.Unlock()
return s.EnrollOrbitFunc(ctx, isMDMEnabled, hostInfo, orbitNodeKey, teamID)
}
func (s *DataStore) SerialUpdateHost(ctx context.Context, host *fleet.Host) error {
s.mu.Lock()
s.SerialUpdateHostFuncInvoked = true
s.mu.Unlock()
return s.SerialUpdateHostFunc(ctx, host)
}
func (s *DataStore) NewJob(ctx context.Context, job *fleet.Job) (*fleet.Job, error) {
s.mu.Lock()
s.NewJobFuncInvoked = true
s.mu.Unlock()
return s.NewJobFunc(ctx, job)
}
func (s *DataStore) GetQueuedJobs(ctx context.Context, maxNumJobs int, now time.Time) ([]*fleet.Job, error) {
s.mu.Lock()
s.GetQueuedJobsFuncInvoked = true
s.mu.Unlock()
return s.GetQueuedJobsFunc(ctx, maxNumJobs, now)
}
func (s *DataStore) UpdateJob(ctx context.Context, id uint, job *fleet.Job) (*fleet.Job, error) {
s.mu.Lock()
s.UpdateJobFuncInvoked = true
s.mu.Unlock()
return s.UpdateJobFunc(ctx, id, job)
}
func (s *DataStore) InnoDBStatus(ctx context.Context) (string, error) {
s.mu.Lock()
s.InnoDBStatusFuncInvoked = true
s.mu.Unlock()
return s.InnoDBStatusFunc(ctx)
}
func (s *DataStore) ProcessList(ctx context.Context) ([]fleet.MySQLProcess, error) {
s.mu.Lock()
s.ProcessListFuncInvoked = true
s.mu.Unlock()
return s.ProcessListFunc(ctx)
}
func (s *DataStore) ListWindowsUpdatesByHostID(ctx context.Context, hostID uint) ([]fleet.WindowsUpdate, error) {
s.mu.Lock()
s.ListWindowsUpdatesByHostIDFuncInvoked = true
s.mu.Unlock()
return s.ListWindowsUpdatesByHostIDFunc(ctx, hostID)
}
func (s *DataStore) InsertWindowsUpdates(ctx context.Context, hostID uint, updates []fleet.WindowsUpdate) error {
s.mu.Lock()
s.InsertWindowsUpdatesFuncInvoked = true
s.mu.Unlock()
return s.InsertWindowsUpdatesFunc(ctx, hostID, updates)
}
func (s *DataStore) ListOSVulnerabilitiesByOS(ctx context.Context, osID uint) ([]fleet.OSVulnerability, error) {
s.mu.Lock()
s.ListOSVulnerabilitiesByOSFuncInvoked = true
s.mu.Unlock()
return s.ListOSVulnerabilitiesByOSFunc(ctx, osID)
}
func (s *DataStore) ListVulnsByOsNameAndVersion(ctx context.Context, name string, version string, includeCVSS bool) (fleet.Vulnerabilities, error) {
s.mu.Lock()
s.ListVulnsByOsNameAndVersionFuncInvoked = true
s.mu.Unlock()
return s.ListVulnsByOsNameAndVersionFunc(ctx, name, version, includeCVSS)
}
func (s *DataStore) InsertOSVulnerabilities(ctx context.Context, vulnerabilities []fleet.OSVulnerability, source fleet.VulnerabilitySource) (int64, error) {
s.mu.Lock()
s.InsertOSVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.InsertOSVulnerabilitiesFunc(ctx, vulnerabilities, source)
}
func (s *DataStore) DeleteOSVulnerabilities(ctx context.Context, vulnerabilities []fleet.OSVulnerability) error {
s.mu.Lock()
s.DeleteOSVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.DeleteOSVulnerabilitiesFunc(ctx, vulnerabilities)
}
func (s *DataStore) InsertOSVulnerability(ctx context.Context, vuln fleet.OSVulnerability, source fleet.VulnerabilitySource) (bool, error) {
s.mu.Lock()
s.InsertOSVulnerabilityFuncInvoked = true
s.mu.Unlock()
return s.InsertOSVulnerabilityFunc(ctx, vuln, source)
}
func (s *DataStore) DeleteOutOfDateOSVulnerabilities(ctx context.Context, source fleet.VulnerabilitySource, duration time.Duration) error {
s.mu.Lock()
s.DeleteOutOfDateOSVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.DeleteOutOfDateOSVulnerabilitiesFunc(ctx, source, duration)
}
func (s *DataStore) ListVulnerabilities(ctx context.Context, opt fleet.VulnListOptions) ([]fleet.VulnerabilityWithMetadata, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.ListVulnerabilitiesFunc(ctx, opt)
}
func (s *DataStore) Vulnerability(ctx context.Context, cve string, teamID *uint, includeCVEScores bool) (*fleet.VulnerabilityWithMetadata, error) {
s.mu.Lock()
s.VulnerabilityFuncInvoked = true
s.mu.Unlock()
return s.VulnerabilityFunc(ctx, cve, teamID, includeCVEScores)
}
func (s *DataStore) CountVulnerabilities(ctx context.Context, opt fleet.VulnListOptions) (uint, error) {
s.mu.Lock()
s.CountVulnerabilitiesFuncInvoked = true
s.mu.Unlock()
return s.CountVulnerabilitiesFunc(ctx, opt)
}
func (s *DataStore) UpdateVulnerabilityHostCounts(ctx context.Context) error {
s.mu.Lock()
s.UpdateVulnerabilityHostCountsFuncInvoked = true
s.mu.Unlock()
return s.UpdateVulnerabilityHostCountsFunc(ctx)
}
func (s *DataStore) NewMDMAppleConfigProfile(ctx context.Context, p fleet.MDMAppleConfigProfile) (*fleet.MDMAppleConfigProfile, error) {
s.mu.Lock()
s.NewMDMAppleConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.NewMDMAppleConfigProfileFunc(ctx, p)
}
func (s *DataStore) BulkUpsertMDMAppleConfigProfiles(ctx context.Context, payload []*fleet.MDMAppleConfigProfile) error {
s.mu.Lock()
s.BulkUpsertMDMAppleConfigProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkUpsertMDMAppleConfigProfilesFunc(ctx, payload)
}
func (s *DataStore) GetMDMAppleConfigProfileByDeprecatedID(ctx context.Context, profileID uint) (*fleet.MDMAppleConfigProfile, error) {
s.mu.Lock()
s.GetMDMAppleConfigProfileByDeprecatedIDFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleConfigProfileByDeprecatedIDFunc(ctx, profileID)
}
func (s *DataStore) GetMDMAppleConfigProfile(ctx context.Context, profileUUID string) (*fleet.MDMAppleConfigProfile, error) {
s.mu.Lock()
s.GetMDMAppleConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleConfigProfileFunc(ctx, profileUUID)
}
func (s *DataStore) GetMDMAppleDeclaration(ctx context.Context, declUUID string) (*fleet.MDMAppleDeclaration, error) {
s.mu.Lock()
s.GetMDMAppleDeclarationFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleDeclarationFunc(ctx, declUUID)
}
func (s *DataStore) ListMDMAppleConfigProfiles(ctx context.Context, teamID *uint) ([]*fleet.MDMAppleConfigProfile, error) {
s.mu.Lock()
s.ListMDMAppleConfigProfilesFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleConfigProfilesFunc(ctx, teamID)
}
func (s *DataStore) DeleteMDMAppleConfigProfileByDeprecatedID(ctx context.Context, profileID uint) error {
s.mu.Lock()
s.DeleteMDMAppleConfigProfileByDeprecatedIDFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleConfigProfileByDeprecatedIDFunc(ctx, profileID)
}
func (s *DataStore) DeleteMDMAppleConfigProfile(ctx context.Context, profileUUID string) error {
s.mu.Lock()
s.DeleteMDMAppleConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleConfigProfileFunc(ctx, profileUUID)
}
func (s *DataStore) BulkDeleteMDMAppleHostsConfigProfiles(ctx context.Context, payload []*fleet.MDMAppleProfilePayload) error {
s.mu.Lock()
s.BulkDeleteMDMAppleHostsConfigProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkDeleteMDMAppleHostsConfigProfilesFunc(ctx, payload)
}
func (s *DataStore) DeleteMDMAppleConfigProfileByTeamAndIdentifier(ctx context.Context, teamID *uint, profileIdentifier string) error {
s.mu.Lock()
s.DeleteMDMAppleConfigProfileByTeamAndIdentifierFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleConfigProfileByTeamAndIdentifierFunc(ctx, teamID, profileIdentifier)
}
func (s *DataStore) GetHostMDMAppleProfiles(ctx context.Context, hostUUID string) ([]fleet.HostMDMAppleProfile, error) {
s.mu.Lock()
s.GetHostMDMAppleProfilesFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMAppleProfilesFunc(ctx, hostUUID)
}
func (s *DataStore) CleanupDiskEncryptionKeysOnTeamChange(ctx context.Context, hostIDs []uint, newTeamID *uint) error {
s.mu.Lock()
s.CleanupDiskEncryptionKeysOnTeamChangeFuncInvoked = true
s.mu.Unlock()
return s.CleanupDiskEncryptionKeysOnTeamChangeFunc(ctx, hostIDs, newTeamID)
}
func (s *DataStore) NewMDMAppleEnrollmentProfile(ctx context.Context, enrollmentPayload fleet.MDMAppleEnrollmentProfilePayload) (*fleet.MDMAppleEnrollmentProfile, error) {
s.mu.Lock()
s.NewMDMAppleEnrollmentProfileFuncInvoked = true
s.mu.Unlock()
return s.NewMDMAppleEnrollmentProfileFunc(ctx, enrollmentPayload)
}
func (s *DataStore) GetMDMAppleEnrollmentProfileByToken(ctx context.Context, token string) (*fleet.MDMAppleEnrollmentProfile, error) {
s.mu.Lock()
s.GetMDMAppleEnrollmentProfileByTokenFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleEnrollmentProfileByTokenFunc(ctx, token)
}
func (s *DataStore) GetMDMAppleEnrollmentProfileByType(ctx context.Context, typ fleet.MDMAppleEnrollmentType) (*fleet.MDMAppleEnrollmentProfile, error) {
s.mu.Lock()
s.GetMDMAppleEnrollmentProfileByTypeFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleEnrollmentProfileByTypeFunc(ctx, typ)
}
func (s *DataStore) ListMDMAppleEnrollmentProfiles(ctx context.Context) ([]*fleet.MDMAppleEnrollmentProfile, error) {
s.mu.Lock()
s.ListMDMAppleEnrollmentProfilesFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleEnrollmentProfilesFunc(ctx)
}
func (s *DataStore) GetMDMAppleCommandResults(ctx context.Context, commandUUID string) ([]*fleet.MDMCommandResult, error) {
s.mu.Lock()
s.GetMDMAppleCommandResultsFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleCommandResultsFunc(ctx, commandUUID)
}
func (s *DataStore) ListMDMAppleCommands(ctx context.Context, tmFilter fleet.TeamFilter, listOpts *fleet.MDMCommandListOptions) ([]*fleet.MDMAppleCommand, error) {
s.mu.Lock()
s.ListMDMAppleCommandsFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleCommandsFunc(ctx, tmFilter, listOpts)
}
func (s *DataStore) NewMDMAppleInstaller(ctx context.Context, name string, size int64, manifest string, installer []byte, urlToken string) (*fleet.MDMAppleInstaller, error) {
s.mu.Lock()
s.NewMDMAppleInstallerFuncInvoked = true
s.mu.Unlock()
return s.NewMDMAppleInstallerFunc(ctx, name, size, manifest, installer, urlToken)
}
func (s *DataStore) MDMAppleInstaller(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error) {
s.mu.Lock()
s.MDMAppleInstallerFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleInstallerFunc(ctx, token)
}
func (s *DataStore) MDMAppleInstallerDetailsByID(ctx context.Context, id uint) (*fleet.MDMAppleInstaller, error) {
s.mu.Lock()
s.MDMAppleInstallerDetailsByIDFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleInstallerDetailsByIDFunc(ctx, id)
}
func (s *DataStore) DeleteMDMAppleInstaller(ctx context.Context, id uint) error {
s.mu.Lock()
s.DeleteMDMAppleInstallerFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleInstallerFunc(ctx, id)
}
func (s *DataStore) MDMAppleInstallerDetailsByToken(ctx context.Context, token string) (*fleet.MDMAppleInstaller, error) {
s.mu.Lock()
s.MDMAppleInstallerDetailsByTokenFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleInstallerDetailsByTokenFunc(ctx, token)
}
func (s *DataStore) ListMDMAppleInstallers(ctx context.Context) ([]fleet.MDMAppleInstaller, error) {
s.mu.Lock()
s.ListMDMAppleInstallersFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleInstallersFunc(ctx)
}
func (s *DataStore) BatchSetMDMAppleProfiles(ctx context.Context, tmID *uint, profiles []*fleet.MDMAppleConfigProfile) error {
s.mu.Lock()
s.BatchSetMDMAppleProfilesFuncInvoked = true
s.mu.Unlock()
return s.BatchSetMDMAppleProfilesFunc(ctx, tmID, profiles)
}
func (s *DataStore) MDMAppleListDevices(ctx context.Context) ([]fleet.MDMAppleDevice, error) {
s.mu.Lock()
s.MDMAppleListDevicesFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleListDevicesFunc(ctx)
}
func (s *DataStore) UpsertMDMAppleHostDEPAssignments(ctx context.Context, hosts []fleet.Host) error {
s.mu.Lock()
s.UpsertMDMAppleHostDEPAssignmentsFuncInvoked = true
s.mu.Unlock()
return s.UpsertMDMAppleHostDEPAssignmentsFunc(ctx, hosts)
}
func (s *DataStore) IngestMDMAppleDevicesFromDEPSync(ctx context.Context, devices []godep.Device) (int64, *uint, error) {
s.mu.Lock()
s.IngestMDMAppleDevicesFromDEPSyncFuncInvoked = true
s.mu.Unlock()
return s.IngestMDMAppleDevicesFromDEPSyncFunc(ctx, devices)
}
func (s *DataStore) IngestMDMAppleDeviceFromCheckin(ctx context.Context, mdmHost fleet.MDMAppleHostDetails) error {
s.mu.Lock()
s.IngestMDMAppleDeviceFromCheckinFuncInvoked = true
s.mu.Unlock()
return s.IngestMDMAppleDeviceFromCheckinFunc(ctx, mdmHost)
}
func (s *DataStore) RestoreMDMApplePendingDEPHost(ctx context.Context, host *fleet.Host) error {
s.mu.Lock()
s.RestoreMDMApplePendingDEPHostFuncInvoked = true
s.mu.Unlock()
return s.RestoreMDMApplePendingDEPHostFunc(ctx, host)
}
func (s *DataStore) ResetMDMAppleEnrollment(ctx context.Context, hostUUID string) error {
s.mu.Lock()
s.ResetMDMAppleEnrollmentFuncInvoked = true
s.mu.Unlock()
return s.ResetMDMAppleEnrollmentFunc(ctx, hostUUID)
}
func (s *DataStore) ListMDMAppleDEPSerialsInTeam(ctx context.Context, teamID *uint) ([]string, error) {
s.mu.Lock()
s.ListMDMAppleDEPSerialsInTeamFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleDEPSerialsInTeamFunc(ctx, teamID)
}
func (s *DataStore) ListMDMAppleDEPSerialsInHostIDs(ctx context.Context, hostIDs []uint) ([]string, error) {
s.mu.Lock()
s.ListMDMAppleDEPSerialsInHostIDsFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleDEPSerialsInHostIDsFunc(ctx, hostIDs)
}
func (s *DataStore) GetHostDEPAssignment(ctx context.Context, hostID uint) (*fleet.HostDEPAssignment, error) {
s.mu.Lock()
s.GetHostDEPAssignmentFuncInvoked = true
s.mu.Unlock()
return s.GetHostDEPAssignmentFunc(ctx, hostID)
}
func (s *DataStore) GetNanoMDMEnrollment(ctx context.Context, id string) (*fleet.NanoEnrollment, error) {
s.mu.Lock()
s.GetNanoMDMEnrollmentFuncInvoked = true
s.mu.Unlock()
return s.GetNanoMDMEnrollmentFunc(ctx, id)
}
func (s *DataStore) IncreasePolicyAutomationIteration(ctx context.Context, policyID uint) error {
s.mu.Lock()
s.IncreasePolicyAutomationIterationFuncInvoked = true
s.mu.Unlock()
return s.IncreasePolicyAutomationIterationFunc(ctx, policyID)
}
func (s *DataStore) OutdatedAutomationBatch(ctx context.Context) ([]fleet.PolicyFailure, error) {
s.mu.Lock()
s.OutdatedAutomationBatchFuncInvoked = true
s.mu.Unlock()
return s.OutdatedAutomationBatchFunc(ctx)
}
func (s *DataStore) ListMDMAppleProfilesToInstall(ctx context.Context) ([]*fleet.MDMAppleProfilePayload, error) {
s.mu.Lock()
s.ListMDMAppleProfilesToInstallFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleProfilesToInstallFunc(ctx)
}
func (s *DataStore) ListMDMAppleProfilesToRemove(ctx context.Context) ([]*fleet.MDMAppleProfilePayload, error) {
s.mu.Lock()
s.ListMDMAppleProfilesToRemoveFuncInvoked = true
s.mu.Unlock()
return s.ListMDMAppleProfilesToRemoveFunc(ctx)
}
func (s *DataStore) BulkUpsertMDMAppleHostProfiles(ctx context.Context, payload []*fleet.MDMAppleBulkUpsertHostProfilePayload) error {
s.mu.Lock()
s.BulkUpsertMDMAppleHostProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkUpsertMDMAppleHostProfilesFunc(ctx, payload)
}
func (s *DataStore) BulkSetPendingMDMHostProfiles(ctx context.Context, hostIDs []uint, teamIDs []uint, profileUUIDs []string, hostUUIDs []string) error {
s.mu.Lock()
s.BulkSetPendingMDMHostProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkSetPendingMDMHostProfilesFunc(ctx, hostIDs, teamIDs, profileUUIDs, hostUUIDs)
}
func (s *DataStore) GetMDMAppleProfilesContents(ctx context.Context, profileUUIDs []string) (map[string]mobileconfig.Mobileconfig, error) {
s.mu.Lock()
s.GetMDMAppleProfilesContentsFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleProfilesContentsFunc(ctx, profileUUIDs)
}
func (s *DataStore) UpdateOrDeleteHostMDMAppleProfile(ctx context.Context, profile *fleet.HostMDMAppleProfile) error {
s.mu.Lock()
s.UpdateOrDeleteHostMDMAppleProfileFuncInvoked = true
s.mu.Unlock()
return s.UpdateOrDeleteHostMDMAppleProfileFunc(ctx, profile)
}
func (s *DataStore) GetMDMAppleCommandRequestType(ctx context.Context, commandUUID string) (string, error) {
s.mu.Lock()
s.GetMDMAppleCommandRequestTypeFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleCommandRequestTypeFunc(ctx, commandUUID)
}
func (s *DataStore) GetMDMAppleProfilesSummary(ctx context.Context, teamID *uint) (*fleet.MDMProfilesSummary, error) {
s.mu.Lock()
s.GetMDMAppleProfilesSummaryFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleProfilesSummaryFunc(ctx, teamID)
}
func (s *DataStore) InsertMDMIdPAccount(ctx context.Context, account *fleet.MDMIdPAccount) error {
s.mu.Lock()
s.InsertMDMIdPAccountFuncInvoked = true
s.mu.Unlock()
return s.InsertMDMIdPAccountFunc(ctx, account)
}
func (s *DataStore) GetMDMIdPAccountByUUID(ctx context.Context, uuid string) (*fleet.MDMIdPAccount, error) {
s.mu.Lock()
s.GetMDMIdPAccountByUUIDFuncInvoked = true
s.mu.Unlock()
return s.GetMDMIdPAccountByUUIDFunc(ctx, uuid)
}
func (s *DataStore) GetMDMIdPAccountByEmail(ctx context.Context, email string) (*fleet.MDMIdPAccount, error) {
s.mu.Lock()
s.GetMDMIdPAccountByEmailFuncInvoked = true
s.mu.Unlock()
return s.GetMDMIdPAccountByEmailFunc(ctx, email)
}
func (s *DataStore) GetMDMAppleFileVaultSummary(ctx context.Context, teamID *uint) (*fleet.MDMAppleFileVaultSummary, error) {
s.mu.Lock()
s.GetMDMAppleFileVaultSummaryFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleFileVaultSummaryFunc(ctx, teamID)
}
func (s *DataStore) InsertMDMAppleBootstrapPackage(ctx context.Context, bp *fleet.MDMAppleBootstrapPackage) error {
s.mu.Lock()
s.InsertMDMAppleBootstrapPackageFuncInvoked = true
s.mu.Unlock()
return s.InsertMDMAppleBootstrapPackageFunc(ctx, bp)
}
func (s *DataStore) CopyDefaultMDMAppleBootstrapPackage(ctx context.Context, ac *fleet.AppConfig, toTeamID uint) error {
s.mu.Lock()
s.CopyDefaultMDMAppleBootstrapPackageFuncInvoked = true
s.mu.Unlock()
return s.CopyDefaultMDMAppleBootstrapPackageFunc(ctx, ac, toTeamID)
}
func (s *DataStore) DeleteMDMAppleBootstrapPackage(ctx context.Context, teamID uint) error {
s.mu.Lock()
s.DeleteMDMAppleBootstrapPackageFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleBootstrapPackageFunc(ctx, teamID)
}
func (s *DataStore) GetMDMAppleBootstrapPackageMeta(ctx context.Context, teamID uint) (*fleet.MDMAppleBootstrapPackage, error) {
s.mu.Lock()
s.GetMDMAppleBootstrapPackageMetaFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleBootstrapPackageMetaFunc(ctx, teamID)
}
func (s *DataStore) GetMDMAppleBootstrapPackageBytes(ctx context.Context, token string) (*fleet.MDMAppleBootstrapPackage, error) {
s.mu.Lock()
s.GetMDMAppleBootstrapPackageBytesFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleBootstrapPackageBytesFunc(ctx, token)
}
func (s *DataStore) GetMDMAppleBootstrapPackageSummary(ctx context.Context, teamID uint) (*fleet.MDMAppleBootstrapPackageSummary, error) {
s.mu.Lock()
s.GetMDMAppleBootstrapPackageSummaryFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleBootstrapPackageSummaryFunc(ctx, teamID)
}
func (s *DataStore) RecordHostBootstrapPackage(ctx context.Context, commandUUID string, hostUUID string) error {
s.mu.Lock()
s.RecordHostBootstrapPackageFuncInvoked = true
s.mu.Unlock()
return s.RecordHostBootstrapPackageFunc(ctx, commandUUID, hostUUID)
}
func (s *DataStore) GetHostMDMMacOSSetup(ctx context.Context, hostID uint) (*fleet.HostMDMMacOSSetup, error) {
s.mu.Lock()
s.GetHostMDMMacOSSetupFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMMacOSSetupFunc(ctx, hostID)
}
func (s *DataStore) MDMGetEULAMetadata(ctx context.Context) (*fleet.MDMEULA, error) {
s.mu.Lock()
s.MDMGetEULAMetadataFuncInvoked = true
s.mu.Unlock()
return s.MDMGetEULAMetadataFunc(ctx)
}
func (s *DataStore) MDMGetEULABytes(ctx context.Context, token string) (*fleet.MDMEULA, error) {
s.mu.Lock()
s.MDMGetEULABytesFuncInvoked = true
s.mu.Unlock()
return s.MDMGetEULABytesFunc(ctx, token)
}
func (s *DataStore) MDMInsertEULA(ctx context.Context, eula *fleet.MDMEULA) error {
s.mu.Lock()
s.MDMInsertEULAFuncInvoked = true
s.mu.Unlock()
return s.MDMInsertEULAFunc(ctx, eula)
}
func (s *DataStore) MDMDeleteEULA(ctx context.Context, token string) error {
s.mu.Lock()
s.MDMDeleteEULAFuncInvoked = true
s.mu.Unlock()
return s.MDMDeleteEULAFunc(ctx, token)
}
func (s *DataStore) SetOrUpdateMDMAppleSetupAssistant(ctx context.Context, asst *fleet.MDMAppleSetupAssistant) (*fleet.MDMAppleSetupAssistant, error) {
s.mu.Lock()
s.SetOrUpdateMDMAppleSetupAssistantFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateMDMAppleSetupAssistantFunc(ctx, asst)
}
func (s *DataStore) GetMDMAppleSetupAssistant(ctx context.Context, teamID *uint) (*fleet.MDMAppleSetupAssistant, error) {
s.mu.Lock()
s.GetMDMAppleSetupAssistantFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleSetupAssistantFunc(ctx, teamID)
}
func (s *DataStore) DeleteMDMAppleSetupAssistant(ctx context.Context, teamID *uint) error {
s.mu.Lock()
s.DeleteMDMAppleSetupAssistantFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMAppleSetupAssistantFunc(ctx, teamID)
}
func (s *DataStore) SetMDMAppleSetupAssistantProfileUUID(ctx context.Context, teamID *uint, profileUUID string) error {
s.mu.Lock()
s.SetMDMAppleSetupAssistantProfileUUIDFuncInvoked = true
s.mu.Unlock()
return s.SetMDMAppleSetupAssistantProfileUUIDFunc(ctx, teamID, profileUUID)
}
func (s *DataStore) SetMDMAppleDefaultSetupAssistantProfileUUID(ctx context.Context, teamID *uint, profileUUID string) error {
s.mu.Lock()
s.SetMDMAppleDefaultSetupAssistantProfileUUIDFuncInvoked = true
s.mu.Unlock()
return s.SetMDMAppleDefaultSetupAssistantProfileUUIDFunc(ctx, teamID, profileUUID)
}
func (s *DataStore) GetMDMAppleDefaultSetupAssistant(ctx context.Context, teamID *uint) (profileUUID string, updatedAt time.Time, err error) {
s.mu.Lock()
s.GetMDMAppleDefaultSetupAssistantFuncInvoked = true
s.mu.Unlock()
return s.GetMDMAppleDefaultSetupAssistantFunc(ctx, teamID)
}
func (s *DataStore) GetMatchingHostSerials(ctx context.Context, serials []string) (map[string]*fleet.Host, error) {
s.mu.Lock()
s.GetMatchingHostSerialsFuncInvoked = true
s.mu.Unlock()
return s.GetMatchingHostSerialsFunc(ctx, serials)
}
func (s *DataStore) DeleteHostDEPAssignments(ctx context.Context, serials []string) error {
s.mu.Lock()
s.DeleteHostDEPAssignmentsFuncInvoked = true
s.mu.Unlock()
return s.DeleteHostDEPAssignmentsFunc(ctx, serials)
}
func (s *DataStore) UpdateHostDEPAssignProfileResponses(ctx context.Context, resp *godep.ProfileResponse) error {
s.mu.Lock()
s.UpdateHostDEPAssignProfileResponsesFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostDEPAssignProfileResponsesFunc(ctx, resp)
}
func (s *DataStore) ScreenDEPAssignProfileSerialsForCooldown(ctx context.Context, serials []string) (skipSerials []string, assignSerials []string, err error) {
s.mu.Lock()
s.ScreenDEPAssignProfileSerialsForCooldownFuncInvoked = true
s.mu.Unlock()
return s.ScreenDEPAssignProfileSerialsForCooldownFunc(ctx, serials)
}
func (s *DataStore) GetDEPAssignProfileExpiredCooldowns(ctx context.Context) (map[uint][]string, error) {
s.mu.Lock()
s.GetDEPAssignProfileExpiredCooldownsFuncInvoked = true
s.mu.Unlock()
return s.GetDEPAssignProfileExpiredCooldownsFunc(ctx)
}
func (s *DataStore) UpdateDEPAssignProfileRetryPending(ctx context.Context, jobID uint, serials []string) error {
s.mu.Lock()
s.UpdateDEPAssignProfileRetryPendingFuncInvoked = true
s.mu.Unlock()
return s.UpdateDEPAssignProfileRetryPendingFunc(ctx, jobID, serials)
}
func (s *DataStore) InsertMDMAppleDDMRequest(ctx context.Context, hostUUID string, messageType string, rawJSON string) error {
s.mu.Lock()
s.InsertMDMAppleDDMRequestFuncInvoked = true
s.mu.Unlock()
return s.InsertMDMAppleDDMRequestFunc(ctx, hostUUID, messageType, rawJSON)
}
func (s *DataStore) MDMAppleDDMDeclarationsToken(ctx context.Context, hostUUID string) (*fleet.MDMAppleDDMDeclarationsToken, error) {
s.mu.Lock()
s.MDMAppleDDMDeclarationsTokenFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleDDMDeclarationsTokenFunc(ctx, hostUUID)
}
func (s *DataStore) MDMAppleDDMDeclarationItems(ctx context.Context, hostUUID string) ([]fleet.MDMAppleDDMDeclarationItem, error) {
s.mu.Lock()
s.MDMAppleDDMDeclarationItemsFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleDDMDeclarationItemsFunc(ctx, hostUUID)
}
func (s *DataStore) MDMAppleDDMDeclarationsResponse(ctx context.Context, identifier string, hostUUID string) (*fleet.MDMAppleDeclaration, error) {
s.mu.Lock()
s.MDMAppleDDMDeclarationsResponseFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleDDMDeclarationsResponseFunc(ctx, identifier, hostUUID)
}
func (s *DataStore) MDMAppleBatchSetHostDeclarationState(ctx context.Context) ([]string, error) {
s.mu.Lock()
s.MDMAppleBatchSetHostDeclarationStateFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleBatchSetHostDeclarationStateFunc(ctx)
}
func (s *DataStore) MDMAppleStoreDDMStatusReport(ctx context.Context, hostUUID string, updates []*fleet.MDMAppleHostDeclaration) error {
s.mu.Lock()
s.MDMAppleStoreDDMStatusReportFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleStoreDDMStatusReportFunc(ctx, hostUUID, updates)
}
func (s *DataStore) MDMAppleSetPendingDeclarationsAs(ctx context.Context, hostUUID string, status *fleet.MDMDeliveryStatus, detail string) error {
s.mu.Lock()
s.MDMAppleSetPendingDeclarationsAsFuncInvoked = true
s.mu.Unlock()
return s.MDMAppleSetPendingDeclarationsAsFunc(ctx, hostUUID, status, detail)
}
func (s *DataStore) WSTEPStoreCertificate(ctx context.Context, name string, crt *x509.Certificate) error {
s.mu.Lock()
s.WSTEPStoreCertificateFuncInvoked = true
s.mu.Unlock()
return s.WSTEPStoreCertificateFunc(ctx, name, crt)
}
func (s *DataStore) WSTEPNewSerial(ctx context.Context) (*big.Int, error) {
s.mu.Lock()
s.WSTEPNewSerialFuncInvoked = true
s.mu.Unlock()
return s.WSTEPNewSerialFunc(ctx)
}
func (s *DataStore) WSTEPAssociateCertHash(ctx context.Context, deviceUUID string, hash string) error {
s.mu.Lock()
s.WSTEPAssociateCertHashFuncInvoked = true
s.mu.Unlock()
return s.WSTEPAssociateCertHashFunc(ctx, deviceUUID, hash)
}
func (s *DataStore) MDMWindowsInsertEnrolledDevice(ctx context.Context, device *fleet.MDMWindowsEnrolledDevice) error {
s.mu.Lock()
s.MDMWindowsInsertEnrolledDeviceFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsInsertEnrolledDeviceFunc(ctx, device)
}
func (s *DataStore) MDMWindowsDeleteEnrolledDevice(ctx context.Context, mdmDeviceHWID string) error {
s.mu.Lock()
s.MDMWindowsDeleteEnrolledDeviceFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsDeleteEnrolledDeviceFunc(ctx, mdmDeviceHWID)
}
func (s *DataStore) MDMWindowsGetEnrolledDeviceWithDeviceID(ctx context.Context, mdmDeviceID string) (*fleet.MDMWindowsEnrolledDevice, error) {
s.mu.Lock()
s.MDMWindowsGetEnrolledDeviceWithDeviceIDFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsGetEnrolledDeviceWithDeviceIDFunc(ctx, mdmDeviceID)
}
func (s *DataStore) MDMWindowsDeleteEnrolledDeviceWithDeviceID(ctx context.Context, mdmDeviceID string) error {
s.mu.Lock()
s.MDMWindowsDeleteEnrolledDeviceWithDeviceIDFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsDeleteEnrolledDeviceWithDeviceIDFunc(ctx, mdmDeviceID)
}
func (s *DataStore) MDMWindowsInsertCommandForHosts(ctx context.Context, hostUUIDs []string, cmd *fleet.MDMWindowsCommand) error {
s.mu.Lock()
s.MDMWindowsInsertCommandForHostsFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsInsertCommandForHostsFunc(ctx, hostUUIDs, cmd)
}
func (s *DataStore) MDMWindowsGetPendingCommands(ctx context.Context, deviceID string) ([]*fleet.MDMWindowsCommand, error) {
s.mu.Lock()
s.MDMWindowsGetPendingCommandsFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsGetPendingCommandsFunc(ctx, deviceID)
}
func (s *DataStore) MDMWindowsSaveResponse(ctx context.Context, deviceID string, fullResponse *fleet.SyncML) error {
s.mu.Lock()
s.MDMWindowsSaveResponseFuncInvoked = true
s.mu.Unlock()
return s.MDMWindowsSaveResponseFunc(ctx, deviceID, fullResponse)
}
func (s *DataStore) GetMDMWindowsCommandResults(ctx context.Context, commandUUID string) ([]*fleet.MDMCommandResult, error) {
s.mu.Lock()
s.GetMDMWindowsCommandResultsFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsCommandResultsFunc(ctx, commandUUID)
}
func (s *DataStore) UpdateMDMWindowsEnrollmentsHostUUID(ctx context.Context, hostUUID string, mdmDeviceID string) error {
s.mu.Lock()
s.UpdateMDMWindowsEnrollmentsHostUUIDFuncInvoked = true
s.mu.Unlock()
return s.UpdateMDMWindowsEnrollmentsHostUUIDFunc(ctx, hostUUID, mdmDeviceID)
}
func (s *DataStore) GetMDMWindowsConfigProfile(ctx context.Context, profileUUID string) (*fleet.MDMWindowsConfigProfile, error) {
s.mu.Lock()
s.GetMDMWindowsConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsConfigProfileFunc(ctx, profileUUID)
}
func (s *DataStore) DeleteMDMWindowsConfigProfile(ctx context.Context, profileUUID string) error {
s.mu.Lock()
s.DeleteMDMWindowsConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMWindowsConfigProfileFunc(ctx, profileUUID)
}
func (s *DataStore) DeleteMDMWindowsConfigProfileByTeamAndName(ctx context.Context, teamID *uint, profileName string) error {
s.mu.Lock()
s.DeleteMDMWindowsConfigProfileByTeamAndNameFuncInvoked = true
s.mu.Unlock()
return s.DeleteMDMWindowsConfigProfileByTeamAndNameFunc(ctx, teamID, profileName)
}
func (s *DataStore) GetHostMDMWindowsProfiles(ctx context.Context, hostUUID string) ([]fleet.HostMDMWindowsProfile, error) {
s.mu.Lock()
s.GetHostMDMWindowsProfilesFuncInvoked = true
s.mu.Unlock()
return s.GetHostMDMWindowsProfilesFunc(ctx, hostUUID)
}
func (s *DataStore) ListMDMConfigProfiles(ctx context.Context, teamID *uint, opt fleet.ListOptions) ([]*fleet.MDMConfigProfilePayload, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListMDMConfigProfilesFuncInvoked = true
s.mu.Unlock()
return s.ListMDMConfigProfilesFunc(ctx, teamID, opt)
}
func (s *DataStore) GetMDMCommandPlatform(ctx context.Context, commandUUID string) (string, error) {
s.mu.Lock()
s.GetMDMCommandPlatformFuncInvoked = true
s.mu.Unlock()
return s.GetMDMCommandPlatformFunc(ctx, commandUUID)
}
func (s *DataStore) ListMDMCommands(ctx context.Context, tmFilter fleet.TeamFilter, listOpts *fleet.MDMCommandListOptions) ([]*fleet.MDMCommand, error) {
s.mu.Lock()
s.ListMDMCommandsFuncInvoked = true
s.mu.Unlock()
return s.ListMDMCommandsFunc(ctx, tmFilter, listOpts)
}
func (s *DataStore) GetMDMWindowsBitLockerSummary(ctx context.Context, teamID *uint) (*fleet.MDMWindowsBitLockerSummary, error) {
s.mu.Lock()
s.GetMDMWindowsBitLockerSummaryFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsBitLockerSummaryFunc(ctx, teamID)
}
func (s *DataStore) GetMDMWindowsBitLockerStatus(ctx context.Context, host *fleet.Host) (*fleet.HostMDMDiskEncryption, error) {
s.mu.Lock()
s.GetMDMWindowsBitLockerStatusFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsBitLockerStatusFunc(ctx, host)
}
func (s *DataStore) GetMDMWindowsProfilesSummary(ctx context.Context, teamID *uint) (*fleet.MDMProfilesSummary, error) {
s.mu.Lock()
s.GetMDMWindowsProfilesSummaryFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsProfilesSummaryFunc(ctx, teamID)
}
func (s *DataStore) ListMDMWindowsProfilesToInstall(ctx context.Context) ([]*fleet.MDMWindowsProfilePayload, error) {
s.mu.Lock()
s.ListMDMWindowsProfilesToInstallFuncInvoked = true
s.mu.Unlock()
return s.ListMDMWindowsProfilesToInstallFunc(ctx)
}
func (s *DataStore) ListMDMWindowsProfilesToRemove(ctx context.Context) ([]*fleet.MDMWindowsProfilePayload, error) {
s.mu.Lock()
s.ListMDMWindowsProfilesToRemoveFuncInvoked = true
s.mu.Unlock()
return s.ListMDMWindowsProfilesToRemoveFunc(ctx)
}
func (s *DataStore) BulkUpsertMDMWindowsHostProfiles(ctx context.Context, payload []*fleet.MDMWindowsBulkUpsertHostProfilePayload) error {
s.mu.Lock()
s.BulkUpsertMDMWindowsHostProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkUpsertMDMWindowsHostProfilesFunc(ctx, payload)
}
func (s *DataStore) GetMDMWindowsProfilesContents(ctx context.Context, profileUUIDs []string) (map[string][]byte, error) {
s.mu.Lock()
s.GetMDMWindowsProfilesContentsFuncInvoked = true
s.mu.Unlock()
return s.GetMDMWindowsProfilesContentsFunc(ctx, profileUUIDs)
}
func (s *DataStore) BulkDeleteMDMWindowsHostsConfigProfiles(ctx context.Context, payload []*fleet.MDMWindowsProfilePayload) error {
s.mu.Lock()
s.BulkDeleteMDMWindowsHostsConfigProfilesFuncInvoked = true
s.mu.Unlock()
return s.BulkDeleteMDMWindowsHostsConfigProfilesFunc(ctx, payload)
}
func (s *DataStore) NewMDMWindowsConfigProfile(ctx context.Context, cp fleet.MDMWindowsConfigProfile) (*fleet.MDMWindowsConfigProfile, error) {
s.mu.Lock()
s.NewMDMWindowsConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.NewMDMWindowsConfigProfileFunc(ctx, cp)
}
func (s *DataStore) SetOrUpdateMDMWindowsConfigProfile(ctx context.Context, cp fleet.MDMWindowsConfigProfile) error {
s.mu.Lock()
s.SetOrUpdateMDMWindowsConfigProfileFuncInvoked = true
s.mu.Unlock()
return s.SetOrUpdateMDMWindowsConfigProfileFunc(ctx, cp)
}
func (s *DataStore) BatchSetMDMProfiles(ctx context.Context, tmID *uint, macProfiles []*fleet.MDMAppleConfigProfile, winProfiles []*fleet.MDMWindowsConfigProfile, macDeclarations []*fleet.MDMAppleDeclaration) error {
s.mu.Lock()
s.BatchSetMDMProfilesFuncInvoked = true
s.mu.Unlock()
return s.BatchSetMDMProfilesFunc(ctx, tmID, macProfiles, winProfiles, macDeclarations)
}
func (s *DataStore) NewMDMAppleDeclaration(ctx context.Context, declaration *fleet.MDMAppleDeclaration) (*fleet.MDMAppleDeclaration, error) {
s.mu.Lock()
s.NewMDMAppleDeclarationFuncInvoked = true
s.mu.Unlock()
return s.NewMDMAppleDeclarationFunc(ctx, declaration)
}
func (s *DataStore) NewHostScriptExecutionRequest(ctx context.Context, request *fleet.HostScriptRequestPayload) (*fleet.HostScriptResult, error) {
s.mu.Lock()
s.NewHostScriptExecutionRequestFuncInvoked = true
s.mu.Unlock()
return s.NewHostScriptExecutionRequestFunc(ctx, request)
}
func (s *DataStore) SetHostScriptExecutionResult(ctx context.Context, result *fleet.HostScriptResultPayload) (*fleet.HostScriptResult, error) {
s.mu.Lock()
s.SetHostScriptExecutionResultFuncInvoked = true
s.mu.Unlock()
return s.SetHostScriptExecutionResultFunc(ctx, result)
}
func (s *DataStore) GetHostScriptExecutionResult(ctx context.Context, execID string) (*fleet.HostScriptResult, error) {
s.mu.Lock()
s.GetHostScriptExecutionResultFuncInvoked = true
s.mu.Unlock()
return s.GetHostScriptExecutionResultFunc(ctx, execID)
}
func (s *DataStore) ListPendingHostScriptExecutions(ctx context.Context, hostID uint) ([]*fleet.HostScriptResult, error) {
s.mu.Lock()
s.ListPendingHostScriptExecutionsFuncInvoked = true
s.mu.Unlock()
return s.ListPendingHostScriptExecutionsFunc(ctx, hostID)
}
func (s *DataStore) NewScript(ctx context.Context, script *fleet.Script) (*fleet.Script, error) {
s.mu.Lock()
s.NewScriptFuncInvoked = true
s.mu.Unlock()
return s.NewScriptFunc(ctx, script)
}
func (s *DataStore) Script(ctx context.Context, id uint) (*fleet.Script, error) {
s.mu.Lock()
s.ScriptFuncInvoked = true
s.mu.Unlock()
return s.ScriptFunc(ctx, id)
}
func (s *DataStore) GetScriptContents(ctx context.Context, id uint) ([]byte, error) {
s.mu.Lock()
s.GetScriptContentsFuncInvoked = true
s.mu.Unlock()
return s.GetScriptContentsFunc(ctx, id)
}
func (s *DataStore) DeleteScript(ctx context.Context, id uint) error {
s.mu.Lock()
s.DeleteScriptFuncInvoked = true
s.mu.Unlock()
return s.DeleteScriptFunc(ctx, id)
}
func (s *DataStore) ListScripts(ctx context.Context, teamID *uint, opt fleet.ListOptions) ([]*fleet.Script, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.ListScriptsFuncInvoked = true
s.mu.Unlock()
return s.ListScriptsFunc(ctx, teamID, opt)
}
func (s *DataStore) GetScriptIDByName(ctx context.Context, name string, teamID *uint) (uint, error) {
s.mu.Lock()
s.GetScriptIDByNameFuncInvoked = true
s.mu.Unlock()
return s.GetScriptIDByNameFunc(ctx, name, teamID)
}
func (s *DataStore) GetHostScriptDetails(ctx context.Context, hostID uint, teamID *uint, opts fleet.ListOptions, hostPlatform string) ([]*fleet.HostScriptDetail, *fleet.PaginationMetadata, error) {
s.mu.Lock()
s.GetHostScriptDetailsFuncInvoked = true
s.mu.Unlock()
return s.GetHostScriptDetailsFunc(ctx, hostID, teamID, opts, hostPlatform)
}
func (s *DataStore) BatchSetScripts(ctx context.Context, tmID *uint, scripts []*fleet.Script) error {
s.mu.Lock()
s.BatchSetScriptsFuncInvoked = true
s.mu.Unlock()
return s.BatchSetScriptsFunc(ctx, tmID, scripts)
}
func (s *DataStore) GetHostLockWipeStatus(ctx context.Context, host *fleet.Host) (*fleet.HostLockWipeStatus, error) {
s.mu.Lock()
s.GetHostLockWipeStatusFuncInvoked = true
s.mu.Unlock()
return s.GetHostLockWipeStatusFunc(ctx, host)
}
func (s *DataStore) LockHostViaScript(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error {
s.mu.Lock()
s.LockHostViaScriptFuncInvoked = true
s.mu.Unlock()
return s.LockHostViaScriptFunc(ctx, request, hostFleetPlatform)
}
func (s *DataStore) UnlockHostViaScript(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error {
s.mu.Lock()
s.UnlockHostViaScriptFuncInvoked = true
s.mu.Unlock()
return s.UnlockHostViaScriptFunc(ctx, request, hostFleetPlatform)
}
func (s *DataStore) UnlockHostManually(ctx context.Context, hostID uint, hostFleetPlatform string, ts time.Time) error {
s.mu.Lock()
s.UnlockHostManuallyFuncInvoked = true
s.mu.Unlock()
return s.UnlockHostManuallyFunc(ctx, hostID, hostFleetPlatform, ts)
}
func (s *DataStore) CleanMacOSMDMLock(ctx context.Context, hostUUID string) error {
s.mu.Lock()
s.CleanMacOSMDMLockFuncInvoked = true
s.mu.Unlock()
return s.CleanMacOSMDMLockFunc(ctx, hostUUID)
}
func (s *DataStore) CleanupUnusedScriptContents(ctx context.Context) error {
s.mu.Lock()
s.CleanupUnusedScriptContentsFuncInvoked = true
s.mu.Unlock()
return s.CleanupUnusedScriptContentsFunc(ctx)
}
func (s *DataStore) WipeHostViaScript(ctx context.Context, request *fleet.HostScriptRequestPayload, hostFleetPlatform string) error {
s.mu.Lock()
s.WipeHostViaScriptFuncInvoked = true
s.mu.Unlock()
return s.WipeHostViaScriptFunc(ctx, request, hostFleetPlatform)
}
func (s *DataStore) WipeHostViaWindowsMDM(ctx context.Context, host *fleet.Host, cmd *fleet.MDMWindowsCommand) error {
s.mu.Lock()
s.WipeHostViaWindowsMDMFuncInvoked = true
s.mu.Unlock()
return s.WipeHostViaWindowsMDMFunc(ctx, host, cmd)
}
func (s *DataStore) UpdateHostLockWipeStatusFromAppleMDMResult(ctx context.Context, hostUUID string, cmdUUID string, requestType string, succeeded bool) error {
s.mu.Lock()
s.UpdateHostLockWipeStatusFromAppleMDMResultFuncInvoked = true
s.mu.Unlock()
return s.UpdateHostLockWipeStatusFromAppleMDMResultFunc(ctx, hostUUID, cmdUUID, requestType, succeeded)
}