database

package
v0.0.0-...-9e1b7c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DurationCritical = 0
	DurationDanger   = time.Hour
	DurationWarning  = time.Hour * 24 * 2
	DurationNotice   = time.Hour * 24 * 7
	DurationUnknown  = time.Hour * 24 * 30
)

Devices are allowed to connect this long after a failed check is triggered.

Variables

This section is empty.

Functions

func New

func New(dbPath string, v4Allocator ip.Allocator, v6Allocator ip.Allocator, kolideEnabled bool, log logrus.FieldLogger) (*database, error)

Types

type Database

type Database interface {
	ReadDevices(ctx context.Context) ([]*pb.Device, error)
	ReadPeers(ctx context.Context) ([]*peer, error)
	UpdateDevices(ctx context.Context, devices []*pb.Device) error
	UpdateGateway(ctx context.Context, gateway *pb.Gateway) error
	UpdateGatewayDynamicFields(ctx context.Context, gateway *pb.Gateway) error
	AddGateway(ctx context.Context, gateway *pb.Gateway) error
	AddDevice(ctx context.Context, device *pb.Device) error
	ReadDevice(ctx context.Context, publicKey string) (*pb.Device, error)
	ReadDeviceById(ctx context.Context, deviceID int64) (*pb.Device, error)
	ReadDeviceByExternalID(ctx context.Context, externalID string) (*pb.Device, error)
	ReadGateways(ctx context.Context) ([]*pb.Gateway, error)
	ReadGateway(ctx context.Context, name string) (*pb.Gateway, error)
	ReadDeviceBySerialPlatform(ctx context.Context, serial string, platform string) (*pb.Device, error)
	AddSessionInfo(ctx context.Context, si *pb.Session) error
	ReadSessionInfo(ctx context.Context, key string) (*pb.Session, error)
	ReadSessionInfos(ctx context.Context) ([]*pb.Session, error)
	RemoveExpiredSessions(ctx context.Context) error
	ReadMostRecentSessionInfo(ctx context.Context, deviceID int64) (*pb.Session, error)
	SetDeviceSeenByKolide(ctx context.Context, externalID, serial, platform string, lastSeen *time.Time) error
	UpdateKolideIssues(ctx context.Context, issues []*kolide.DeviceFailure) error
	UpdateKolideIssuesForDevice(ctx context.Context, externalID string, issues []*kolide.DeviceFailure) error
	UpdateKolideChecks(ctx context.Context, checks []*kolide.Check) error
	ReadKolideChecks(ctx context.Context) (map[int64]*sqlc.KolideCheck, error)
}

type MockDatabase

type MockDatabase struct {
	mock.Mock
}

MockDatabase is an autogenerated mock type for the Database type

func NewMockDatabase

func NewMockDatabase(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockDatabase

NewMockDatabase creates a new instance of MockDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockDatabase) AddDevice

func (_m *MockDatabase) AddDevice(ctx context.Context, device *pb.Device) error

AddDevice provides a mock function with given fields: ctx, device

func (*MockDatabase) AddGateway

func (_m *MockDatabase) AddGateway(ctx context.Context, gateway *pb.Gateway) error

AddGateway provides a mock function with given fields: ctx, gateway

func (*MockDatabase) AddSessionInfo

func (_m *MockDatabase) AddSessionInfo(ctx context.Context, si *pb.Session) error

AddSessionInfo provides a mock function with given fields: ctx, si

func (*MockDatabase) EXPECT

func (_m *MockDatabase) EXPECT() *MockDatabase_Expecter

func (*MockDatabase) ReadDevice

func (_m *MockDatabase) ReadDevice(ctx context.Context, publicKey string) (*pb.Device, error)

ReadDevice provides a mock function with given fields: ctx, publicKey

func (*MockDatabase) ReadDeviceByExternalID

func (_m *MockDatabase) ReadDeviceByExternalID(ctx context.Context, externalID string) (*pb.Device, error)

ReadDeviceByExternalID provides a mock function with given fields: ctx, externalID

func (*MockDatabase) ReadDeviceById

func (_m *MockDatabase) ReadDeviceById(ctx context.Context, deviceID int64) (*pb.Device, error)

ReadDeviceById provides a mock function with given fields: ctx, deviceID

func (*MockDatabase) ReadDeviceBySerialPlatform

