fleet/server/mock/datastore_mock.go

1635 lines
58 KiB
Go
Raw Normal View History

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import (
"context"
"time"
"github.com/fleetdm/fleet/v4/server/fleet"
)
var _ fleet.Datastore = (*DataStore)(nil)
type NewCarveFunc func(ctx context.Context, metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error)
type UpdateCarveFunc func(ctx context.Context, metadata *fleet.CarveMetadata) error
type CarveFunc func(ctx context.Context, carveId int64) (*fleet.CarveMetadata, error)
type CarveBySessionIdFunc func(ctx context.Context, sessionId string) (*fleet.CarveMetadata, error)
type CarveByNameFunc func(ctx context.Context, name string) (*fleet.CarveMetadata, error)
type ListCarvesFunc func(ctx context.Context, opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error)
type NewBlockFunc func(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64, data []byte) error
type GetBlockFunc func(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64) ([]byte, error)
type CleanupCarvesFunc func(ctx context.Context, now time.Time) (expired int, err error)
type NewUserFunc func(ctx context.Context, user *fleet.User) (*fleet.User, error)
type ListUsersFunc func(ctx context.Context, opt fleet.UserListOptions) ([]*fleet.User, error)
type UserByEmailFunc func(ctx context.Context, email string) (*fleet.User, error)
type UserByIDFunc func(ctx context.Context, id uint) (*fleet.User, error)
type SaveUserFunc func(ctx context.Context, user *fleet.User) error
type SaveUsersFunc func(ctx context.Context, users []*fleet.User) error
type DeleteUserFunc func(ctx context.Context, id uint) error
type PendingEmailChangeFunc func(ctx context.Context, userID uint, newEmail string, token string) error
type ConfirmPendingEmailChangeFunc func(ctx context.Context, userID uint, token string) (string, error)
type ApplyQueriesFunc func(ctx context.Context, authorID uint, queries []*fleet.Query) error
type NewQueryFunc func(ctx context.Context, query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error)
type SaveQueryFunc func(ctx context.Context, query *fleet.Query) error
type DeleteQueryFunc func(ctx context.Context, name string) error
type DeleteQueriesFunc func(ctx context.Context, ids []uint) (uint, error)
type QueryFunc func(ctx context.Context, id uint) (*fleet.Query, error)
type ListQueriesFunc func(ctx context.Context, opt fleet.ListQueryOptions) ([]*fleet.Query, error)
type QueryByNameFunc func(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Query, error)
type NewDistributedQueryCampaignFunc func(ctx context.Context, camp *fleet.DistributedQueryCampaign) (*fleet.DistributedQueryCampaign, error)
type DistributedQueryCampaignFunc func(ctx context.Context, id uint) (*fleet.DistributedQueryCampaign, error)
type SaveDistributedQueryCampaignFunc func(ctx context.Context, camp *fleet.DistributedQueryCampaign) error
type DistributedQueryCampaignTargetIDsFunc func(ctx context.Context, id uint) (targets *fleet.HostTargets, err error)
type NewDistributedQueryCampaignTargetFunc func(ctx context.Context, target *fleet.DistributedQueryCampaignTarget) (*fleet.DistributedQueryCampaignTarget, error)
type CleanupDistributedQueryCampaignsFunc func(ctx context.Context, now time.Time) (expired uint, err error)
type DistributedQueryCampaignsForQueryFunc func(ctx context.Context, queryID uint) ([]*fleet.DistributedQueryCampaign, error)
type ApplyPackSpecsFunc func(ctx context.Context, specs []*fleet.PackSpec) error
type GetPackSpecsFunc func(ctx context.Context) ([]*fleet.PackSpec, error)
type GetPackSpecFunc func(ctx context.Context, name string) (*fleet.PackSpec, error)
type NewPackFunc func(ctx context.Context, pack *fleet.Pack, opts ...fleet.OptionalArg) (*fleet.Pack, error)
type SavePackFunc func(ctx context.Context, pack *fleet.Pack) error
type DeletePackFunc func(ctx context.Context, name string) error
type PackFunc func(ctx context.Context, pid uint) (*fleet.Pack, error)
type ListPacksFunc func(ctx context.Context, opt fleet.PackListOptions) ([]*fleet.Pack, error)
type PackByNameFunc func(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Pack, bool, error)
type ListPacksForHostFunc func(ctx context.Context, hid uint) (packs []*fleet.Pack, err error)
type EnsureGlobalPackFunc func(ctx context.Context) (*fleet.Pack, error)
type EnsureTeamPackFunc func(ctx context.Context, teamID uint) (*fleet.Pack, error)
type ApplyLabelSpecsFunc func(ctx context.Context, specs []*fleet.LabelSpec) error
type GetLabelSpecsFunc func(ctx context.Context) ([]*fleet.LabelSpec, error)
type GetLabelSpecFunc func(ctx context.Context, name string) (*fleet.LabelSpec, error)
type NewLabelFunc func(ctx context.Context, Label *fleet.Label, opts ...fleet.OptionalArg) (*fleet.Label, error)
type SaveLabelFunc func(ctx context.Context, label *fleet.Label) (*fleet.Label, error)
type DeleteLabelFunc func(ctx context.Context, name string) error
type LabelFunc func(ctx context.Context, lid uint) (*fleet.Label, error)
type ListLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Label, error)
type LabelQueriesForHostFunc func(ctx context.Context, host *fleet.Host) (map[string]string, error)
type RecordLabelQueryExecutionsFunc func(ctx context.Context, host *fleet.Host, results map[uint]*bool, t time.Time, deferredSaveHost bool) error
type ListLabelsForHostFunc func(ctx context.Context, hid uint) ([]*fleet.Label, error)
type ListHostsInLabelFunc func(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) ([]*fleet.Host, error)
type ListUniqueHostsInLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, labels []uint) ([]*fleet.Host, error)
type SearchLabelsFunc func(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Label, error)
type LabelIDsByNameFunc func(ctx context.Context, labels []string) ([]uint, error)
type AsyncBatchInsertLabelMembershipFunc func(ctx context.Context, batch [][2]uint) error
type AsyncBatchDeleteLabelMembershipFunc func(ctx context.Context, batch [][2]uint) error
type AsyncBatchUpdateLabelTimestampFunc func(ctx context.Context, ids []uint, ts time.Time) error
type NewHostFunc func(ctx context.Context, host *fleet.Host) (*fleet.Host, error)
type SaveHostFunc func(ctx context.Context, host *fleet.Host) error
type SerialSaveHostFunc func(ctx context.Context, host *fleet.Host) error
type DeleteHostFunc func(ctx context.Context, hid uint) error
type HostFunc func(ctx context.Context, id uint, skipLoadingExtras bool) (*fleet.Host, error)
type EnrollHostFunc func(ctx context.Context, osqueryHostId string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error)
type ListHostsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error)
type AuthenticateHostFunc func(ctx context.Context, nodeKey string) (*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 CleanupIncomingHostsFunc func(ctx context.Context, now time.Time) error
type GenerateHostStatusStatisticsFunc func(ctx context.Context, filter fleet.TeamFilter, now time.Time) (*fleet.HostSummary, error)
type HostIDsByNameFunc func(ctx context.Context, filter fleet.TeamFilter, hostnames []string) ([]uint, error)
type HostByIdentifierFunc func(ctx context.Context, identifier string) (*fleet.Host, error)
type AddHostsToTeamFunc func(ctx context.Context, teamID *uint, hostIDs []uint) error
type TotalAndUnseenHostsSinceFunc func(ctx context.Context, daysCount int) (total int, unseen int, err error)
type DeleteHostsFunc func(ctx context.Context, ids []uint) error
type CountHostsFunc func(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) (int, error)
type CountHostsInLabelFunc func(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) (int, error)
type ListHostDeviceMappingFunc func(ctx context.Context, id uint) ([]*fleet.HostDeviceMapping, error)
type ReplaceHostDeviceMappingFunc func(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping) error
type ListPoliciesForHostFunc func(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error)
type SetOrUpdateMunkiVersionFunc func(ctx context.Context, hostID uint, version string) error
type SetOrUpdateMDMDataFunc func(ctx context.Context, hostID uint, enrolled bool, serverURL string, installedFromDep bool) error
type GetMunkiVersionFunc func(ctx context.Context, hostID uint) (string, error)
type GetMDMFunc func(ctx context.Context, hostID uint) (enrolled bool, serverURL string, installedFromDep bool, err 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 FindPassswordResetByTokenFunc func(ctx context.Context, token string) (*fleet.PasswordResetRequest, error)
type SessionByKeyFunc func(ctx context.Context, key string) (*fleet.Session, error)
type SessionByIDFunc func(ctx context.Context, id uint) (*fleet.Session, error)
type ListSessionsForUserFunc func(ctx context.Context, id uint) ([]*fleet.Session, error)
type NewSessionFunc func(ctx context.Context, session *fleet.Session) (*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 VerifyEnrollSecretFunc func(ctx context.Context, secret string) (*fleet.EnrollSecret, error)
type GetEnrollSecretsFunc func(ctx context.Context, teamID *uint) ([]*fleet.EnrollSecret, error)
type ApplyEnrollSecretsFunc func(ctx context.Context, teamID *uint, secrets []*fleet.EnrollSecret) error
type NewInviteFunc func(ctx context.Context, i *fleet.Invite) (*fleet.Invite, error)
type ListInvitesFunc func(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Invite, error)
type InviteFunc func(ctx context.Context, id uint) (*fleet.Invite, error)
type InviteByEmailFunc func(ctx context.Context, email string) (*fleet.Invite, error)
type InviteByTokenFunc func(ctx context.Context, token string) (*fleet.Invite, error)
type DeleteInviteFunc func(ctx context.Context, id uint) error
2021-11-11 20:33:06 +00:00
type UpdateInviteFunc func(ctx context.Context, id uint, i *fleet.Invite) (*fleet.Invite, error)
type ListScheduledQueriesInPackFunc 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) 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 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 SaveHostSoftwareFunc func(ctx context.Context, host *fleet.Host) error
type LoadHostSoftwareFunc func(ctx context.Context, host *fleet.Host) error
type AllSoftwareWithoutCPEIteratorFunc func(ctx context.Context) (fleet.SoftwareIterator, error)
type AddCPEForSoftwareFunc func(ctx context.Context, software fleet.Software, cpe string) error
type AllCPEsFunc func(ctx context.Context) ([]string, error)
type InsertCVEForCPEFunc func(ctx context.Context, cve string, cpes []string) error
type SoftwareByIDFunc func(ctx context.Context, id uint) (*fleet.Software, error)
type NewActivityFunc func(ctx context.Context, user *fleet.User, activityType string, details *map[string]interface{}) error
type ListActivitiesFunc func(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Activity, error)
type ShouldSendStatisticsFunc func(ctx context.Context, frequency time.Duration, license *fleet.LicenseInfo) (fleet.StatisticsPayload, bool, error)
type RecordStatisticsSentFunc func(ctx context.Context) error
type NewGlobalPolicyFunc func(ctx context.Context, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error)
type PolicyFunc func(ctx context.Context, id uint) (*fleet.Policy, error)
type SavePolicyFunc func(ctx context.Context, p *fleet.Policy) error
type 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 ListGlobalPoliciesFunc func(ctx context.Context) ([]*fleet.Policy, error)
type DeleteGlobalPoliciesFunc func(ctx context.Context, ids []uint) ([]uint, error)
type PolicyQueriesForHostFunc func(ctx context.Context, host *fleet.Host) (map[string]string, error)
type ApplyPolicySpecsFunc func(ctx context.Context, authorID uint, specs []*fleet.PolicySpec) error
type MigrateTablesFunc func(ctx context.Context) error
type MigrateDataFunc func(ctx context.Context) error
type MigrationStatusFunc func(ctx context.Context) (*fleet.MigrationStatus, error)
type ListSoftwareFunc func(ctx context.Context, opt fleet.SoftwareListOptions) ([]fleet.Software, error)
type CountSoftwareFunc func(ctx context.Context, opt fleet.SoftwareListOptions) (int, error)
type NewTeamPolicyFunc func(ctx context.Context, teamID uint, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error)
type ListTeamPoliciesFunc func(ctx context.Context, teamID uint) ([]*fleet.Policy, error)
type DeleteTeamPoliciesFunc func(ctx context.Context, teamID uint, ids []uint) ([]uint, error)
type TeamPolicyFunc func(ctx context.Context, teamID uint, policyID uint) (*fleet.Policy, error)
type LockFunc func(ctx context.Context, name string, owner string, expiration time.Duration) (bool, error)
type UnlockFunc func(ctx context.Context, name string, owner string) error
type DBLocksFunc func(ctx context.Context) ([]*fleet.DBLock, error)
type UpdateScheduledQueryAggregatedStatsFunc func(ctx context.Context) error
type UpdateQueryAggregatedStatsFunc func(ctx context.Context) error
type DataStore struct {
NewCarveFunc NewCarveFunc
NewCarveFuncInvoked bool
UpdateCarveFunc UpdateCarveFunc
UpdateCarveFuncInvoked bool
CarveFunc CarveFunc
CarveFuncInvoked bool
CarveBySessionIdFunc CarveBySessionIdFunc
CarveBySessionIdFuncInvoked bool
CarveByNameFunc CarveByNameFunc
CarveByNameFuncInvoked bool
ListCarvesFunc ListCarvesFunc
ListCarvesFuncInvoked bool
NewBlockFunc NewBlockFunc
NewBlockFuncInvoked bool
GetBlockFunc GetBlockFunc
GetBlockFuncInvoked bool
CleanupCarvesFunc CleanupCarvesFunc
CleanupCarvesFuncInvoked bool
NewUserFunc NewUserFunc
NewUserFuncInvoked bool
ListUsersFunc ListUsersFunc
ListUsersFuncInvoked bool
UserByEmailFunc UserByEmailFunc
UserByEmailFuncInvoked bool
UserByIDFunc UserByIDFunc
UserByIDFuncInvoked bool
SaveUserFunc SaveUserFunc
SaveUserFuncInvoked bool
SaveUsersFunc SaveUsersFunc
SaveUsersFuncInvoked bool
DeleteUserFunc DeleteUserFunc
DeleteUserFuncInvoked bool
PendingEmailChangeFunc PendingEmailChangeFunc
PendingEmailChangeFuncInvoked bool
ConfirmPendingEmailChangeFunc ConfirmPendingEmailChangeFunc
ConfirmPendingEmailChangeFuncInvoked bool
ApplyQueriesFunc ApplyQueriesFunc
ApplyQueriesFuncInvoked bool
NewQueryFunc NewQueryFunc
NewQueryFuncInvoked bool
SaveQueryFunc SaveQueryFunc
SaveQueryFuncInvoked bool
DeleteQueryFunc DeleteQueryFunc
DeleteQueryFuncInvoked bool
DeleteQueriesFunc DeleteQueriesFunc
DeleteQueriesFuncInvoked bool
QueryFunc QueryFunc
QueryFuncInvoked bool
ListQueriesFunc ListQueriesFunc
ListQueriesFuncInvoked bool
QueryByNameFunc QueryByNameFunc
QueryByNameFuncInvoked bool
NewDistributedQueryCampaignFunc NewDistributedQueryCampaignFunc
NewDistributedQueryCampaignFuncInvoked bool
DistributedQueryCampaignFunc DistributedQueryCampaignFunc
DistributedQueryCampaignFuncInvoked bool
SaveDistributedQueryCampaignFunc SaveDistributedQueryCampaignFunc
SaveDistributedQueryCampaignFuncInvoked bool
DistributedQueryCampaignTargetIDsFunc DistributedQueryCampaignTargetIDsFunc
DistributedQueryCampaignTargetIDsFuncInvoked bool
NewDistributedQueryCampaignTargetFunc NewDistributedQueryCampaignTargetFunc
NewDistributedQueryCampaignTargetFuncInvoked bool
CleanupDistributedQueryCampaignsFunc CleanupDistributedQueryCampaignsFunc
CleanupDistributedQueryCampaignsFuncInvoked bool
DistributedQueryCampaignsForQueryFunc DistributedQueryCampaignsForQueryFunc
DistributedQueryCampaignsForQueryFuncInvoked bool
ApplyPackSpecsFunc ApplyPackSpecsFunc
ApplyPackSpecsFuncInvoked bool
GetPackSpecsFunc GetPackSpecsFunc
GetPackSpecsFuncInvoked bool
GetPackSpecFunc GetPackSpecFunc
GetPackSpecFuncInvoked bool
NewPackFunc NewPackFunc
NewPackFuncInvoked bool
SavePackFunc SavePackFunc
SavePackFuncInvoked bool
DeletePackFunc DeletePackFunc
DeletePackFuncInvoked bool
PackFunc PackFunc
PackFuncInvoked bool
ListPacksFunc ListPacksFunc
ListPacksFuncInvoked bool
PackByNameFunc PackByNameFunc
PackByNameFuncInvoked bool
ListPacksForHostFunc ListPacksForHostFunc
ListPacksForHostFuncInvoked bool
EnsureGlobalPackFunc EnsureGlobalPackFunc
EnsureGlobalPackFuncInvoked bool
EnsureTeamPackFunc EnsureTeamPackFunc
EnsureTeamPackFuncInvoked bool
ApplyLabelSpecsFunc ApplyLabelSpecsFunc
ApplyLabelSpecsFuncInvoked bool
GetLabelSpecsFunc GetLabelSpecsFunc
GetLabelSpecsFuncInvoked bool
GetLabelSpecFunc GetLabelSpecFunc
GetLabelSpecFuncInvoked bool
NewLabelFunc NewLabelFunc
NewLabelFuncInvoked bool
SaveLabelFunc SaveLabelFunc
SaveLabelFuncInvoked bool
DeleteLabelFunc DeleteLabelFunc
DeleteLabelFuncInvoked bool
LabelFunc LabelFunc
LabelFuncInvoked bool
ListLabelsFunc ListLabelsFunc
ListLabelsFuncInvoked bool
LabelQueriesForHostFunc LabelQueriesForHostFunc
LabelQueriesForHostFuncInvoked bool
RecordLabelQueryExecutionsFunc RecordLabelQueryExecutionsFunc
RecordLabelQueryExecutionsFuncInvoked 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
SaveHostFunc SaveHostFunc
SaveHostFuncInvoked bool
SerialSaveHostFunc SerialSaveHostFunc
SerialSaveHostFuncInvoked bool
DeleteHostFunc DeleteHostFunc
DeleteHostFuncInvoked bool
HostFunc HostFunc
HostFuncInvoked bool
EnrollHostFunc EnrollHostFunc
EnrollHostFuncInvoked bool
ListHostsFunc ListHostsFunc
ListHostsFuncInvoked bool
AuthenticateHostFunc AuthenticateHostFunc
AuthenticateHostFuncInvoked bool
MarkHostsSeenFunc MarkHostsSeenFunc
MarkHostsSeenFuncInvoked bool
SearchHostsFunc SearchHostsFunc
SearchHostsFuncInvoked bool
CleanupIncomingHostsFunc CleanupIncomingHostsFunc
CleanupIncomingHostsFuncInvoked bool
GenerateHostStatusStatisticsFunc GenerateHostStatusStatisticsFunc
GenerateHostStatusStatisticsFuncInvoked bool
HostIDsByNameFunc HostIDsByNameFunc
HostIDsByNameFuncInvoked bool
HostByIdentifierFunc HostByIdentifierFunc
HostByIdentifierFuncInvoked bool
AddHostsToTeamFunc AddHostsToTeamFunc
AddHostsToTeamFuncInvoked bool
TotalAndUnseenHostsSinceFunc TotalAndUnseenHostsSinceFunc
TotalAndUnseenHostsSinceFuncInvoked bool
DeleteHostsFunc DeleteHostsFunc
DeleteHostsFuncInvoked bool
CountHostsFunc CountHostsFunc
CountHostsFuncInvoked bool
CountHostsInLabelFunc CountHostsInLabelFunc
CountHostsInLabelFuncInvoked bool
ListHostDeviceMappingFunc ListHostDeviceMappingFunc
ListHostDeviceMappingFuncInvoked bool
ReplaceHostDeviceMappingFunc ReplaceHostDeviceMappingFunc
ReplaceHostDeviceMappingFuncInvoked bool
ListPoliciesForHostFunc ListPoliciesForHostFunc
ListPoliciesForHostFuncInvoked bool
SetOrUpdateMunkiVersionFunc SetOrUpdateMunkiVersionFunc
SetOrUpdateMunkiVersionFuncInvoked bool
SetOrUpdateMDMDataFunc SetOrUpdateMDMDataFunc
SetOrUpdateMDMDataFuncInvoked bool
GetMunkiVersionFunc GetMunkiVersionFunc
GetMunkiVersionFuncInvoked bool
GetMDMFunc GetMDMFunc
GetMDMFuncInvoked bool
CountHostsInTargetsFunc CountHostsInTargetsFunc
CountHostsInTargetsFuncInvoked bool
HostIDsInTargetsFunc HostIDsInTargetsFunc
HostIDsInTargetsFuncInvoked bool
NewPasswordResetRequestFunc NewPasswordResetRequestFunc
NewPasswordResetRequestFuncInvoked bool
DeletePasswordResetRequestsForUserFunc DeletePasswordResetRequestsForUserFunc
DeletePasswordResetRequestsForUserFuncInvoked bool
FindPassswordResetByTokenFunc FindPassswordResetByTokenFunc
FindPassswordResetByTokenFuncInvoked 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
VerifyEnrollSecretFunc VerifyEnrollSecretFunc
VerifyEnrollSecretFuncInvoked bool
GetEnrollSecretsFunc GetEnrollSecretsFunc
GetEnrollSecretsFuncInvoked bool
ApplyEnrollSecretsFunc ApplyEnrollSecretsFunc
ApplyEnrollSecretsFuncInvoked bool
NewInviteFunc NewInviteFunc
NewInviteFuncInvoked bool
ListInvitesFunc ListInvitesFunc
ListInvitesFuncInvoked bool
InviteFunc InviteFunc
InviteFuncInvoked bool
InviteByEmailFunc InviteByEmailFunc
InviteByEmailFuncInvoked bool
InviteByTokenFunc InviteByTokenFunc
InviteByTokenFuncInvoked bool
DeleteInviteFunc DeleteInviteFunc
DeleteInviteFuncInvoked bool
2021-11-11 20:33:06 +00:00
UpdateInviteFunc UpdateInviteFunc
UpdateInviteFuncInvoked bool
ListScheduledQueriesInPackFunc ListScheduledQueriesInPackFunc
ListScheduledQueriesInPackFuncInvoked bool
NewScheduledQueryFunc NewScheduledQueryFunc
NewScheduledQueryFuncInvoked bool
SaveScheduledQueryFunc SaveScheduledQueryFunc
SaveScheduledQueryFuncInvoked bool
DeleteScheduledQueryFunc DeleteScheduledQueryFunc
DeleteScheduledQueryFuncInvoked bool
ScheduledQueryFunc ScheduledQueryFunc
ScheduledQueryFuncInvoked bool
CleanupExpiredHostsFunc CleanupExpiredHostsFunc
CleanupExpiredHostsFuncInvoked 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
SearchTeamsFunc SearchTeamsFunc
SearchTeamsFuncInvoked bool
TeamEnrollSecretsFunc TeamEnrollSecretsFunc
TeamEnrollSecretsFuncInvoked bool
SaveHostSoftwareFunc SaveHostSoftwareFunc
SaveHostSoftwareFuncInvoked bool
LoadHostSoftwareFunc LoadHostSoftwareFunc
LoadHostSoftwareFuncInvoked bool
AllSoftwareWithoutCPEIteratorFunc AllSoftwareWithoutCPEIteratorFunc
AllSoftwareWithoutCPEIteratorFuncInvoked bool
AddCPEForSoftwareFunc AddCPEForSoftwareFunc
AddCPEForSoftwareFuncInvoked bool
AllCPEsFunc AllCPEsFunc
AllCPEsFuncInvoked bool
InsertCVEForCPEFunc InsertCVEForCPEFunc
InsertCVEForCPEFuncInvoked bool
SoftwareByIDFunc SoftwareByIDFunc
SoftwareByIDFuncInvoked bool
NewActivityFunc NewActivityFunc
NewActivityFuncInvoked bool
ListActivitiesFunc ListActivitiesFunc
ListActivitiesFuncInvoked bool
ShouldSendStatisticsFunc ShouldSendStatisticsFunc
ShouldSendStatisticsFuncInvoked bool
RecordStatisticsSentFunc RecordStatisticsSentFunc
RecordStatisticsSentFuncInvoked bool
NewGlobalPolicyFunc NewGlobalPolicyFunc
NewGlobalPolicyFuncInvoked bool
PolicyFunc PolicyFunc
PolicyFuncInvoked bool
SavePolicyFunc SavePolicyFunc
SavePolicyFuncInvoked bool
FlippingPoliciesForHostFunc FlippingPoliciesForHostFunc
FlippingPoliciesForHostFuncInvoked bool
RecordPolicyQueryExecutionsFunc RecordPolicyQueryExecutionsFunc
RecordPolicyQueryExecutionsFuncInvoked bool
ListGlobalPoliciesFunc ListGlobalPoliciesFunc
ListGlobalPoliciesFuncInvoked bool
DeleteGlobalPoliciesFunc DeleteGlobalPoliciesFunc
DeleteGlobalPoliciesFuncInvoked bool
PolicyQueriesForHostFunc PolicyQueriesForHostFunc
PolicyQueriesForHostFuncInvoked bool
ApplyPolicySpecsFunc ApplyPolicySpecsFunc
ApplyPolicySpecsFuncInvoked bool
MigrateTablesFunc MigrateTablesFunc
MigrateTablesFuncInvoked bool
MigrateDataFunc MigrateDataFunc
MigrateDataFuncInvoked bool
MigrationStatusFunc MigrationStatusFunc
MigrationStatusFuncInvoked bool
ListSoftwareFunc ListSoftwareFunc
ListSoftwareFuncInvoked bool
CountSoftwareFunc CountSoftwareFunc
CountSoftwareFuncInvoked bool
NewTeamPolicyFunc NewTeamPolicyFunc
NewTeamPolicyFuncInvoked bool
ListTeamPoliciesFunc ListTeamPoliciesFunc
ListTeamPoliciesFuncInvoked bool
DeleteTeamPoliciesFunc DeleteTeamPoliciesFunc
DeleteTeamPoliciesFuncInvoked bool
TeamPolicyFunc TeamPolicyFunc
TeamPolicyFuncInvoked bool
LockFunc LockFunc
LockFuncInvoked bool
UnlockFunc UnlockFunc
UnlockFuncInvoked bool
DBLocksFunc DBLocksFunc
DBLocksFuncInvoked bool
UpdateScheduledQueryAggregatedStatsFunc UpdateScheduledQueryAggregatedStatsFunc
UpdateScheduledQueryAggregatedStatsFuncInvoked bool
UpdateQueryAggregatedStatsFunc UpdateQueryAggregatedStatsFunc
UpdateQueryAggregatedStatsFuncInvoked bool
}
func (s *DataStore) NewCarve(ctx context.Context, metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error) {
s.NewCarveFuncInvoked = true
return s.NewCarveFunc(ctx, metadata)
}
func (s *DataStore) UpdateCarve(ctx context.Context, metadata *fleet.CarveMetadata) error {
s.UpdateCarveFuncInvoked = true
return s.UpdateCarveFunc(ctx, metadata)
}
func (s *DataStore) Carve(ctx context.Context, carveId int64) (*fleet.CarveMetadata, error) {
s.CarveFuncInvoked = true
return s.CarveFunc(ctx, carveId)
}
func (s *DataStore) CarveBySessionId(ctx context.Context, sessionId string) (*fleet.CarveMetadata, error) {
s.CarveBySessionIdFuncInvoked = true
return s.CarveBySessionIdFunc(ctx, sessionId)
}
func (s *DataStore) CarveByName(ctx context.Context, name string) (*fleet.CarveMetadata, error) {
s.CarveByNameFuncInvoked = true
return s.CarveByNameFunc(ctx, name)
}
func (s *DataStore) ListCarves(ctx context.Context, opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error) {
s.ListCarvesFuncInvoked = true
return s.ListCarvesFunc(ctx, opt)
}
func (s *DataStore) NewBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64, data []byte) error {
s.NewBlockFuncInvoked = true
return s.NewBlockFunc(ctx, metadata, blockId, data)
}
func (s *DataStore) GetBlock(ctx context.Context, metadata *fleet.CarveMetadata, blockId int64) ([]byte, error) {
s.GetBlockFuncInvoked = true
return s.GetBlockFunc(ctx, metadata, blockId)
}
func (s *DataStore) CleanupCarves(ctx context.Context, now time.Time) (expired int, err error) {
s.CleanupCarvesFuncInvoked = true
return s.CleanupCarvesFunc(ctx, now)
}
func (s *DataStore) NewUser(ctx context.Context, user *fleet.User) (*fleet.User, error) {
s.NewUserFuncInvoked = true
return s.NewUserFunc(ctx, user)
}
func (s *DataStore) ListUsers(ctx context.Context, opt fleet.UserListOptions) ([]*fleet.User, error) {
s.ListUsersFuncInvoked = true
return s.ListUsersFunc(ctx, opt)
}
func (s *DataStore) UserByEmail(ctx context.Context, email string) (*fleet.User, error) {
s.UserByEmailFuncInvoked = true
return s.UserByEmailFunc(ctx, email)
}
func (s *DataStore) UserByID(ctx context.Context, id uint) (*fleet.User, error) {
s.UserByIDFuncInvoked = true
return s.UserByIDFunc(ctx, id)
}
func (s *DataStore) SaveUser(ctx context.Context, user *fleet.User) error {
s.SaveUserFuncInvoked = true
return s.SaveUserFunc(ctx, user)
}
func (s *DataStore) SaveUsers(ctx context.Context, users []*fleet.User) error {
s.SaveUsersFuncInvoked = true
return s.SaveUsersFunc(ctx, users)
}
func (s *DataStore) DeleteUser(ctx context.Context, id uint) error {
s.DeleteUserFuncInvoked = true
return s.DeleteUserFunc(ctx, id)
}
func (s *DataStore) PendingEmailChange(ctx context.Context, userID uint, newEmail string, token string) error {
s.PendingEmailChangeFuncInvoked = true
return s.PendingEmailChangeFunc(ctx, userID, newEmail, token)
}
func (s *DataStore) ConfirmPendingEmailChange(ctx context.Context, userID uint, token string) (string, error) {
s.ConfirmPendingEmailChangeFuncInvoked = true
return s.ConfirmPendingEmailChangeFunc(ctx, userID, token)
}
func (s *DataStore) ApplyQueries(ctx context.Context, authorID uint, queries []*fleet.Query) error {
s.ApplyQueriesFuncInvoked = true
return s.ApplyQueriesFunc(ctx, authorID, queries)
}
func (s *DataStore) NewQuery(ctx context.Context, query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error) {
s.NewQueryFuncInvoked = true
return s.NewQueryFunc(ctx, query, opts...)
}
func (s *DataStore) SaveQuery(ctx context.Context, query *fleet.Query) error {
s.SaveQueryFuncInvoked = true
return s.SaveQueryFunc(ctx, query)
}
func (s *DataStore) DeleteQuery(ctx context.Context, name string) error {
s.DeleteQueryFuncInvoked = true
return s.DeleteQueryFunc(ctx, name)
}
func (s *DataStore) DeleteQueries(ctx context.Context, ids []uint) (uint, error) {
s.DeleteQueriesFuncInvoked = true
return s.DeleteQueriesFunc(ctx, ids)
}
func (s *DataStore) Query(ctx context.Context, id uint) (*fleet.Query, error) {
s.QueryFuncInvoked = true
return s.QueryFunc(ctx, id)
}
func (s *DataStore) ListQueries(ctx context.Context, opt fleet.ListQueryOptions) ([]*fleet.Query, error) {
s.ListQueriesFuncInvoked = true
return s.ListQueriesFunc(ctx, opt)
}
func (s *DataStore) QueryByName(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Query, error) {
s.QueryByNameFuncInvoked = true
return s.QueryByNameFunc(ctx, name, opts...)
}
func (s *DataStore) NewDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) (*fleet.DistributedQueryCampaign, error) {
s.NewDistributedQueryCampaignFuncInvoked = true
return s.NewDistributedQueryCampaignFunc(ctx, camp)
}
func (s *DataStore) DistributedQueryCampaign(ctx context.Context, id uint) (*fleet.DistributedQueryCampaign, error) {
s.DistributedQueryCampaignFuncInvoked = true
return s.DistributedQueryCampaignFunc(ctx, id)
}
func (s *DataStore) SaveDistributedQueryCampaign(ctx context.Context, camp *fleet.DistributedQueryCampaign) error {
s.SaveDistributedQueryCampaignFuncInvoked = true
return s.SaveDistributedQueryCampaignFunc(ctx, camp)
}
func (s *DataStore) DistributedQueryCampaignTargetIDs(ctx context.Context, id uint) (targets *fleet.HostTargets, err error) {
s.DistributedQueryCampaignTargetIDsFuncInvoked = true
return s.DistributedQueryCampaignTargetIDsFunc(ctx, id)
}
func (s *DataStore) NewDistributedQueryCampaignTarget(ctx context.Context, target *fleet.DistributedQueryCampaignTarget) (*fleet.DistributedQueryCampaignTarget, error) {
s.NewDistributedQueryCampaignTargetFuncInvoked = true
return s.NewDistributedQueryCampaignTargetFunc(ctx, target)
}
func (s *DataStore) CleanupDistributedQueryCampaigns(ctx context.Context, now time.Time) (expired uint, err error) {
s.CleanupDistributedQueryCampaignsFuncInvoked = true
return s.CleanupDistributedQueryCampaignsFunc(ctx, now)
}
func (s *DataStore) DistributedQueryCampaignsForQuery(ctx context.Context, queryID uint) ([]*fleet.DistributedQueryCampaign, error) {
s.DistributedQueryCampaignsForQueryFuncInvoked = true
return s.DistributedQueryCampaignsForQueryFunc(ctx, queryID)
}
func (s *DataStore) ApplyPackSpecs(ctx context.Context, specs []*fleet.PackSpec) error {
s.ApplyPackSpecsFuncInvoked = true
return s.ApplyPackSpecsFunc(ctx, specs)
}
func (s *DataStore) GetPackSpecs(ctx context.Context) ([]*fleet.PackSpec, error) {
s.GetPackSpecsFuncInvoked = true
return s.GetPackSpecsFunc(ctx)
}
func (s *DataStore) GetPackSpec(ctx context.Context, name string) (*fleet.PackSpec, error) {
s.GetPackSpecFuncInvoked = true
return s.GetPackSpecFunc(ctx, name)
}
func (s *DataStore) NewPack(ctx context.Context, pack *fleet.Pack, opts ...fleet.OptionalArg) (*fleet.Pack, error) {
s.NewPackFuncInvoked = true
return s.NewPackFunc(ctx, pack, opts...)
}
func (s *DataStore) SavePack(ctx context.Context, pack *fleet.Pack) error {
s.SavePackFuncInvoked = true
return s.SavePackFunc(ctx, pack)
}
func (s *DataStore) DeletePack(ctx context.Context, name string) error {
s.DeletePackFuncInvoked = true
return s.DeletePackFunc(ctx, name)
}
func (s *DataStore) Pack(ctx context.Context, pid uint) (*fleet.Pack, error) {
s.PackFuncInvoked = true
return s.PackFunc(ctx, pid)
}
func (s *DataStore) ListPacks(ctx context.Context, opt fleet.PackListOptions) ([]*fleet.Pack, error) {
s.ListPacksFuncInvoked = true
return s.ListPacksFunc(ctx, opt)
}
func (s *DataStore) PackByName(ctx context.Context, name string, opts ...fleet.OptionalArg) (*fleet.Pack, bool, error) {
s.PackByNameFuncInvoked = true
return s.PackByNameFunc(ctx, name, opts...)
}
func (s *DataStore) ListPacksForHost(ctx context.Context, hid uint) (packs []*fleet.Pack, err error) {
s.ListPacksForHostFuncInvoked = true
return s.ListPacksForHostFunc(ctx, hid)
}
func (s *DataStore) EnsureGlobalPack(ctx context.Context) (*fleet.Pack, error) {
s.EnsureGlobalPackFuncInvoked = true
return s.EnsureGlobalPackFunc(ctx)
}
func (s *DataStore) EnsureTeamPack(ctx context.Context, teamID uint) (*fleet.Pack, error) {
s.EnsureTeamPackFuncInvoked = true
return s.EnsureTeamPackFunc(ctx, teamID)
}
func (s *DataStore) ApplyLabelSpecs(ctx context.Context, specs []*fleet.LabelSpec) error {
s.ApplyLabelSpecsFuncInvoked = true
return s.ApplyLabelSpecsFunc(ctx, specs)
}
func (s *DataStore) GetLabelSpecs(ctx context.Context) ([]*fleet.LabelSpec, error) {
s.GetLabelSpecsFuncInvoked = true
return s.GetLabelSpecsFunc(ctx)
}
func (s *DataStore) GetLabelSpec(ctx context.Context, name string) (*fleet.LabelSpec, error) {
s.GetLabelSpecFuncInvoked = true
return s.GetLabelSpecFunc(ctx, name)
}
func (s *DataStore) NewLabel(ctx context.Context, Label *fleet.Label, opts ...fleet.OptionalArg) (*fleet.Label, error) {
s.NewLabelFuncInvoked = true
return s.NewLabelFunc(ctx, Label, opts...)
}
func (s *DataStore) SaveLabel(ctx context.Context, label *fleet.Label) (*fleet.Label, error) {
s.SaveLabelFuncInvoked = true
return s.SaveLabelFunc(ctx, label)
}
func (s *DataStore) DeleteLabel(ctx context.Context, name string) error {
s.DeleteLabelFuncInvoked = true
return s.DeleteLabelFunc(ctx, name)
}
func (s *DataStore) Label(ctx context.Context, lid uint) (*fleet.Label, error) {
s.LabelFuncInvoked = true
return s.LabelFunc(ctx, lid)
}
func (s *DataStore) ListLabels(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Label, error) {
s.ListLabelsFuncInvoked = true
return s.ListLabelsFunc(ctx, filter, opt)
}
func (s *DataStore) LabelQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
s.LabelQueriesForHostFuncInvoked = true
return s.LabelQueriesForHostFunc(ctx, host)
}
func (s *DataStore) RecordLabelQueryExecutions(ctx context.Context, host *fleet.Host, results map[uint]*bool, t time.Time, deferredSaveHost bool) error {
s.RecordLabelQueryExecutionsFuncInvoked = true
return s.RecordLabelQueryExecutionsFunc(ctx, host, results, t, deferredSaveHost)
}
func (s *DataStore) ListLabelsForHost(ctx context.Context, hid uint) ([]*fleet.Label, error) {
s.ListLabelsForHostFuncInvoked = true
return s.ListLabelsForHostFunc(ctx, hid)
}
func (s *DataStore) ListHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) ([]*fleet.Host, error) {
s.ListHostsInLabelFuncInvoked = true
return s.ListHostsInLabelFunc(ctx, filter, lid, opt)
}
func (s *DataStore) ListUniqueHostsInLabels(ctx context.Context, filter fleet.TeamFilter, labels []uint) ([]*fleet.Host, error) {
s.ListUniqueHostsInLabelsFuncInvoked = true
return s.ListUniqueHostsInLabelsFunc(ctx, filter, labels)
}
func (s *DataStore) SearchLabels(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Label, error) {
s.SearchLabelsFuncInvoked = true
return s.SearchLabelsFunc(ctx, filter, query, omit...)
}
func (s *DataStore) LabelIDsByName(ctx context.Context, labels []string) ([]uint, error) {
s.LabelIDsByNameFuncInvoked = true
return s.LabelIDsByNameFunc(ctx, labels)
}
func (s *DataStore) AsyncBatchInsertLabelMembership(ctx context.Context, batch [][2]uint) error {
s.AsyncBatchInsertLabelMembershipFuncInvoked = true
return s.AsyncBatchInsertLabelMembershipFunc(ctx, batch)
}
func (s *DataStore) AsyncBatchDeleteLabelMembership(ctx context.Context, batch [][2]uint) error {
s.AsyncBatchDeleteLabelMembershipFuncInvoked = true
return s.AsyncBatchDeleteLabelMembershipFunc(ctx, batch)
}
func (s *DataStore) AsyncBatchUpdateLabelTimestamp(ctx context.Context, ids []uint, ts time.Time) error {
s.AsyncBatchUpdateLabelTimestampFuncInvoked = true
return s.AsyncBatchUpdateLabelTimestampFunc(ctx, ids, ts)
}
func (s *DataStore) NewHost(ctx context.Context, host *fleet.Host) (*fleet.Host, error) {
s.NewHostFuncInvoked = true
return s.NewHostFunc(ctx, host)
}
func (s *DataStore) SaveHost(ctx context.Context, host *fleet.Host) error {
s.SaveHostFuncInvoked = true
return s.SaveHostFunc(ctx, host)
}
func (s *DataStore) SerialSaveHost(ctx context.Context, host *fleet.Host) error {
s.SerialSaveHostFuncInvoked = true
return s.SerialSaveHostFunc(ctx, host)
}
func (s *DataStore) DeleteHost(ctx context.Context, hid uint) error {
s.DeleteHostFuncInvoked = true
return s.DeleteHostFunc(ctx, hid)
}
func (s *DataStore) Host(ctx context.Context, id uint, skipLoadingExtras bool) (*fleet.Host, error) {
s.HostFuncInvoked = true
return s.HostFunc(ctx, id, skipLoadingExtras)
}
func (s *DataStore) EnrollHost(ctx context.Context, osqueryHostId string, nodeKey string, teamID *uint, cooldown time.Duration) (*fleet.Host, error) {
s.EnrollHostFuncInvoked = true
return s.EnrollHostFunc(ctx, osqueryHostId, nodeKey, teamID, cooldown)
}
func (s *DataStore) ListHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) ([]*fleet.Host, error) {
s.ListHostsFuncInvoked = true
return s.ListHostsFunc(ctx, filter, opt)
}
func (s *DataStore) AuthenticateHost(ctx context.Context, nodeKey string) (*fleet.Host, error) {
s.AuthenticateHostFuncInvoked = true
return s.AuthenticateHostFunc(ctx, nodeKey)
}
func (s *DataStore) MarkHostsSeen(ctx context.Context, hostIDs []uint, t time.Time) error {
s.MarkHostsSeenFuncInvoked = true
return s.MarkHostsSeenFunc(ctx, hostIDs, t)
}
func (s *DataStore) SearchHosts(ctx context.Context, filter fleet.TeamFilter, query string, omit ...uint) ([]*fleet.Host, error) {
s.SearchHostsFuncInvoked = true
return s.SearchHostsFunc(ctx, filter, query, omit...)
}
func (s *DataStore) CleanupIncomingHosts(ctx context.Context, now time.Time) error {
s.CleanupIncomingHostsFuncInvoked = true
return s.CleanupIncomingHostsFunc(ctx, now)
}
func (s *DataStore) GenerateHostStatusStatistics(ctx context.Context, filter fleet.TeamFilter, now time.Time) (*fleet.HostSummary, error) {
s.GenerateHostStatusStatisticsFuncInvoked = true
return s.GenerateHostStatusStatisticsFunc(ctx, filter, now)
}
func (s *DataStore) HostIDsByName(ctx context.Context, filter fleet.TeamFilter, hostnames []string) ([]uint, error) {
s.HostIDsByNameFuncInvoked = true
return s.HostIDsByNameFunc(ctx, filter, hostnames)
}
func (s *DataStore) HostByIdentifier(ctx context.Context, identifier string) (*fleet.Host, error) {
s.HostByIdentifierFuncInvoked = true
return s.HostByIdentifierFunc(ctx, identifier)
}
func (s *DataStore) AddHostsToTeam(ctx context.Context, teamID *uint, hostIDs []uint) error {
s.AddHostsToTeamFuncInvoked = true
return s.AddHostsToTeamFunc(ctx, teamID, hostIDs)
}
func (s *DataStore) TotalAndUnseenHostsSince(ctx context.Context, daysCount int) (total int, unseen int, err error) {
s.TotalAndUnseenHostsSinceFuncInvoked = true
return s.TotalAndUnseenHostsSinceFunc(ctx, daysCount)
}
func (s *DataStore) DeleteHosts(ctx context.Context, ids []uint) error {
s.DeleteHostsFuncInvoked = true
return s.DeleteHostsFunc(ctx, ids)
}
func (s *DataStore) CountHosts(ctx context.Context, filter fleet.TeamFilter, opt fleet.HostListOptions) (int, error) {
s.CountHostsFuncInvoked = true
return s.CountHostsFunc(ctx, filter, opt)
}
func (s *DataStore) CountHostsInLabel(ctx context.Context, filter fleet.TeamFilter, lid uint, opt fleet.HostListOptions) (int, error) {
s.CountHostsInLabelFuncInvoked = true
return s.CountHostsInLabelFunc(ctx, filter, lid, opt)
}
func (s *DataStore) ListHostDeviceMapping(ctx context.Context, id uint) ([]*fleet.HostDeviceMapping, error) {
s.ListHostDeviceMappingFuncInvoked = true
return s.ListHostDeviceMappingFunc(ctx, id)
}
func (s *DataStore) ReplaceHostDeviceMapping(ctx context.Context, id uint, mappings []*fleet.HostDeviceMapping) error {
s.ReplaceHostDeviceMappingFuncInvoked = true
return s.ReplaceHostDeviceMappingFunc(ctx, id, mappings)
}
func (s *DataStore) ListPoliciesForHost(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error) {
s.ListPoliciesForHostFuncInvoked = true
return s.ListPoliciesForHostFunc(ctx, host)
}
func (s *DataStore) SetOrUpdateMunkiVersion(ctx context.Context, hostID uint, version string) error {
s.SetOrUpdateMunkiVersionFuncInvoked = true
return s.SetOrUpdateMunkiVersionFunc(ctx, hostID, version)
}
func (s *DataStore) SetOrUpdateMDMData(ctx context.Context, hostID uint, enrolled bool, serverURL string, installedFromDep bool) error {
s.SetOrUpdateMDMDataFuncInvoked = true
return s.SetOrUpdateMDMDataFunc(ctx, hostID, enrolled, serverURL, installedFromDep)
}
func (s *DataStore) GetMunkiVersion(ctx context.Context, hostID uint) (string, error) {
s.GetMunkiVersionFuncInvoked = true
return s.GetMunkiVersionFunc(ctx, hostID)
}
func (s *DataStore) GetMDM(ctx context.Context, hostID uint) (enrolled bool, serverURL string, installedFromDep bool, err error) {
s.GetMDMFuncInvoked = true
return s.GetMDMFunc(ctx, hostID)
}
func (s *DataStore) CountHostsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets, now time.Time) (fleet.TargetMetrics, error) {
s.CountHostsInTargetsFuncInvoked = true
return s.CountHostsInTargetsFunc(ctx, filter, targets, now)
}
func (s *DataStore) HostIDsInTargets(ctx context.Context, filter fleet.TeamFilter, targets fleet.HostTargets) ([]uint, error) {
s.HostIDsInTargetsFuncInvoked = true
return s.HostIDsInTargetsFunc(ctx, filter, targets)
}
func (s *DataStore) NewPasswordResetRequest(ctx context.Context, req *fleet.PasswordResetRequest) (*fleet.PasswordResetRequest, error) {
s.NewPasswordResetRequestFuncInvoked = true
return s.NewPasswordResetRequestFunc(ctx, req)
}
func (s *DataStore) DeletePasswordResetRequestsForUser(ctx context.Context, userID uint) error {
s.DeletePasswordResetRequestsForUserFuncInvoked = true
return s.DeletePasswordResetRequestsForUserFunc(ctx, userID)
}
func (s *DataStore) FindPassswordResetByToken(ctx context.Context, token string) (*fleet.PasswordResetRequest, error) {
s.FindPassswordResetByTokenFuncInvoked = true
return s.FindPassswordResetByTokenFunc(ctx, token)
}
func (s *DataStore) SessionByKey(ctx context.Context, key string) (*fleet.Session, error) {
s.SessionByKeyFuncInvoked = true
return s.SessionByKeyFunc(ctx, key)
}
func (s *DataStore) SessionByID(ctx context.Context, id uint) (*fleet.Session, error) {
s.SessionByIDFuncInvoked = true
return s.SessionByIDFunc(ctx, id)
}
func (s *DataStore) ListSessionsForUser(ctx context.Context, id uint) ([]*fleet.Session, error) {
s.ListSessionsForUserFuncInvoked = true
return s.ListSessionsForUserFunc(ctx, id)
}
func (s *DataStore) NewSession(ctx context.Context, session *fleet.Session) (*fleet.Session, error) {
s.NewSessionFuncInvoked = true
return s.NewSessionFunc(ctx, session)
}
func (s *DataStore) DestroySession(ctx context.Context, session *fleet.Session) error {
s.DestroySessionFuncInvoked = true
return s.DestroySessionFunc(ctx, session)
}
func (s *DataStore) DestroyAllSessionsForUser(ctx context.Context, id uint) error {
s.DestroyAllSessionsForUserFuncInvoked = true
return s.DestroyAllSessionsForUserFunc(ctx, id)
}
func (s *DataStore) MarkSessionAccessed(ctx context.Context, session *fleet.Session) error {
s.MarkSessionAccessedFuncInvoked = true
return s.MarkSessionAccessedFunc(ctx, session)
}
func (s *DataStore) NewAppConfig(ctx context.Context, info *fleet.AppConfig) (*fleet.AppConfig, error) {
s.NewAppConfigFuncInvoked = true
return s.NewAppConfigFunc(ctx, info)
}
func (s *DataStore) AppConfig(ctx context.Context) (*fleet.AppConfig, error) {
s.AppConfigFuncInvoked = true
return s.AppConfigFunc(ctx)
}
func (s *DataStore) SaveAppConfig(ctx context.Context, info *fleet.AppConfig) error {
s.SaveAppConfigFuncInvoked = true
return s.SaveAppConfigFunc(ctx, info)
}
func (s *DataStore) VerifyEnrollSecret(ctx context.Context, secret string) (*fleet.EnrollSecret, error) {
s.VerifyEnrollSecretFuncInvoked = true
return s.VerifyEnrollSecretFunc(ctx, secret)
}
func (s *DataStore) GetEnrollSecrets(ctx context.Context, teamID *uint) ([]*fleet.EnrollSecret, error) {
s.GetEnrollSecretsFuncInvoked = true
return s.GetEnrollSecretsFunc(ctx, teamID)
}
func (s *DataStore) ApplyEnrollSecrets(ctx context.Context, teamID *uint, secrets []*fleet.EnrollSecret) error {
s.ApplyEnrollSecretsFuncInvoked = true
return s.ApplyEnrollSecretsFunc(ctx, teamID, secrets)
}
func (s *DataStore) NewInvite(ctx context.Context, i *fleet.Invite) (*fleet.Invite, error) {
s.NewInviteFuncInvoked = true
return s.NewInviteFunc(ctx, i)
}
func (s *DataStore) ListInvites(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Invite, error) {
s.ListInvitesFuncInvoked = true
return s.ListInvitesFunc(ctx, opt)
}
func (s *DataStore) Invite(ctx context.Context, id uint) (*fleet.Invite, error) {
s.InviteFuncInvoked = true
return s.InviteFunc(ctx, id)
}
func (s *DataStore) InviteByEmail(ctx context.Context, email string) (*fleet.Invite, error) {
s.InviteByEmailFuncInvoked = true
return s.InviteByEmailFunc(ctx, email)
}
func (s *DataStore) InviteByToken(ctx context.Context, token string) (*fleet.Invite, error) {
s.InviteByTokenFuncInvoked = true
return s.InviteByTokenFunc(ctx, token)
}
func (s *DataStore) DeleteInvite(ctx context.Context, id uint) error {
s.DeleteInviteFuncInvoked = true
return s.DeleteInviteFunc(ctx, id)
}
2021-11-11 20:33:06 +00:00
func (s *DataStore) UpdateInvite(ctx context.Context, id uint, i *fleet.Invite) (*fleet.Invite, error) {
s.UpdateInviteFuncInvoked = true
return s.UpdateInviteFunc(ctx, id, i)
}
func (s *DataStore) ListScheduledQueriesInPack(ctx context.Context, id uint, opts fleet.ListOptions) ([]*fleet.ScheduledQuery, error) {
s.ListScheduledQueriesInPackFuncInvoked = true
return s.ListScheduledQueriesInPackFunc(ctx, id, opts)
}
func (s *DataStore) NewScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery, opts ...fleet.OptionalArg) (*fleet.ScheduledQuery, error) {
s.NewScheduledQueryFuncInvoked = true
return s.NewScheduledQueryFunc(ctx, sq, opts...)
}
func (s *DataStore) SaveScheduledQuery(ctx context.Context, sq *fleet.ScheduledQuery) (*fleet.ScheduledQuery, error) {
s.SaveScheduledQueryFuncInvoked = true
return s.SaveScheduledQueryFunc(ctx, sq)
}
func (s *DataStore) DeleteScheduledQuery(ctx context.Context, id uint) error {
s.DeleteScheduledQueryFuncInvoked = true
return s.DeleteScheduledQueryFunc(ctx, id)
}
func (s *DataStore) ScheduledQuery(ctx context.Context, id uint) (*fleet.ScheduledQuery, error) {
s.ScheduledQueryFuncInvoked = true
return s.ScheduledQueryFunc(ctx, id)
}
func (s *DataStore) CleanupExpiredHosts(ctx context.Context) error {
s.CleanupExpiredHostsFuncInvoked = true
return s.CleanupExpiredHostsFunc(ctx)
}
func (s *DataStore) NewTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
s.NewTeamFuncInvoked = true
return s.NewTeamFunc(ctx, team)
}
func (s *DataStore) SaveTeam(ctx context.Context, team *fleet.Team) (*fleet.Team, error) {
s.SaveTeamFuncInvoked = true
return s.SaveTeamFunc(ctx, team)
}
func (s *DataStore) Team(ctx context.Context, tid uint) (*fleet.Team, error) {
s.TeamFuncInvoked = true
return s.TeamFunc(ctx, tid)
}
func (s *DataStore) DeleteTeam(ctx context.Context, tid uint) error {
s.DeleteTeamFuncInvoked = true
return s.DeleteTeamFunc(ctx, tid)
}
func (s *DataStore) TeamByName(ctx context.Context, name string) (*fleet.Team, error) {
s.TeamByNameFuncInvoked = true
return s.TeamByNameFunc(ctx, name)
}
func (s *DataStore) ListTeams(ctx context.Context, filter fleet.TeamFilter, opt fleet.ListOptions) ([]*fleet.Team, error) {
s.ListTeamsFuncInvoked = true
return s.ListTeamsFunc(ctx, filter, opt)
}
func (s *DataStore) SearchTeams(ctx context.Context, filter fleet.TeamFilter, matchQuery string, omit ...uint) ([]*fleet.Team, error) {
s.SearchTeamsFuncInvoked = true
return s.SearchTeamsFunc(ctx, filter, matchQuery, omit...)
}
func (s *DataStore) TeamEnrollSecrets(ctx context.Context, teamID uint) ([]*fleet.EnrollSecret, error) {
s.TeamEnrollSecretsFuncInvoked = true
return s.TeamEnrollSecretsFunc(ctx, teamID)
}
func (s *DataStore) SaveHostSoftware(ctx context.Context, host *fleet.Host) error {
s.SaveHostSoftwareFuncInvoked = true
return s.SaveHostSoftwareFunc(ctx, host)
}
func (s *DataStore) LoadHostSoftware(ctx context.Context, host *fleet.Host) error {
s.LoadHostSoftwareFuncInvoked = true
return s.LoadHostSoftwareFunc(ctx, host)
}
func (s *DataStore) AllSoftwareWithoutCPEIterator(ctx context.Context) (fleet.SoftwareIterator, error) {
s.AllSoftwareWithoutCPEIteratorFuncInvoked = true
return s.AllSoftwareWithoutCPEIteratorFunc(ctx)
}
func (s *DataStore) AddCPEForSoftware(ctx context.Context, software fleet.Software, cpe string) error {
s.AddCPEForSoftwareFuncInvoked = true
return s.AddCPEForSoftwareFunc(ctx, software, cpe)
}
func (s *DataStore) AllCPEs(ctx context.Context) ([]string, error) {
s.AllCPEsFuncInvoked = true
return s.AllCPEsFunc(ctx)
}
func (s *DataStore) InsertCVEForCPE(ctx context.Context, cve string, cpes []string) error {
s.InsertCVEForCPEFuncInvoked = true
return s.InsertCVEForCPEFunc(ctx, cve, cpes)
}
func (s *DataStore) SoftwareByID(ctx context.Context, id uint) (*fleet.Software, error) {
s.SoftwareByIDFuncInvoked = true
return s.SoftwareByIDFunc(ctx, id)
}
func (s *DataStore) NewActivity(ctx context.Context, user *fleet.User, activityType string, details *map[string]interface{}) error {
s.NewActivityFuncInvoked = true
return s.NewActivityFunc(ctx, user, activityType, details)
}
func (s *DataStore) ListActivities(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Activity, error) {
s.ListActivitiesFuncInvoked = true
return s.ListActivitiesFunc(ctx, opt)
}
func (s *DataStore) ShouldSendStatistics(ctx context.Context, frequency time.Duration, license *fleet.LicenseInfo) (fleet.StatisticsPayload, bool, error) {
s.ShouldSendStatisticsFuncInvoked = true
return s.ShouldSendStatisticsFunc(ctx, frequency, license)
}
func (s *DataStore) RecordStatisticsSent(ctx context.Context) error {
s.RecordStatisticsSentFuncInvoked = true
return s.RecordStatisticsSentFunc(ctx)
}
func (s *DataStore) NewGlobalPolicy(ctx context.Context, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
s.NewGlobalPolicyFuncInvoked = true
return s.NewGlobalPolicyFunc(ctx, authorID, args)
}
func (s *DataStore) Policy(ctx context.Context, id uint) (*fleet.Policy, error) {
s.PolicyFuncInvoked = true
return s.PolicyFunc(ctx, id)
}
func (s *DataStore) SavePolicy(ctx context.Context, p *fleet.Policy) error {
s.SavePolicyFuncInvoked = true
return s.SavePolicyFunc(ctx, p)
}
func (s *DataStore) FlippingPoliciesForHost(ctx context.Context, hostID uint, incomingResults map[uint]*bool) (newFailing []uint, newPassing []uint, err error) {
s.FlippingPoliciesForHostFuncInvoked = true
return s.FlippingPoliciesForHostFunc(ctx, hostID, incomingResults)
}
func (s *DataStore) RecordPolicyQueryExecutions(ctx context.Context, host *fleet.Host, results map[uint]*bool, updated time.Time, deferredSaveHost bool) error {
s.RecordPolicyQueryExecutionsFuncInvoked = true
return s.RecordPolicyQueryExecutionsFunc(ctx, host, results, updated, deferredSaveHost)
}
func (s *DataStore) ListGlobalPolicies(ctx context.Context) ([]*fleet.Policy, error) {
s.ListGlobalPoliciesFuncInvoked = true
return s.ListGlobalPoliciesFunc(ctx)
}
func (s *DataStore) DeleteGlobalPolicies(ctx context.Context, ids []uint) ([]uint, error) {
s.DeleteGlobalPoliciesFuncInvoked = true
return s.DeleteGlobalPoliciesFunc(ctx, ids)
}
func (s *DataStore) PolicyQueriesForHost(ctx context.Context, host *fleet.Host) (map[string]string, error) {
s.PolicyQueriesForHostFuncInvoked = true
return s.PolicyQueriesForHostFunc(ctx, host)
}
func (s *DataStore) ApplyPolicySpecs(ctx context.Context, authorID uint, specs []*fleet.PolicySpec) error {
s.ApplyPolicySpecsFuncInvoked = true
return s.ApplyPolicySpecsFunc(ctx, authorID, specs)
}
func (s *DataStore) MigrateTables(ctx context.Context) error {
s.MigrateTablesFuncInvoked = true
return s.MigrateTablesFunc(ctx)
}
func (s *DataStore) MigrateData(ctx context.Context) error {
s.MigrateDataFuncInvoked = true
return s.MigrateDataFunc(ctx)
}
func (s *DataStore) MigrationStatus(ctx context.Context) (*fleet.MigrationStatus, error) {
s.MigrationStatusFuncInvoked = true
return s.MigrationStatusFunc(ctx)
}
func (s *DataStore) ListSoftware(ctx context.Context, opt fleet.SoftwareListOptions) ([]fleet.Software, error) {
s.ListSoftwareFuncInvoked = true
return s.ListSoftwareFunc(ctx, opt)
}
func (s *DataStore) CountSoftware(ctx context.Context, opt fleet.SoftwareListOptions) (int, error) {
s.CountSoftwareFuncInvoked = true
return s.CountSoftwareFunc(ctx, opt)
}
func (s *DataStore) NewTeamPolicy(ctx context.Context, teamID uint, authorID *uint, args fleet.PolicyPayload) (*fleet.Policy, error) {
s.NewTeamPolicyFuncInvoked = true
return s.NewTeamPolicyFunc(ctx, teamID, authorID, args)
}
func (s *DataStore) ListTeamPolicies(ctx context.Context, teamID uint) ([]*fleet.Policy, error) {
s.ListTeamPoliciesFuncInvoked = true
return s.ListTeamPoliciesFunc(ctx, teamID)
}
func (s *DataStore) DeleteTeamPolicies(ctx context.Context, teamID uint, ids []uint) ([]uint, error) {
s.DeleteTeamPoliciesFuncInvoked = true
return s.DeleteTeamPoliciesFunc(ctx, teamID, ids)
}
func (s *DataStore) TeamPolicy(ctx context.Context, teamID uint, policyID uint) (*fleet.Policy, error) {
s.TeamPolicyFuncInvoked = true
return s.TeamPolicyFunc(ctx, teamID, policyID)
}
func (s *DataStore) Lock(ctx context.Context, name string, owner string, expiration time.Duration) (bool, error) {
s.LockFuncInvoked = true
return s.LockFunc(ctx, name, owner, expiration)
}
func (s *DataStore) Unlock(ctx context.Context, name string, owner string) error {
s.UnlockFuncInvoked = true
return s.UnlockFunc(ctx, name, owner)
}
func (s *DataStore) DBLocks(ctx context.Context) ([]*fleet.DBLock, error) {
s.DBLocksFuncInvoked = true
return s.DBLocksFunc(ctx)
}
func (s *DataStore) UpdateScheduledQueryAggregatedStats(ctx context.Context) error {
s.UpdateScheduledQueryAggregatedStatsFuncInvoked = true
return s.UpdateScheduledQueryAggregatedStatsFunc(ctx)
}
func (s *DataStore) UpdateQueryAggregatedStats(ctx context.Context) error {
s.UpdateQueryAggregatedStatsFuncInvoked = true
return s.UpdateQueryAggregatedStatsFunc(ctx)
}