func (_m *MockDatabase) ReadDeviceBySerialPlatform(ctx context.Context, serial string, platform string) (*pb.Device, error)

ReadDeviceBySerialPlatform provides a mock function with given fields: ctx, serial, platform

func (*MockDatabase) ReadDevices

func (_m *MockDatabase) ReadDevices(ctx context.Context) ([]*pb.Device, error)

ReadDevices provides a mock function with given fields: ctx

func (*MockDatabase) ReadGateway

func (_m *MockDatabase) ReadGateway(ctx context.Context, name string) (*pb.Gateway, error)

ReadGateway provides a mock function with given fields: ctx, name

func (*MockDatabase) ReadGateways

func (_m *MockDatabase) ReadGateways(ctx context.Context) ([]*pb.Gateway, error)

ReadGateways provides a mock function with given fields: ctx

func (*MockDatabase) ReadKolideChecks

func (_m *MockDatabase) ReadKolideChecks(ctx context.Context) (map[int64]*sqlc.KolideCheck, error)

ReadKolideChecks provides a mock function with given fields: ctx

func (*MockDatabase) ReadMostRecentSessionInfo

func (_m *MockDatabase) ReadMostRecentSessionInfo(ctx context.Context, deviceID int64) (*pb.Session, error)

ReadMostRecentSessionInfo provides a mock function with given fields: ctx, deviceID

func (*MockDatabase) ReadPeers

func (_m *MockDatabase) ReadPeers(ctx context.Context) ([]*peer, error)

ReadPeers provides a mock function with given fields: ctx

func (*MockDatabase) ReadSessionInfo

func (_m *MockDatabase) ReadSessionInfo(ctx context.Context, key string) (*pb.Session, error)

ReadSessionInfo provides a mock function with given fields: ctx, key

func (*MockDatabase) ReadSessionInfos

func (_m *MockDatabase) ReadSessionInfos(ctx context.Context) ([]*pb.Session, error)

ReadSessionInfos provides a mock function with given fields: ctx

func (*MockDatabase) RemoveExpiredSessions

func (_m *MockDatabase) RemoveExpiredSessions(ctx context.Context) error

RemoveExpiredSessions provides a mock function with given fields: ctx

func (*MockDatabase) SetDeviceSeenByKolide

func (_m *MockDatabase) SetDeviceSeenByKolide(ctx context.Context, externalID string, serial string, platform string, lastSeen *time.Time) error

SetDeviceSeenByKolide provides a mock function with given fields: ctx, externalID, serial, platform, lastSeen

func (*MockDatabase) UpdateDevices

func (_m *MockDatabase) UpdateDevices(ctx context.Context, devices []*pb.Device) error

UpdateDevices provides a mock function with given fields: ctx, devices

func (*MockDatabase) UpdateGateway

func (_m *MockDatabase) UpdateGateway(ctx context.Context, gateway *pb.Gateway) error

UpdateGateway provides a mock function with given fields: ctx, gateway

func (*MockDatabase) UpdateGatewayDynamicFields

func (_m *MockDatabase) UpdateGatewayDynamicFields(ctx context.Context, gateway *pb.Gateway) error

UpdateGatewayDynamicFields provides a mock function with given fields: ctx, gateway

func (*MockDatabase) UpdateKolideChecks

func (_m *MockDatabase) UpdateKolideChecks(ctx context.Context, checks []*kolide.Check) error

UpdateKolideChecks provides a mock function with given fields: ctx, checks

func (*MockDatabase) UpdateKolideIssues

func (_m *MockDatabase) UpdateKolideIssues(ctx context.Context, issues []*kolide.DeviceFailure) error

UpdateKolideIssues provides a mock function with given fields: ctx, issues

func (*MockDatabase) UpdateKolideIssuesForDevice

func (_m *MockDatabase) UpdateKolideIssuesForDevice(ctx context.Context, externalID string, issues []*kolide.DeviceFailure) error

UpdateKolideIssuesForDevice provides a mock function with given fields: ctx, externalID, issues

type MockDatabase_AddDevice_Call

type MockDatabase_AddDevice_Call struct {
	*mock.Call
}

MockDatabase_AddDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddDevice'

func (*MockDatabase_AddDevice_Call) Return

func (*MockDatabase_AddDevice_Call) Run

func (*MockDatabase_AddDevice_Call) RunAndReturn

type MockDatabase_AddGateway_Call

type MockDatabase_AddGateway_Call struct {
	*mock.Call
}

MockDatabase_AddGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddGateway'

func (*MockDatabase_AddGateway_Call) Return

func (*MockDatabase_AddGateway_Call) Run

func (*MockDatabase_AddGateway_Call) RunAndReturn

type MockDatabase_AddSessionInfo_Call

type MockDatabase_AddSessionInfo_Call struct {
	*mock.Call
}

MockDatabase_AddSessionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSessionInfo'

func (*MockDatabase_AddSessionInfo_Call) Return

func (*MockDatabase_AddSessionInfo_Call) Run

func (*MockDatabase_AddSessionInfo_Call) RunAndReturn

type MockDatabase_Expecter

type MockDatabase_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockDatabase_Expecter) AddDevice

func (_e *MockDatabase_Expecter) AddDevice(ctx interface{}, device interface{}) *MockDatabase_AddDevice_Call

AddDevice is a helper method to define mock.On call

  • ctx context.Context
  • device *pb.Device

func (*MockDatabase_Expecter) AddGateway

func (_e *MockDatabase_Expecter) AddGateway(ctx interface{}, gateway interface{}) *MockDatabase_AddGateway_Call

AddGateway is a helper method to define mock.On call

  • ctx context.Context
  • gateway *pb.Gateway

func (*MockDatabase_Expecter) AddSessionInfo

func (_e *MockDatabase_Expecter) AddSessionInfo(ctx interface{}, si interface{}) *MockDatabase_AddSessionInfo_Call

AddSessionInfo is a helper method to define mock.On call

  • ctx context.Context
  • si *pb.Session

func (*MockDatabase_Expecter) ReadDevice

func (_e *MockDatabase_Expecter) ReadDevice(ctx interface{}, publicKey interface{}) *MockDatabase_ReadDevice_Call

ReadDevice is a helper method to define mock.On call

  • ctx context.Context
  • publicKey string

func (*MockDatabase_Expecter) ReadDeviceByExternalID

func (_e *MockDatabase_Expecter) ReadDeviceByExternalID(ctx interface{}, externalID interface{}) *MockDatabase_ReadDeviceByExternalID_Call

ReadDeviceByExternalID is a helper method to define mock.On call

  • ctx context.Context
  • externalID string

func (*MockDatabase_Expecter) ReadDeviceById

func (_e *MockDatabase_Expecter) ReadDeviceById(ctx interface{}, deviceID interface{}) *MockDatabase_ReadDeviceById_Call

ReadDeviceById is a helper method to define mock.On call

  • ctx context.Context
  • deviceID int64

func (*MockDatabase_Expecter) ReadDeviceBySerialPlatform

func (_e *MockDatabase_Expecter) ReadDeviceBySerialPlatform(ctx interface{}, serial interface{}, platform interface{}) *MockDatabase_ReadDeviceBySerialPlatform_Call

ReadDeviceBySerialPlatform is a helper method to define mock.On call

  • ctx context.Context
  • serial string
  • platform string

func (*MockDatabase_Expecter) ReadDevices

func (_e *MockDatabase_Expecter) ReadDevices(ctx interface{}) *MockDatabase_ReadDevices_Call

ReadDevices is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) ReadGateway

func (_e *MockDatabase_Expecter) ReadGateway(ctx interface{}, name interface{}) *MockDatabase_ReadGateway_Call

ReadGateway is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockDatabase_Expecter) ReadGateways

func (_e *MockDatabase_Expecter) ReadGateways(ctx interface{}) *MockDatabase_ReadGateways_Call

ReadGateways is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) ReadKolideChecks

func (_e *MockDatabase_Expecter) ReadKolideChecks(ctx interface{}) *MockDatabase_ReadKolideChecks_Call

ReadKolideChecks is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) ReadMostRecentSessionInfo

func (_e *MockDatabase_Expecter) ReadMostRecentSessionInfo(ctx interface{}, deviceID interface{}) *MockDatabase_ReadMostRecentSessionInfo_Call

ReadMostRecentSessionInfo is a helper method to define mock.On call

  • ctx context.Context
  • deviceID int64

func (*MockDatabase_Expecter) ReadPeers

func (_e *MockDatabase_Expecter) ReadPeers(ctx interface{}) *MockDatabase_ReadPeers_Call

ReadPeers is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) ReadSessionInfo

func (_e *MockDatabase_Expecter) ReadSessionInfo(ctx interface{}, key interface{}) *MockDatabase_ReadSessionInfo_Call

ReadSessionInfo is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockDatabase_Expecter) ReadSessionInfos

func (_e *MockDatabase_Expecter) ReadSessionInfos(ctx interface{}) *MockDatabase_ReadSessionInfos_Call

ReadSessionInfos is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) RemoveExpiredSessions

func (_e *MockDatabase_Expecter) RemoveExpiredSessions(ctx interface{}) *MockDatabase_RemoveExpiredSessions_Call

RemoveExpiredSessions is a helper method to define mock.On call

  • ctx context.Context

func (*MockDatabase_Expecter) SetDeviceSeenByKolide

func (_e *MockDatabase_Expecter) SetDeviceSeenByKolide(ctx interface{}, externalID interface{}, serial interface{}, platform interface{}, lastSeen interface{}) *MockDatabase_SetDeviceSeenByKolide_Call

SetDeviceSeenByKolide is a helper method to define mock.On call

  • ctx context.Context
  • externalID string
  • serial string
  • platform string
  • lastSeen *time.Time

func (*MockDatabase_Expecter) UpdateDevices

func (_e *MockDatabase_Expecter) UpdateDevices(ctx interface{}, devices interface{}) *MockDatabase_UpdateDevices_Call

UpdateDevices is a helper method to define mock.On call

  • ctx context.Context
  • devices []*pb.Device

func (*MockDatabase_Expecter) UpdateGateway

func (_e *MockDatabase_Expecter) UpdateGateway(ctx interface{}, gateway interface{}) *MockDatabase_UpdateGateway_Call

UpdateGateway is a helper method to define mock.On call

  • ctx context.Context
  • gateway *pb.Gateway

func (*MockDatabase_Expecter) UpdateGatewayDynamicFields

func (_e *MockDatabase_Expecter) UpdateGatewayDynamicFields(ctx interface{}, gateway interface{}) *MockDatabase_UpdateGatewayDynamicFields_Call

UpdateGatewayDynamicFields is a helper method to define mock.On call

  • ctx context.Context
  • gateway *pb.Gateway

func (*MockDatabase_Expecter) UpdateKolideChecks

func (_e *MockDatabase_Expecter) UpdateKolideChecks(ctx interface{}, checks interface{}) *MockDatabase_UpdateKolideChecks_Call

UpdateKolideChecks is a helper method to define mock.On call

  • ctx context.Context
  • checks []*kolide.Check

func (*MockDatabase_Expecter) UpdateKolideIssues

func (_e *MockDatabase_Expecter) UpdateKolideIssues(ctx interface{}, issues interface{}) *MockDatabase_UpdateKolideIssues_Call

UpdateKolideIssues is a helper method to define mock.On call

  • ctx context.Context
  • issues []*kolide.DeviceFailure

func (*MockDatabase_Expecter) UpdateKolideIssuesForDevice

func (_e *MockDatabase_Expecter) UpdateKolideIssuesForDevice(ctx interface{}, externalID interface{}, issues interface{}) *MockDatabase_UpdateKolideIssuesForDevice_Call

UpdateKolideIssuesForDevice is a helper method to define mock.On call

  • ctx context.Context
  • externalID string
  • issues []*kolide.DeviceFailure

type MockDatabase_ReadDeviceByExternalID_Call

type MockDatabase_ReadDeviceByExternalID_Call struct {
	*mock.Call
}

MockDatabase_ReadDeviceByExternalID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDeviceByExternalID'

func (*MockDatabase_ReadDeviceByExternalID_Call) Return

func (*MockDatabase_ReadDeviceByExternalID_Call) Run

func (*MockDatabase_ReadDeviceByExternalID_Call) RunAndReturn

type MockDatabase_ReadDeviceById_Call

type MockDatabase_ReadDeviceById_Call struct {
	*mock.Call
}

MockDatabase_ReadDeviceById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDeviceById'

func (*MockDatabase_ReadDeviceById_Call) Return

func (*MockDatabase_ReadDeviceById_Call) Run

func (*MockDatabase_ReadDeviceById_Call) RunAndReturn

type MockDatabase_ReadDeviceBySerialPlatform_Call

type MockDatabase_ReadDeviceBySerialPlatform_Call struct {
	*mock.Call
}

MockDatabase_ReadDeviceBySerialPlatform_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDeviceBySerialPlatform'

func (*MockDatabase_ReadDeviceBySerialPlatform_Call) Return

func (*MockDatabase_ReadDeviceBySerialPlatform_Call) Run

func (*MockDatabase_ReadDeviceBySerialPlatform_Call) RunAndReturn

type MockDatabase_ReadDevice_Call

type MockDatabase_ReadDevice_Call struct {
	*mock.Call
}

MockDatabase_ReadDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDevice'

func (*MockDatabase_ReadDevice_Call) Return

func (*MockDatabase_ReadDevice_Call) Run

func (*MockDatabase_ReadDevice_Call) RunAndReturn

type MockDatabase_ReadDevices_Call

type MockDatabase_ReadDevices_Call struct {
	*mock.Call
}

MockDatabase_ReadDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDevices'

func (*MockDatabase_ReadDevices_Call) Return

func (*MockDatabase_ReadDevices_Call) Run

func (*MockDatabase_ReadDevices_Call) RunAndReturn

type MockDatabase_ReadGateway_Call

type MockDatabase_ReadGateway_Call struct {
	*mock.Call
}

MockDatabase_ReadGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadGateway'

func (*MockDatabase_ReadGateway_Call) Return

func (*MockDatabase_ReadGateway_Call) Run

func (*MockDatabase_ReadGateway_Call) RunAndReturn

type MockDatabase_ReadGateways_Call

type MockDatabase_ReadGateways_Call struct {
	*mock.Call
}

MockDatabase_ReadGateways_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadGateways'

func (*MockDatabase_ReadGateways_Call) Return

func (*MockDatabase_ReadGateways_Call) Run

func (*MockDatabase_ReadGateways_Call) RunAndReturn

type MockDatabase_ReadKolideChecks_Call

type MockDatabase_ReadKolideChecks_Call struct {
	*mock.Call
}

MockDatabase_ReadKolideChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadKolideChecks'

func (*MockDatabase_ReadKolideChecks_Call) Return

func (*MockDatabase_ReadKolideChecks_Call) Run

func (*MockDatabase_ReadKolideChecks_Call) RunAndReturn

type MockDatabase_ReadMostRecentSessionInfo_Call

type MockDatabase_ReadMostRecentSessionInfo_Call struct {
	*mock.Call
}

MockDatabase_ReadMostRecentSessionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadMostRecentSessionInfo'

func (*MockDatabase_ReadMostRecentSessionInfo_Call) Return

func (*MockDatabase_ReadMostRecentSessionInfo_Call) Run

func (*MockDatabase_ReadMostRecentSessionInfo_Call) RunAndReturn

type MockDatabase_ReadPeers_Call

type MockDatabase_ReadPeers_Call struct {
	*mock.Call
}

MockDatabase_ReadPeers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadPeers'

func (*MockDatabase_ReadPeers_Call) Return

func (_c *MockDatabase_ReadPeers_Call) Return(_a0 []*peer, _a1 error) *MockDatabase_ReadPeers_Call

func (*MockDatabase_ReadPeers_Call) Run

func (*MockDatabase_ReadPeers_Call) RunAndReturn

func (_c *MockDatabase_ReadPeers_Call) RunAndReturn(run func(context.Context) ([]*peer, error)) *MockDatabase_ReadPeers_Call

type MockDatabase_ReadSessionInfo_Call

type MockDatabase_ReadSessionInfo_Call struct {
	*mock.Call
}

MockDatabase_ReadSessionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadSessionInfo'

func (*MockDatabase_ReadSessionInfo_Call) Return

func (*MockDatabase_ReadSessionInfo_Call) Run

func (*MockDatabase_ReadSessionInfo_Call) RunAndReturn

type MockDatabase_ReadSessionInfos_Call

type MockDatabase_ReadSessionInfos_Call struct {
	*mock.Call
}

MockDatabase_ReadSessionInfos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadSessionInfos'

func (*MockDatabase_ReadSessionInfos_Call) Return

func (*MockDatabase_ReadSessionInfos_Call) Run

func (*MockDatabase_ReadSessionInfos_Call) RunAndReturn

type MockDatabase_RemoveExpiredSessions_Call

type MockDatabase_RemoveExpiredSessions_Call struct {
	*mock.Call
}

MockDatabase_RemoveExpiredSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveExpiredSessions'

func (*MockDatabase_RemoveExpiredSessions_Call) Return

func (*MockDatabase_RemoveExpiredSessions_Call) Run

func (*MockDatabase_RemoveExpiredSessions_Call) RunAndReturn

type MockDatabase_SetDeviceSeenByKolide_Call

type MockDatabase_SetDeviceSeenByKolide_Call struct {
	*mock.Call
}

MockDatabase_SetDeviceSeenByKolide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDeviceSeenByKolide'

func (*MockDatabase_SetDeviceSeenByKolide_Call) Return

func (*MockDatabase_SetDeviceSeenByKolide_Call) Run

func (_c *MockDatabase_SetDeviceSeenByKolide_Call) Run(run func(ctx context.Context, externalID string, serial string, platform string, lastSeen *time.Time)) *MockDatabase_SetDeviceSeenByKolide_Call

func (*MockDatabase_SetDeviceSeenByKolide_Call) RunAndReturn

type MockDatabase_UpdateDevices_Call

type MockDatabase_UpdateDevices_Call struct {
	*mock.Call
}

MockDatabase_UpdateDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateDevices'

func (*MockDatabase_UpdateDevices_Call) Return

func (*MockDatabase_UpdateDevices_Call) Run

func (*MockDatabase_UpdateDevices_Call) RunAndReturn

type MockDatabase_UpdateGatewayDynamicFields_Call

type MockDatabase_UpdateGatewayDynamicFields_Call struct {
	*mock.Call
}

MockDatabase_UpdateGatewayDynamicFields_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGatewayDynamicFields'

func (*MockDatabase_UpdateGatewayDynamicFields_Call) Return

func (*MockDatabase_UpdateGatewayDynamicFields_Call) Run

func (*MockDatabase_UpdateGatewayDynamicFields_Call) RunAndReturn

type MockDatabase_UpdateGateway_Call

type MockDatabase_UpdateGateway_Call struct {
	*mock.Call
}

MockDatabase_UpdateGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGateway'

func (*MockDatabase_UpdateGateway_Call) Return

func (*MockDatabase_UpdateGateway_Call) Run

func (*MockDatabase_UpdateGateway_Call) RunAndReturn

type MockDatabase_UpdateKolideChecks_Call

type MockDatabase_UpdateKolideChecks_Call struct {
	*mock.Call
}

MockDatabase_UpdateKolideChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateKolideChecks'

func (*MockDatabase_UpdateKolideChecks_Call) Return

func (*MockDatabase_UpdateKolideChecks_Call) Run

func (*MockDatabase_UpdateKolideChecks_Call) RunAndReturn

type MockDatabase_UpdateKolideIssuesForDevice_Call

type MockDatabase_UpdateKolideIssuesForDevice_Call struct {
	*mock.Call
}

MockDatabase_UpdateKolideIssuesForDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateKolideIssuesForDevice'

func (*MockDatabase_UpdateKolideIssuesForDevice_Call) Return

func (*MockDatabase_UpdateKolideIssuesForDevice_Call) Run

func (*MockDatabase_UpdateKolideIssuesForDevice_Call) RunAndReturn

type MockDatabase_UpdateKolideIssues_Call

type MockDatabase_UpdateKolideIssues_Call struct {
	*mock.Call
}

MockDatabase_UpdateKolideIssues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateKolideIssues'

func (*MockDatabase_UpdateKolideIssues_Call) Return

func (*MockDatabase_UpdateKolideIssues_Call) Run

func (*MockDatabase_UpdateKolideIssues_Call) RunAndReturn

type Querier

type Querier interface {
	sqlc.Querier
	Transaction(ctx context.Context, callback func(ctx context.Context, queries *sqlc.Queries) error) error
}

type Queries

type Queries struct {
	*sqlc.Queries
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(db *sql.DB) *Queries

func (*Queries) Transaction

func (q *Queries) Transaction(ctx context.Context, callback func(ctx context.Context, queries *sqlc.Queries) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL