3470 lines
112 KiB
Go
3470 lines
112 KiB
Go
// Code generated by mockery v2.47.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
database "dynatron.me/x/stillbox/pkg/database"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
pgtype "github.com/jackc/pgx/v5/pgtype"
|
|
|
|
pgx "github.com/jackc/pgx/v5"
|
|
|
|
time "time"
|
|
|
|
uuid "github.com/google/uuid"
|
|
)
|
|
|
|
// Store is an autogenerated mock type for the Store type
|
|
type Store struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Store_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Store) EXPECT() *Store_Expecter {
|
|
return &Store_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddAlert provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) AddAlert(ctx context.Context, arg database.AddAlertParams) error {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddAlert")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.AddAlertParams) error); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_AddAlert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAlert'
|
|
type Store_AddAlert_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddAlert is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.AddAlertParams
|
|
func (_e *Store_Expecter) AddAlert(ctx interface{}, arg interface{}) *Store_AddAlert_Call {
|
|
return &Store_AddAlert_Call{Call: _e.mock.On("AddAlert", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_AddAlert_Call) Run(run func(ctx context.Context, arg database.AddAlertParams)) *Store_AddAlert_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.AddAlertParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddAlert_Call) Return(_a0 error) *Store_AddAlert_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddAlert_Call) RunAndReturn(run func(context.Context, database.AddAlertParams) error) *Store_AddAlert_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AddCall provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) AddCall(ctx context.Context, arg database.AddCallParams) error {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddCall")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.AddCallParams) error); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_AddCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCall'
|
|
type Store_AddCall_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddCall is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.AddCallParams
|
|
func (_e *Store_Expecter) AddCall(ctx interface{}, arg interface{}) *Store_AddCall_Call {
|
|
return &Store_AddCall_Call{Call: _e.mock.On("AddCall", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_AddCall_Call) Run(run func(ctx context.Context, arg database.AddCallParams)) *Store_AddCall_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.AddCallParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddCall_Call) Return(_a0 error) *Store_AddCall_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddCall_Call) RunAndReturn(run func(context.Context, database.AddCallParams) error) *Store_AddCall_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AddLearnedTalkgroup provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) AddLearnedTalkgroup(ctx context.Context, arg database.AddLearnedTalkgroupParams) (database.Talkgroup, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddLearnedTalkgroup")
|
|
}
|
|
|
|
var r0 database.Talkgroup
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.AddLearnedTalkgroupParams) (database.Talkgroup, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.AddLearnedTalkgroupParams) database.Talkgroup); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Talkgroup)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.AddLearnedTalkgroupParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_AddLearnedTalkgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddLearnedTalkgroup'
|
|
type Store_AddLearnedTalkgroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddLearnedTalkgroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.AddLearnedTalkgroupParams
|
|
func (_e *Store_Expecter) AddLearnedTalkgroup(ctx interface{}, arg interface{}) *Store_AddLearnedTalkgroup_Call {
|
|
return &Store_AddLearnedTalkgroup_Call{Call: _e.mock.On("AddLearnedTalkgroup", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_AddLearnedTalkgroup_Call) Run(run func(ctx context.Context, arg database.AddLearnedTalkgroupParams)) *Store_AddLearnedTalkgroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.AddLearnedTalkgroupParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddLearnedTalkgroup_Call) Return(_a0 database.Talkgroup, _a1 error) *Store_AddLearnedTalkgroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddLearnedTalkgroup_Call) RunAndReturn(run func(context.Context, database.AddLearnedTalkgroupParams) (database.Talkgroup, error)) *Store_AddLearnedTalkgroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// AddToIncident provides a mock function with given fields: ctx, incidentID, callIds, notes
|
|
func (_m *Store) AddToIncident(ctx context.Context, incidentID uuid.UUID, callIds []uuid.UUID, notes [][]byte) error {
|
|
ret := _m.Called(ctx, incidentID, callIds, notes)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddToIncident")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, []uuid.UUID, [][]byte) error); ok {
|
|
r0 = rf(ctx, incidentID, callIds, notes)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_AddToIncident_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddToIncident'
|
|
type Store_AddToIncident_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddToIncident is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - incidentID uuid.UUID
|
|
// - callIds []uuid.UUID
|
|
// - notes [][]byte
|
|
func (_e *Store_Expecter) AddToIncident(ctx interface{}, incidentID interface{}, callIds interface{}, notes interface{}) *Store_AddToIncident_Call {
|
|
return &Store_AddToIncident_Call{Call: _e.mock.On("AddToIncident", ctx, incidentID, callIds, notes)}
|
|
}
|
|
|
|
func (_c *Store_AddToIncident_Call) Run(run func(ctx context.Context, incidentID uuid.UUID, callIds []uuid.UUID, notes [][]byte)) *Store_AddToIncident_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uuid.UUID), args[2].([]uuid.UUID), args[3].([][]byte))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddToIncident_Call) Return(_a0 error) *Store_AddToIncident_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_AddToIncident_Call) RunAndReturn(run func(context.Context, uuid.UUID, []uuid.UUID, [][]byte) error) *Store_AddToIncident_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// BulkSetTalkgroupTags provides a mock function with given fields: ctx, tgs, tags
|
|
func (_m *Store) BulkSetTalkgroupTags(ctx context.Context, tgs database.TGTuples, tags []string) error {
|
|
ret := _m.Called(ctx, tgs, tags)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for BulkSetTalkgroupTags")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.TGTuples, []string) error); ok {
|
|
r0 = rf(ctx, tgs, tags)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_BulkSetTalkgroupTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BulkSetTalkgroupTags'
|
|
type Store_BulkSetTalkgroupTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// BulkSetTalkgroupTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tgs database.TGTuples
|
|
// - tags []string
|
|
func (_e *Store_Expecter) BulkSetTalkgroupTags(ctx interface{}, tgs interface{}, tags interface{}) *Store_BulkSetTalkgroupTags_Call {
|
|
return &Store_BulkSetTalkgroupTags_Call{Call: _e.mock.On("BulkSetTalkgroupTags", ctx, tgs, tags)}
|
|
}
|
|
|
|
func (_c *Store_BulkSetTalkgroupTags_Call) Run(run func(ctx context.Context, tgs database.TGTuples, tags []string)) *Store_BulkSetTalkgroupTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.TGTuples), args[2].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_BulkSetTalkgroupTags_Call) Return(_a0 error) *Store_BulkSetTalkgroupTags_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_BulkSetTalkgroupTags_Call) RunAndReturn(run func(context.Context, database.TGTuples, []string) error) *Store_BulkSetTalkgroupTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CleanupSweptCalls provides a mock function with given fields: ctx, rangeStart, rangeEnd
|
|
func (_m *Store) CleanupSweptCalls(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz) (int64, error) {
|
|
ret := _m.Called(ctx, rangeStart, rangeEnd)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CleanupSweptCalls")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)); ok {
|
|
return rf(ctx, rangeStart, rangeEnd)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) int64); ok {
|
|
r0 = rf(ctx, rangeStart, rangeEnd)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) error); ok {
|
|
r1 = rf(ctx, rangeStart, rangeEnd)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_CleanupSweptCalls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupSweptCalls'
|
|
type Store_CleanupSweptCalls_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CleanupSweptCalls is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - rangeStart pgtype.Timestamptz
|
|
// - rangeEnd pgtype.Timestamptz
|
|
func (_e *Store_Expecter) CleanupSweptCalls(ctx interface{}, rangeStart interface{}, rangeEnd interface{}) *Store_CleanupSweptCalls_Call {
|
|
return &Store_CleanupSweptCalls_Call{Call: _e.mock.On("CleanupSweptCalls", ctx, rangeStart, rangeEnd)}
|
|
}
|
|
|
|
func (_c *Store_CleanupSweptCalls_Call) Run(run func(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz)) *Store_CleanupSweptCalls_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(pgtype.Timestamptz), args[2].(pgtype.Timestamptz))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CleanupSweptCalls_Call) Return(_a0 int64, _a1 error) *Store_CleanupSweptCalls_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CleanupSweptCalls_Call) RunAndReturn(run func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)) *Store_CleanupSweptCalls_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateAPIKey provides a mock function with given fields: ctx, owner, expires, disabled
|
|
func (_m *Store) CreateAPIKey(ctx context.Context, owner int, expires pgtype.Timestamp, disabled *bool) (database.ApiKey, error) {
|
|
ret := _m.Called(ctx, owner, expires, disabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateAPIKey")
|
|
}
|
|
|
|
var r0 database.ApiKey
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, pgtype.Timestamp, *bool) (database.ApiKey, error)); ok {
|
|
return rf(ctx, owner, expires, disabled)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, pgtype.Timestamp, *bool) database.ApiKey); ok {
|
|
r0 = rf(ctx, owner, expires, disabled)
|
|
} else {
|
|
r0 = ret.Get(0).(database.ApiKey)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int, pgtype.Timestamp, *bool) error); ok {
|
|
r1 = rf(ctx, owner, expires, disabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_CreateAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAPIKey'
|
|
type Store_CreateAPIKey_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateAPIKey is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - owner int
|
|
// - expires pgtype.Timestamp
|
|
// - disabled *bool
|
|
func (_e *Store_Expecter) CreateAPIKey(ctx interface{}, owner interface{}, expires interface{}, disabled interface{}) *Store_CreateAPIKey_Call {
|
|
return &Store_CreateAPIKey_Call{Call: _e.mock.On("CreateAPIKey", ctx, owner, expires, disabled)}
|
|
}
|
|
|
|
func (_c *Store_CreateAPIKey_Call) Run(run func(ctx context.Context, owner int, expires pgtype.Timestamp, disabled *bool)) *Store_CreateAPIKey_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int), args[2].(pgtype.Timestamp), args[3].(*bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateAPIKey_Call) Return(_a0 database.ApiKey, _a1 error) *Store_CreateAPIKey_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateAPIKey_Call) RunAndReturn(run func(context.Context, int, pgtype.Timestamp, *bool) (database.ApiKey, error)) *Store_CreateAPIKey_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateIncident provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) CreateIncident(ctx context.Context, arg database.CreateIncidentParams) (database.Incident, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateIncident")
|
|
}
|
|
|
|
var r0 database.Incident
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.CreateIncidentParams) (database.Incident, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.CreateIncidentParams) database.Incident); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Incident)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.CreateIncidentParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_CreateIncident_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateIncident'
|
|
type Store_CreateIncident_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateIncident is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.CreateIncidentParams
|
|
func (_e *Store_Expecter) CreateIncident(ctx interface{}, arg interface{}) *Store_CreateIncident_Call {
|
|
return &Store_CreateIncident_Call{Call: _e.mock.On("CreateIncident", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_CreateIncident_Call) Run(run func(ctx context.Context, arg database.CreateIncidentParams)) *Store_CreateIncident_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.CreateIncidentParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateIncident_Call) Return(_a0 database.Incident, _a1 error) *Store_CreateIncident_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateIncident_Call) RunAndReturn(run func(context.Context, database.CreateIncidentParams) (database.Incident, error)) *Store_CreateIncident_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreatePartition provides a mock function with given fields: ctx, parentTable, partitionName, start, end
|
|
func (_m *Store) CreatePartition(ctx context.Context, parentTable string, partitionName string, start time.Time, end time.Time) error {
|
|
ret := _m.Called(ctx, parentTable, partitionName, start, end)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreatePartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Time, time.Time) error); ok {
|
|
r0 = rf(ctx, parentTable, partitionName, start, end)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_CreatePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePartition'
|
|
type Store_CreatePartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreatePartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - parentTable string
|
|
// - partitionName string
|
|
// - start time.Time
|
|
// - end time.Time
|
|
func (_e *Store_Expecter) CreatePartition(ctx interface{}, parentTable interface{}, partitionName interface{}, start interface{}, end interface{}) *Store_CreatePartition_Call {
|
|
return &Store_CreatePartition_Call{Call: _e.mock.On("CreatePartition", ctx, parentTable, partitionName, start, end)}
|
|
}
|
|
|
|
func (_c *Store_CreatePartition_Call) Run(run func(ctx context.Context, parentTable string, partitionName string, start time.Time, end time.Time)) *Store_CreatePartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(time.Time), args[4].(time.Time))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreatePartition_Call) Return(_a0 error) *Store_CreatePartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreatePartition_Call) RunAndReturn(run func(context.Context, string, string, time.Time, time.Time) error) *Store_CreatePartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateSystem provides a mock function with given fields: ctx, iD, name
|
|
func (_m *Store) CreateSystem(ctx context.Context, iD int, name string) error {
|
|
ret := _m.Called(ctx, iD, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateSystem")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok {
|
|
r0 = rf(ctx, iD, name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_CreateSystem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSystem'
|
|
type Store_CreateSystem_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateSystem is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - iD int
|
|
// - name string
|
|
func (_e *Store_Expecter) CreateSystem(ctx interface{}, iD interface{}, name interface{}) *Store_CreateSystem_Call {
|
|
return &Store_CreateSystem_Call{Call: _e.mock.On("CreateSystem", ctx, iD, name)}
|
|
}
|
|
|
|
func (_c *Store_CreateSystem_Call) Run(run func(ctx context.Context, iD int, name string)) *Store_CreateSystem_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateSystem_Call) Return(_a0 error) *Store_CreateSystem_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateSystem_Call) RunAndReturn(run func(context.Context, int, string) error) *Store_CreateSystem_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateUser provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) CreateUser(ctx context.Context, arg database.CreateUserParams) (database.User, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateUser")
|
|
}
|
|
|
|
var r0 database.User
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.CreateUserParams) (database.User, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.CreateUserParams) database.User); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(database.User)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.CreateUserParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
|
|
type Store_CreateUser_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateUser is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.CreateUserParams
|
|
func (_e *Store_Expecter) CreateUser(ctx interface{}, arg interface{}) *Store_CreateUser_Call {
|
|
return &Store_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_CreateUser_Call) Run(run func(ctx context.Context, arg database.CreateUserParams)) *Store_CreateUser_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.CreateUserParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateUser_Call) Return(_a0 database.User, _a1 error) *Store_CreateUser_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_CreateUser_Call) RunAndReturn(run func(context.Context, database.CreateUserParams) (database.User, error)) *Store_CreateUser_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DB provides a mock function with given fields:
|
|
func (_m *Store) DB() *database.Postgres {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DB")
|
|
}
|
|
|
|
var r0 *database.Postgres
|
|
if rf, ok := ret.Get(0).(func() *database.Postgres); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*database.Postgres)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DB'
|
|
type Store_DB_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DB is a helper method to define mock.On call
|
|
func (_e *Store_Expecter) DB() *Store_DB_Call {
|
|
return &Store_DB_Call{Call: _e.mock.On("DB")}
|
|
}
|
|
|
|
func (_c *Store_DB_Call) Run(run func()) *Store_DB_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DB_Call) Return(_a0 *database.Postgres) *Store_DB_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DB_Call) RunAndReturn(run func() *database.Postgres) *Store_DB_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DBTX provides a mock function with given fields:
|
|
func (_m *Store) DBTX() database.DBTX {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DBTX")
|
|
}
|
|
|
|
var r0 database.DBTX
|
|
if rf, ok := ret.Get(0).(func() database.DBTX); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(database.DBTX)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DBTX_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DBTX'
|
|
type Store_DBTX_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DBTX is a helper method to define mock.On call
|
|
func (_e *Store_Expecter) DBTX() *Store_DBTX_Call {
|
|
return &Store_DBTX_Call{Call: _e.mock.On("DBTX")}
|
|
}
|
|
|
|
func (_c *Store_DBTX_Call) Run(run func()) *Store_DBTX_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DBTX_Call) Return(_a0 database.DBTX) *Store_DBTX_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DBTX_Call) RunAndReturn(run func() database.DBTX) *Store_DBTX_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteAPIKey provides a mock function with given fields: ctx, apiKey
|
|
func (_m *Store) DeleteAPIKey(ctx context.Context, apiKey string) error {
|
|
ret := _m.Called(ctx, apiKey)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteAPIKey")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = rf(ctx, apiKey)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DeleteAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAPIKey'
|
|
type Store_DeleteAPIKey_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteAPIKey is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - apiKey string
|
|
func (_e *Store_Expecter) DeleteAPIKey(ctx interface{}, apiKey interface{}) *Store_DeleteAPIKey_Call {
|
|
return &Store_DeleteAPIKey_Call{Call: _e.mock.On("DeleteAPIKey", ctx, apiKey)}
|
|
}
|
|
|
|
func (_c *Store_DeleteAPIKey_Call) Run(run func(ctx context.Context, apiKey string)) *Store_DeleteAPIKey_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteAPIKey_Call) Return(_a0 error) *Store_DeleteAPIKey_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteAPIKey_Call) RunAndReturn(run func(context.Context, string) error) *Store_DeleteAPIKey_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteIncident provides a mock function with given fields: ctx, id
|
|
func (_m *Store) DeleteIncident(ctx context.Context, id uuid.UUID) error {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteIncident")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DeleteIncident_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIncident'
|
|
type Store_DeleteIncident_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteIncident is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id uuid.UUID
|
|
func (_e *Store_Expecter) DeleteIncident(ctx interface{}, id interface{}) *Store_DeleteIncident_Call {
|
|
return &Store_DeleteIncident_Call{Call: _e.mock.On("DeleteIncident", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_DeleteIncident_Call) Run(run func(ctx context.Context, id uuid.UUID)) *Store_DeleteIncident_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uuid.UUID))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteIncident_Call) Return(_a0 error) *Store_DeleteIncident_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteIncident_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *Store_DeleteIncident_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteSystem provides a mock function with given fields: ctx, id
|
|
func (_m *Store) DeleteSystem(ctx context.Context, id int) error {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteSystem")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DeleteSystem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSystem'
|
|
type Store_DeleteSystem_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteSystem is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id int
|
|
func (_e *Store_Expecter) DeleteSystem(ctx interface{}, id interface{}) *Store_DeleteSystem_Call {
|
|
return &Store_DeleteSystem_Call{Call: _e.mock.On("DeleteSystem", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_DeleteSystem_Call) Run(run func(ctx context.Context, id int)) *Store_DeleteSystem_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteSystem_Call) Return(_a0 error) *Store_DeleteSystem_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteSystem_Call) RunAndReturn(run func(context.Context, int) error) *Store_DeleteSystem_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteTalkgroup provides a mock function with given fields: ctx, systemID, tGID
|
|
func (_m *Store) DeleteTalkgroup(ctx context.Context, systemID int32, tGID int32) error {
|
|
ret := _m.Called(ctx, systemID, tGID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteTalkgroup")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) error); ok {
|
|
r0 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DeleteTalkgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTalkgroup'
|
|
type Store_DeleteTalkgroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteTalkgroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID int32
|
|
// - tGID int32
|
|
func (_e *Store_Expecter) DeleteTalkgroup(ctx interface{}, systemID interface{}, tGID interface{}) *Store_DeleteTalkgroup_Call {
|
|
return &Store_DeleteTalkgroup_Call{Call: _e.mock.On("DeleteTalkgroup", ctx, systemID, tGID)}
|
|
}
|
|
|
|
func (_c *Store_DeleteTalkgroup_Call) Run(run func(ctx context.Context, systemID int32, tGID int32)) *Store_DeleteTalkgroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32), args[2].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteTalkgroup_Call) Return(_a0 error) *Store_DeleteTalkgroup_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteTalkgroup_Call) RunAndReturn(run func(context.Context, int32, int32) error) *Store_DeleteTalkgroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteUser provides a mock function with given fields: ctx, username
|
|
func (_m *Store) DeleteUser(ctx context.Context, username string) error {
|
|
ret := _m.Called(ctx, username)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteUser")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = rf(ctx, username)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'
|
|
type Store_DeleteUser_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteUser is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - username string
|
|
func (_e *Store_Expecter) DeleteUser(ctx interface{}, username interface{}) *Store_DeleteUser_Call {
|
|
return &Store_DeleteUser_Call{Call: _e.mock.On("DeleteUser", ctx, username)}
|
|
}
|
|
|
|
func (_c *Store_DeleteUser_Call) Run(run func(ctx context.Context, username string)) *Store_DeleteUser_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteUser_Call) Return(_a0 error) *Store_DeleteUser_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DeleteUser_Call) RunAndReturn(run func(context.Context, string) error) *Store_DeleteUser_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DetachPartition provides a mock function with given fields: ctx, parentTable, partitionName
|
|
func (_m *Store) DetachPartition(ctx context.Context, parentTable string, partitionName string) error {
|
|
ret := _m.Called(ctx, parentTable, partitionName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DetachPartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = rf(ctx, parentTable, partitionName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DetachPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetachPartition'
|
|
type Store_DetachPartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DetachPartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - parentTable string
|
|
// - partitionName string
|
|
func (_e *Store_Expecter) DetachPartition(ctx interface{}, parentTable interface{}, partitionName interface{}) *Store_DetachPartition_Call {
|
|
return &Store_DetachPartition_Call{Call: _e.mock.On("DetachPartition", ctx, parentTable, partitionName)}
|
|
}
|
|
|
|
func (_c *Store_DetachPartition_Call) Run(run func(ctx context.Context, parentTable string, partitionName string)) *Store_DetachPartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DetachPartition_Call) Return(_a0 error) *Store_DetachPartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DetachPartition_Call) RunAndReturn(run func(context.Context, string, string) error) *Store_DetachPartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropPartition provides a mock function with given fields: ctx, partitionName
|
|
func (_m *Store) DropPartition(ctx context.Context, partitionName string) error {
|
|
ret := _m.Called(ctx, partitionName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropPartition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = rf(ctx, partitionName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_DropPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPartition'
|
|
type Store_DropPartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropPartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - partitionName string
|
|
func (_e *Store_Expecter) DropPartition(ctx interface{}, partitionName interface{}) *Store_DropPartition_Call {
|
|
return &Store_DropPartition_Call{Call: _e.mock.On("DropPartition", ctx, partitionName)}
|
|
}
|
|
|
|
func (_c *Store_DropPartition_Call) Run(run func(ctx context.Context, partitionName string)) *Store_DropPartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DropPartition_Call) Return(_a0 error) *Store_DropPartition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_DropPartition_Call) RunAndReturn(run func(context.Context, string) error) *Store_DropPartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAPIKey provides a mock function with given fields: ctx, apiKey
|
|
func (_m *Store) GetAPIKey(ctx context.Context, apiKey string) (database.ApiKey, error) {
|
|
ret := _m.Called(ctx, apiKey)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAPIKey")
|
|
}
|
|
|
|
var r0 database.ApiKey
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (database.ApiKey, error)); ok {
|
|
return rf(ctx, apiKey)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) database.ApiKey); ok {
|
|
r0 = rf(ctx, apiKey)
|
|
} else {
|
|
r0 = ret.Get(0).(database.ApiKey)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, apiKey)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIKey'
|
|
type Store_GetAPIKey_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAPIKey is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - apiKey string
|
|
func (_e *Store_Expecter) GetAPIKey(ctx interface{}, apiKey interface{}) *Store_GetAPIKey_Call {
|
|
return &Store_GetAPIKey_Call{Call: _e.mock.On("GetAPIKey", ctx, apiKey)}
|
|
}
|
|
|
|
func (_c *Store_GetAPIKey_Call) Run(run func(ctx context.Context, apiKey string)) *Store_GetAPIKey_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAPIKey_Call) Return(_a0 database.ApiKey, _a1 error) *Store_GetAPIKey_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAPIKey_Call) RunAndReturn(run func(context.Context, string) (database.ApiKey, error)) *Store_GetAPIKey_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAllTalkgroupTags provides a mock function with given fields: ctx
|
|
func (_m *Store) GetAllTalkgroupTags(ctx context.Context) ([]string, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAllTalkgroupTags")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetAllTalkgroupTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTalkgroupTags'
|
|
type Store_GetAllTalkgroupTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAllTalkgroupTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Store_Expecter) GetAllTalkgroupTags(ctx interface{}) *Store_GetAllTalkgroupTags_Call {
|
|
return &Store_GetAllTalkgroupTags_Call{Call: _e.mock.On("GetAllTalkgroupTags", ctx)}
|
|
}
|
|
|
|
func (_c *Store_GetAllTalkgroupTags_Call) Run(run func(ctx context.Context)) *Store_GetAllTalkgroupTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAllTalkgroupTags_Call) Return(_a0 []string, _a1 error) *Store_GetAllTalkgroupTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAllTalkgroupTags_Call) RunAndReturn(run func(context.Context) ([]string, error)) *Store_GetAllTalkgroupTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAppPrefs provides a mock function with given fields: ctx, appName, uid
|
|
func (_m *Store) GetAppPrefs(ctx context.Context, appName string, uid int) ([]byte, error) {
|
|
ret := _m.Called(ctx, appName, uid)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAppPrefs")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, int) ([]byte, error)); ok {
|
|
return rf(ctx, appName, uid)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, int) []byte); ok {
|
|
r0 = rf(ctx, appName, uid)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
|
|
r1 = rf(ctx, appName, uid)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetAppPrefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppPrefs'
|
|
type Store_GetAppPrefs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAppPrefs is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - appName string
|
|
// - uid int
|
|
func (_e *Store_Expecter) GetAppPrefs(ctx interface{}, appName interface{}, uid interface{}) *Store_GetAppPrefs_Call {
|
|
return &Store_GetAppPrefs_Call{Call: _e.mock.On("GetAppPrefs", ctx, appName, uid)}
|
|
}
|
|
|
|
func (_c *Store_GetAppPrefs_Call) Run(run func(ctx context.Context, appName string, uid int)) *Store_GetAppPrefs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAppPrefs_Call) Return(_a0 []byte, _a1 error) *Store_GetAppPrefs_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetAppPrefs_Call) RunAndReturn(run func(context.Context, string, int) ([]byte, error)) *Store_GetAppPrefs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCallAudioByID provides a mock function with given fields: ctx, id
|
|
func (_m *Store) GetCallAudioByID(ctx context.Context, id uuid.UUID) (database.GetCallAudioByIDRow, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCallAudioByID")
|
|
}
|
|
|
|
var r0 database.GetCallAudioByIDRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (database.GetCallAudioByIDRow, error)); ok {
|
|
return rf(ctx, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) database.GetCallAudioByIDRow); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Get(0).(database.GetCallAudioByIDRow)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetCallAudioByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCallAudioByID'
|
|
type Store_GetCallAudioByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCallAudioByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id uuid.UUID
|
|
func (_e *Store_Expecter) GetCallAudioByID(ctx interface{}, id interface{}) *Store_GetCallAudioByID_Call {
|
|
return &Store_GetCallAudioByID_Call{Call: _e.mock.On("GetCallAudioByID", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_GetCallAudioByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *Store_GetCallAudioByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uuid.UUID))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetCallAudioByID_Call) Return(_a0 database.GetCallAudioByIDRow, _a1 error) *Store_GetCallAudioByID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetCallAudioByID_Call) RunAndReturn(run func(context.Context, uuid.UUID) (database.GetCallAudioByIDRow, error)) *Store_GetCallAudioByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDatabaseSize provides a mock function with given fields: ctx
|
|
func (_m *Store) GetDatabaseSize(ctx context.Context) (string, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDatabaseSize")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) string); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetDatabaseSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatabaseSize'
|
|
type Store_GetDatabaseSize_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDatabaseSize is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Store_Expecter) GetDatabaseSize(ctx interface{}) *Store_GetDatabaseSize_Call {
|
|
return &Store_GetDatabaseSize_Call{Call: _e.mock.On("GetDatabaseSize", ctx)}
|
|
}
|
|
|
|
func (_c *Store_GetDatabaseSize_Call) Run(run func(ctx context.Context)) *Store_GetDatabaseSize_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetDatabaseSize_Call) Return(_a0 string, _a1 error) *Store_GetDatabaseSize_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetDatabaseSize_Call) RunAndReturn(run func(context.Context) (string, error)) *Store_GetDatabaseSize_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetIncident provides a mock function with given fields: ctx, id
|
|
func (_m *Store) GetIncident(ctx context.Context, id uuid.UUID) (database.Incident, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetIncident")
|
|
}
|
|
|
|
var r0 database.Incident
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (database.Incident, error)); ok {
|
|
return rf(ctx, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) database.Incident); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Incident)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetIncident_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIncident'
|
|
type Store_GetIncident_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetIncident is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id uuid.UUID
|
|
func (_e *Store_Expecter) GetIncident(ctx interface{}, id interface{}) *Store_GetIncident_Call {
|
|
return &Store_GetIncident_Call{Call: _e.mock.On("GetIncident", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_GetIncident_Call) Run(run func(ctx context.Context, id uuid.UUID)) *Store_GetIncident_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uuid.UUID))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetIncident_Call) Return(_a0 database.Incident, _a1 error) *Store_GetIncident_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetIncident_Call) RunAndReturn(run func(context.Context, uuid.UUID) (database.Incident, error)) *Store_GetIncident_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetSystemName provides a mock function with given fields: ctx, systemID
|
|
func (_m *Store) GetSystemName(ctx context.Context, systemID int) (string, error) {
|
|
ret := _m.Called(ctx, systemID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetSystemName")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) (string, error)); ok {
|
|
return rf(ctx, systemID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) string); ok {
|
|
r0 = rf(ctx, systemID)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, systemID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetSystemName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSystemName'
|
|
type Store_GetSystemName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetSystemName is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID int
|
|
func (_e *Store_Expecter) GetSystemName(ctx interface{}, systemID interface{}) *Store_GetSystemName_Call {
|
|
return &Store_GetSystemName_Call{Call: _e.mock.On("GetSystemName", ctx, systemID)}
|
|
}
|
|
|
|
func (_c *Store_GetSystemName_Call) Run(run func(ctx context.Context, systemID int)) *Store_GetSystemName_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetSystemName_Call) Return(_a0 string, _a1 error) *Store_GetSystemName_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetSystemName_Call) RunAndReturn(run func(context.Context, int) (string, error)) *Store_GetSystemName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTablePartitions provides a mock function with given fields: ctx, schemaName, tableName
|
|
func (_m *Store) GetTablePartitions(ctx context.Context, schemaName string, tableName string) ([]database.PartitionResult, error) {
|
|
ret := _m.Called(ctx, schemaName, tableName)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTablePartitions")
|
|
}
|
|
|
|
var r0 []database.PartitionResult
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]database.PartitionResult, error)); ok {
|
|
return rf(ctx, schemaName, tableName)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) []database.PartitionResult); ok {
|
|
r0 = rf(ctx, schemaName, tableName)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.PartitionResult)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = rf(ctx, schemaName, tableName)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTablePartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTablePartitions'
|
|
type Store_GetTablePartitions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTablePartitions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - schemaName string
|
|
// - tableName string
|
|
func (_e *Store_Expecter) GetTablePartitions(ctx interface{}, schemaName interface{}, tableName interface{}) *Store_GetTablePartitions_Call {
|
|
return &Store_GetTablePartitions_Call{Call: _e.mock.On("GetTablePartitions", ctx, schemaName, tableName)}
|
|
}
|
|
|
|
func (_c *Store_GetTablePartitions_Call) Run(run func(ctx context.Context, schemaName string, tableName string)) *Store_GetTablePartitions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTablePartitions_Call) Return(_a0 []database.PartitionResult, _a1 error) *Store_GetTablePartitions_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTablePartitions_Call) RunAndReturn(run func(context.Context, string, string) ([]database.PartitionResult, error)) *Store_GetTablePartitions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroup provides a mock function with given fields: ctx, systemID, tGID
|
|
func (_m *Store) GetTalkgroup(ctx context.Context, systemID int32, tGID int32) (database.GetTalkgroupRow, error) {
|
|
ret := _m.Called(ctx, systemID, tGID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroup")
|
|
}
|
|
|
|
var r0 database.GetTalkgroupRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) (database.GetTalkgroupRow, error)); ok {
|
|
return rf(ctx, systemID, tGID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) database.GetTalkgroupRow); ok {
|
|
r0 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r0 = ret.Get(0).(database.GetTalkgroupRow)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int32, int32) error); ok {
|
|
r1 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroup'
|
|
type Store_GetTalkgroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID int32
|
|
// - tGID int32
|
|
func (_e *Store_Expecter) GetTalkgroup(ctx interface{}, systemID interface{}, tGID interface{}) *Store_GetTalkgroup_Call {
|
|
return &Store_GetTalkgroup_Call{Call: _e.mock.On("GetTalkgroup", ctx, systemID, tGID)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroup_Call) Run(run func(ctx context.Context, systemID int32, tGID int32)) *Store_GetTalkgroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32), args[2].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroup_Call) Return(_a0 database.GetTalkgroupRow, _a1 error) *Store_GetTalkgroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroup_Call) RunAndReturn(run func(context.Context, int32, int32) (database.GetTalkgroupRow, error)) *Store_GetTalkgroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupIDsByTags provides a mock function with given fields: ctx, anyTags, allTags, notTags
|
|
func (_m *Store) GetTalkgroupIDsByTags(ctx context.Context, anyTags []string, allTags []string, notTags []string) ([]database.GetTalkgroupIDsByTagsRow, error) {
|
|
ret := _m.Called(ctx, anyTags, allTags, notTags)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupIDsByTags")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupIDsByTagsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, []string, []string) ([]database.GetTalkgroupIDsByTagsRow, error)); ok {
|
|
return rf(ctx, anyTags, allTags, notTags)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, []string, []string) []database.GetTalkgroupIDsByTagsRow); ok {
|
|
r0 = rf(ctx, anyTags, allTags, notTags)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupIDsByTagsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, []string, []string) error); ok {
|
|
r1 = rf(ctx, anyTags, allTags, notTags)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupIDsByTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupIDsByTags'
|
|
type Store_GetTalkgroupIDsByTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupIDsByTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - anyTags []string
|
|
// - allTags []string
|
|
// - notTags []string
|
|
func (_e *Store_Expecter) GetTalkgroupIDsByTags(ctx interface{}, anyTags interface{}, allTags interface{}, notTags interface{}) *Store_GetTalkgroupIDsByTags_Call {
|
|
return &Store_GetTalkgroupIDsByTags_Call{Call: _e.mock.On("GetTalkgroupIDsByTags", ctx, anyTags, allTags, notTags)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupIDsByTags_Call) Run(run func(ctx context.Context, anyTags []string, allTags []string, notTags []string)) *Store_GetTalkgroupIDsByTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]string), args[2].([]string), args[3].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupIDsByTags_Call) Return(_a0 []database.GetTalkgroupIDsByTagsRow, _a1 error) *Store_GetTalkgroupIDsByTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupIDsByTags_Call) RunAndReturn(run func(context.Context, []string, []string, []string) ([]database.GetTalkgroupIDsByTagsRow, error)) *Store_GetTalkgroupIDsByTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupTags provides a mock function with given fields: ctx, systemID, tGID
|
|
func (_m *Store) GetTalkgroupTags(ctx context.Context, systemID int32, tGID int32) ([]string, error) {
|
|
ret := _m.Called(ctx, systemID, tGID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupTags")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) ([]string, error)); ok {
|
|
return rf(ctx, systemID, tGID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) []string); ok {
|
|
r0 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int32, int32) error); ok {
|
|
r1 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupTags'
|
|
type Store_GetTalkgroupTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID int32
|
|
// - tGID int32
|
|
func (_e *Store_Expecter) GetTalkgroupTags(ctx interface{}, systemID interface{}, tGID interface{}) *Store_GetTalkgroupTags_Call {
|
|
return &Store_GetTalkgroupTags_Call{Call: _e.mock.On("GetTalkgroupTags", ctx, systemID, tGID)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupTags_Call) Run(run func(ctx context.Context, systemID int32, tGID int32)) *Store_GetTalkgroupTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32), args[2].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupTags_Call) Return(_a0 []string, _a1 error) *Store_GetTalkgroupTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupTags_Call) RunAndReturn(run func(context.Context, int32, int32) ([]string, error)) *Store_GetTalkgroupTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupWithLearned provides a mock function with given fields: ctx, systemID, tGID
|
|
func (_m *Store) GetTalkgroupWithLearned(ctx context.Context, systemID int32, tGID int32) (database.GetTalkgroupWithLearnedRow, error) {
|
|
ret := _m.Called(ctx, systemID, tGID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupWithLearned")
|
|
}
|
|
|
|
var r0 database.GetTalkgroupWithLearnedRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) (database.GetTalkgroupWithLearnedRow, error)); ok {
|
|
return rf(ctx, systemID, tGID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, int32) database.GetTalkgroupWithLearnedRow); ok {
|
|
r0 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r0 = ret.Get(0).(database.GetTalkgroupWithLearnedRow)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int32, int32) error); ok {
|
|
r1 = rf(ctx, systemID, tGID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupWithLearned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupWithLearned'
|
|
type Store_GetTalkgroupWithLearned_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupWithLearned is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID int32
|
|
// - tGID int32
|
|
func (_e *Store_Expecter) GetTalkgroupWithLearned(ctx interface{}, systemID interface{}, tGID interface{}) *Store_GetTalkgroupWithLearned_Call {
|
|
return &Store_GetTalkgroupWithLearned_Call{Call: _e.mock.On("GetTalkgroupWithLearned", ctx, systemID, tGID)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupWithLearned_Call) Run(run func(ctx context.Context, systemID int32, tGID int32)) *Store_GetTalkgroupWithLearned_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32), args[2].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupWithLearned_Call) Return(_a0 database.GetTalkgroupWithLearnedRow, _a1 error) *Store_GetTalkgroupWithLearned_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupWithLearned_Call) RunAndReturn(run func(context.Context, int32, int32) (database.GetTalkgroupWithLearnedRow, error)) *Store_GetTalkgroupWithLearned_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsBySysTGID provides a mock function with given fields: ctx, ids
|
|
func (_m *Store) GetTalkgroupsBySysTGID(ctx context.Context, ids database.TGTuples) ([]database.GetTalkgroupsRow, error) {
|
|
ret := _m.Called(ctx, ids)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsBySysTGID")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.TGTuples) ([]database.GetTalkgroupsRow, error)); ok {
|
|
return rf(ctx, ids)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.TGTuples) []database.GetTalkgroupsRow); ok {
|
|
r0 = rf(ctx, ids)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.TGTuples) error); ok {
|
|
r1 = rf(ctx, ids)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsBySysTGID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsBySysTGID'
|
|
type Store_GetTalkgroupsBySysTGID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsBySysTGID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - ids database.TGTuples
|
|
func (_e *Store_Expecter) GetTalkgroupsBySysTGID(ctx interface{}, ids interface{}) *Store_GetTalkgroupsBySysTGID_Call {
|
|
return &Store_GetTalkgroupsBySysTGID_Call{Call: _e.mock.On("GetTalkgroupsBySysTGID", ctx, ids)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsBySysTGID_Call) Run(run func(ctx context.Context, ids database.TGTuples)) *Store_GetTalkgroupsBySysTGID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.TGTuples))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsBySysTGID_Call) Return(_a0 []database.GetTalkgroupsRow, _a1 error) *Store_GetTalkgroupsBySysTGID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsBySysTGID_Call) RunAndReturn(run func(context.Context, database.TGTuples) ([]database.GetTalkgroupsRow, error)) *Store_GetTalkgroupsBySysTGID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithAllTags provides a mock function with given fields: ctx, tags
|
|
func (_m *Store) GetTalkgroupsWithAllTags(ctx context.Context, tags []string) ([]database.GetTalkgroupsWithAllTagsRow, error) {
|
|
ret := _m.Called(ctx, tags)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithAllTags")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithAllTagsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) ([]database.GetTalkgroupsWithAllTagsRow, error)); ok {
|
|
return rf(ctx, tags)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) []database.GetTalkgroupsWithAllTagsRow); ok {
|
|
r0 = rf(ctx, tags)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithAllTagsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
|
|
r1 = rf(ctx, tags)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithAllTags'
|
|
type Store_GetTalkgroupsWithAllTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithAllTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tags []string
|
|
func (_e *Store_Expecter) GetTalkgroupsWithAllTags(ctx interface{}, tags interface{}) *Store_GetTalkgroupsWithAllTags_Call {
|
|
return &Store_GetTalkgroupsWithAllTags_Call{Call: _e.mock.On("GetTalkgroupsWithAllTags", ctx, tags)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAllTags_Call) Run(run func(ctx context.Context, tags []string)) *Store_GetTalkgroupsWithAllTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAllTags_Call) Return(_a0 []database.GetTalkgroupsWithAllTagsRow, _a1 error) *Store_GetTalkgroupsWithAllTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAllTags_Call) RunAndReturn(run func(context.Context, []string) ([]database.GetTalkgroupsWithAllTagsRow, error)) *Store_GetTalkgroupsWithAllTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithAnyTags provides a mock function with given fields: ctx, tags
|
|
func (_m *Store) GetTalkgroupsWithAnyTags(ctx context.Context, tags []string) ([]database.GetTalkgroupsWithAnyTagsRow, error) {
|
|
ret := _m.Called(ctx, tags)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithAnyTags")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithAnyTagsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) ([]database.GetTalkgroupsWithAnyTagsRow, error)); ok {
|
|
return rf(ctx, tags)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) []database.GetTalkgroupsWithAnyTagsRow); ok {
|
|
r0 = rf(ctx, tags)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithAnyTagsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
|
|
r1 = rf(ctx, tags)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithAnyTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithAnyTags'
|
|
type Store_GetTalkgroupsWithAnyTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithAnyTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tags []string
|
|
func (_e *Store_Expecter) GetTalkgroupsWithAnyTags(ctx interface{}, tags interface{}) *Store_GetTalkgroupsWithAnyTags_Call {
|
|
return &Store_GetTalkgroupsWithAnyTags_Call{Call: _e.mock.On("GetTalkgroupsWithAnyTags", ctx, tags)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAnyTags_Call) Run(run func(ctx context.Context, tags []string)) *Store_GetTalkgroupsWithAnyTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAnyTags_Call) Return(_a0 []database.GetTalkgroupsWithAnyTagsRow, _a1 error) *Store_GetTalkgroupsWithAnyTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithAnyTags_Call) RunAndReturn(run func(context.Context, []string) ([]database.GetTalkgroupsWithAnyTagsRow, error)) *Store_GetTalkgroupsWithAnyTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearned provides a mock function with given fields: ctx
|
|
func (_m *Store) GetTalkgroupsWithLearned(ctx context.Context) ([]database.GetTalkgroupsWithLearnedRow, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearned")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithLearnedRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]database.GetTalkgroupsWithLearnedRow, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []database.GetTalkgroupsWithLearnedRow); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithLearnedRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearned'
|
|
type Store_GetTalkgroupsWithLearned_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearned is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearned(ctx interface{}) *Store_GetTalkgroupsWithLearned_Call {
|
|
return &Store_GetTalkgroupsWithLearned_Call{Call: _e.mock.On("GetTalkgroupsWithLearned", ctx)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearned_Call) Run(run func(ctx context.Context)) *Store_GetTalkgroupsWithLearned_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearned_Call) Return(_a0 []database.GetTalkgroupsWithLearnedRow, _a1 error) *Store_GetTalkgroupsWithLearned_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearned_Call) RunAndReturn(run func(context.Context) ([]database.GetTalkgroupsWithLearnedRow, error)) *Store_GetTalkgroupsWithLearned_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySysTGID provides a mock function with given fields: ctx, ids
|
|
func (_m *Store) GetTalkgroupsWithLearnedBySysTGID(ctx context.Context, ids database.TGTuples) ([]database.GetTalkgroupsRow, error) {
|
|
ret := _m.Called(ctx, ids)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedBySysTGID")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.TGTuples) ([]database.GetTalkgroupsRow, error)); ok {
|
|
return rf(ctx, ids)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.TGTuples) []database.GetTalkgroupsRow); ok {
|
|
r0 = rf(ctx, ids)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.TGTuples) error); ok {
|
|
r1 = rf(ctx, ids)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedBySysTGID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedBySysTGID'
|
|
type Store_GetTalkgroupsWithLearnedBySysTGID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySysTGID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - ids database.TGTuples
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedBySysTGID(ctx interface{}, ids interface{}) *Store_GetTalkgroupsWithLearnedBySysTGID_Call {
|
|
return &Store_GetTalkgroupsWithLearnedBySysTGID_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedBySysTGID", ctx, ids)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySysTGID_Call) Run(run func(ctx context.Context, ids database.TGTuples)) *Store_GetTalkgroupsWithLearnedBySysTGID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.TGTuples))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySysTGID_Call) Return(_a0 []database.GetTalkgroupsRow, _a1 error) *Store_GetTalkgroupsWithLearnedBySysTGID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySysTGID_Call) RunAndReturn(run func(context.Context, database.TGTuples) ([]database.GetTalkgroupsRow, error)) *Store_GetTalkgroupsWithLearnedBySysTGID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystem provides a mock function with given fields: ctx, system
|
|
func (_m *Store) GetTalkgroupsWithLearnedBySystem(ctx context.Context, system int32) ([]database.GetTalkgroupsWithLearnedBySystemRow, error) {
|
|
ret := _m.Called(ctx, system)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedBySystem")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithLearnedBySystemRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32) ([]database.GetTalkgroupsWithLearnedBySystemRow, error)); ok {
|
|
return rf(ctx, system)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32) []database.GetTalkgroupsWithLearnedBySystemRow); ok {
|
|
r0 = rf(ctx, system)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithLearnedBySystemRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int32) error); ok {
|
|
r1 = rf(ctx, system)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedBySystem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedBySystem'
|
|
type Store_GetTalkgroupsWithLearnedBySystem_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystem is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - system int32
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedBySystem(ctx interface{}, system interface{}) *Store_GetTalkgroupsWithLearnedBySystem_Call {
|
|
return &Store_GetTalkgroupsWithLearnedBySystem_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedBySystem", ctx, system)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystem_Call) Run(run func(ctx context.Context, system int32)) *Store_GetTalkgroupsWithLearnedBySystem_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystem_Call) Return(_a0 []database.GetTalkgroupsWithLearnedBySystemRow, _a1 error) *Store_GetTalkgroupsWithLearnedBySystem_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystem_Call) RunAndReturn(run func(context.Context, int32) ([]database.GetTalkgroupsWithLearnedBySystemRow, error)) *Store_GetTalkgroupsWithLearnedBySystem_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystemCount provides a mock function with given fields: ctx, system, filter
|
|
func (_m *Store) GetTalkgroupsWithLearnedBySystemCount(ctx context.Context, system int32, filter *string) (int64, error) {
|
|
ret := _m.Called(ctx, system, filter)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedBySystemCount")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, *string) (int64, error)); ok {
|
|
return rf(ctx, system, filter)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int32, *string) int64); ok {
|
|
r0 = rf(ctx, system, filter)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int32, *string) error); ok {
|
|
r1 = rf(ctx, system, filter)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedBySystemCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedBySystemCount'
|
|
type Store_GetTalkgroupsWithLearnedBySystemCount_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystemCount is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - system int32
|
|
// - filter *string
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedBySystemCount(ctx interface{}, system interface{}, filter interface{}) *Store_GetTalkgroupsWithLearnedBySystemCount_Call {
|
|
return &Store_GetTalkgroupsWithLearnedBySystemCount_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedBySystemCount", ctx, system, filter)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemCount_Call) Run(run func(ctx context.Context, system int32, filter *string)) *Store_GetTalkgroupsWithLearnedBySystemCount_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int32), args[2].(*string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemCount_Call) Return(_a0 int64, _a1 error) *Store_GetTalkgroupsWithLearnedBySystemCount_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemCount_Call) RunAndReturn(run func(context.Context, int32, *string) (int64, error)) *Store_GetTalkgroupsWithLearnedBySystemCount_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystemP provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) GetTalkgroupsWithLearnedBySystemP(ctx context.Context, arg database.GetTalkgroupsWithLearnedBySystemPParams) ([]database.GetTalkgroupsWithLearnedBySystemPRow, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedBySystemP")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithLearnedBySystemPRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.GetTalkgroupsWithLearnedBySystemPParams) ([]database.GetTalkgroupsWithLearnedBySystemPRow, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.GetTalkgroupsWithLearnedBySystemPParams) []database.GetTalkgroupsWithLearnedBySystemPRow); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithLearnedBySystemPRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.GetTalkgroupsWithLearnedBySystemPParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedBySystemP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedBySystemP'
|
|
type Store_GetTalkgroupsWithLearnedBySystemP_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedBySystemP is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.GetTalkgroupsWithLearnedBySystemPParams
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedBySystemP(ctx interface{}, arg interface{}) *Store_GetTalkgroupsWithLearnedBySystemP_Call {
|
|
return &Store_GetTalkgroupsWithLearnedBySystemP_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedBySystemP", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemP_Call) Run(run func(ctx context.Context, arg database.GetTalkgroupsWithLearnedBySystemPParams)) *Store_GetTalkgroupsWithLearnedBySystemP_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.GetTalkgroupsWithLearnedBySystemPParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemP_Call) Return(_a0 []database.GetTalkgroupsWithLearnedBySystemPRow, _a1 error) *Store_GetTalkgroupsWithLearnedBySystemP_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedBySystemP_Call) RunAndReturn(run func(context.Context, database.GetTalkgroupsWithLearnedBySystemPParams) ([]database.GetTalkgroupsWithLearnedBySystemPRow, error)) *Store_GetTalkgroupsWithLearnedBySystemP_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedCount provides a mock function with given fields: ctx, filter
|
|
func (_m *Store) GetTalkgroupsWithLearnedCount(ctx context.Context, filter *string) (int64, error) {
|
|
ret := _m.Called(ctx, filter)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedCount")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *string) (int64, error)); ok {
|
|
return rf(ctx, filter)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *string) int64); ok {
|
|
r0 = rf(ctx, filter)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *string) error); ok {
|
|
r1 = rf(ctx, filter)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedCount'
|
|
type Store_GetTalkgroupsWithLearnedCount_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedCount is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - filter *string
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedCount(ctx interface{}, filter interface{}) *Store_GetTalkgroupsWithLearnedCount_Call {
|
|
return &Store_GetTalkgroupsWithLearnedCount_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedCount", ctx, filter)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedCount_Call) Run(run func(ctx context.Context, filter *string)) *Store_GetTalkgroupsWithLearnedCount_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedCount_Call) Return(_a0 int64, _a1 error) *Store_GetTalkgroupsWithLearnedCount_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedCount_Call) RunAndReturn(run func(context.Context, *string) (int64, error)) *Store_GetTalkgroupsWithLearnedCount_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedP provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) GetTalkgroupsWithLearnedP(ctx context.Context, arg database.GetTalkgroupsWithLearnedPParams) ([]database.GetTalkgroupsWithLearnedPRow, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTalkgroupsWithLearnedP")
|
|
}
|
|
|
|
var r0 []database.GetTalkgroupsWithLearnedPRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.GetTalkgroupsWithLearnedPParams) ([]database.GetTalkgroupsWithLearnedPRow, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.GetTalkgroupsWithLearnedPParams) []database.GetTalkgroupsWithLearnedPRow); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.GetTalkgroupsWithLearnedPRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.GetTalkgroupsWithLearnedPParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetTalkgroupsWithLearnedP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTalkgroupsWithLearnedP'
|
|
type Store_GetTalkgroupsWithLearnedP_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTalkgroupsWithLearnedP is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.GetTalkgroupsWithLearnedPParams
|
|
func (_e *Store_Expecter) GetTalkgroupsWithLearnedP(ctx interface{}, arg interface{}) *Store_GetTalkgroupsWithLearnedP_Call {
|
|
return &Store_GetTalkgroupsWithLearnedP_Call{Call: _e.mock.On("GetTalkgroupsWithLearnedP", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedP_Call) Run(run func(ctx context.Context, arg database.GetTalkgroupsWithLearnedPParams)) *Store_GetTalkgroupsWithLearnedP_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.GetTalkgroupsWithLearnedPParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedP_Call) Return(_a0 []database.GetTalkgroupsWithLearnedPRow, _a1 error) *Store_GetTalkgroupsWithLearnedP_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetTalkgroupsWithLearnedP_Call) RunAndReturn(run func(context.Context, database.GetTalkgroupsWithLearnedPParams) ([]database.GetTalkgroupsWithLearnedPRow, error)) *Store_GetTalkgroupsWithLearnedP_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetUserByID provides a mock function with given fields: ctx, id
|
|
func (_m *Store) GetUserByID(ctx context.Context, id int) (database.User, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetUserByID")
|
|
}
|
|
|
|
var r0 database.User
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) (database.User, error)); ok {
|
|
return rf(ctx, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) database.User); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Get(0).(database.User)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'
|
|
type Store_GetUserByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetUserByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id int
|
|
func (_e *Store_Expecter) GetUserByID(ctx interface{}, id interface{}) *Store_GetUserByID_Call {
|
|
return &Store_GetUserByID_Call{Call: _e.mock.On("GetUserByID", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_GetUserByID_Call) Run(run func(ctx context.Context, id int)) *Store_GetUserByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByID_Call) Return(_a0 database.User, _a1 error) *Store_GetUserByID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByID_Call) RunAndReturn(run func(context.Context, int) (database.User, error)) *Store_GetUserByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetUserByUID provides a mock function with given fields: ctx, id
|
|
func (_m *Store) GetUserByUID(ctx context.Context, id int) (database.User, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetUserByUID")
|
|
}
|
|
|
|
var r0 database.User
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) (database.User, error)); ok {
|
|
return rf(ctx, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) database.User); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Get(0).(database.User)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetUserByUID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByUID'
|
|
type Store_GetUserByUID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetUserByUID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id int
|
|
func (_e *Store_Expecter) GetUserByUID(ctx interface{}, id interface{}) *Store_GetUserByUID_Call {
|
|
return &Store_GetUserByUID_Call{Call: _e.mock.On("GetUserByUID", ctx, id)}
|
|
}
|
|
|
|
func (_c *Store_GetUserByUID_Call) Run(run func(ctx context.Context, id int)) *Store_GetUserByUID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByUID_Call) Return(_a0 database.User, _a1 error) *Store_GetUserByUID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByUID_Call) RunAndReturn(run func(context.Context, int) (database.User, error)) *Store_GetUserByUID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetUserByUsername provides a mock function with given fields: ctx, username
|
|
func (_m *Store) GetUserByUsername(ctx context.Context, username string) (database.User, error) {
|
|
ret := _m.Called(ctx, username)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetUserByUsername")
|
|
}
|
|
|
|
var r0 database.User
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (database.User, error)); ok {
|
|
return rf(ctx, username)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) database.User); ok {
|
|
r0 = rf(ctx, username)
|
|
} else {
|
|
r0 = ret.Get(0).(database.User)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, username)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetUserByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByUsername'
|
|
type Store_GetUserByUsername_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetUserByUsername is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - username string
|
|
func (_e *Store_Expecter) GetUserByUsername(ctx interface{}, username interface{}) *Store_GetUserByUsername_Call {
|
|
return &Store_GetUserByUsername_Call{Call: _e.mock.On("GetUserByUsername", ctx, username)}
|
|
}
|
|
|
|
func (_c *Store_GetUserByUsername_Call) Run(run func(ctx context.Context, username string)) *Store_GetUserByUsername_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByUsername_Call) Return(_a0 database.User, _a1 error) *Store_GetUserByUsername_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUserByUsername_Call) RunAndReturn(run func(context.Context, string) (database.User, error)) *Store_GetUserByUsername_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetUsers provides a mock function with given fields: ctx
|
|
func (_m *Store) GetUsers(ctx context.Context) ([]database.User, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetUsers")
|
|
}
|
|
|
|
var r0 []database.User
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]database.User, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []database.User); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.User)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_GetUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsers'
|
|
type Store_GetUsers_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetUsers is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Store_Expecter) GetUsers(ctx interface{}) *Store_GetUsers_Call {
|
|
return &Store_GetUsers_Call{Call: _e.mock.On("GetUsers", ctx)}
|
|
}
|
|
|
|
func (_c *Store_GetUsers_Call) Run(run func(ctx context.Context)) *Store_GetUsers_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUsers_Call) Return(_a0 []database.User, _a1 error) *Store_GetUsers_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_GetUsers_Call) RunAndReturn(run func(context.Context) ([]database.User, error)) *Store_GetUsers_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// InTx provides a mock function with given fields: _a0, _a1, _a2
|
|
func (_m *Store) InTx(_a0 context.Context, _a1 func(database.Store) error, _a2 pgx.TxOptions) error {
|
|
ret := _m.Called(_a0, _a1, _a2)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for InTx")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, func(database.Store) error, pgx.TxOptions) error); ok {
|
|
r0 = rf(_a0, _a1, _a2)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_InTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InTx'
|
|
type Store_InTx_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// InTx is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 func(database.Store) error
|
|
// - _a2 pgx.TxOptions
|
|
func (_e *Store_Expecter) InTx(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Store_InTx_Call {
|
|
return &Store_InTx_Call{Call: _e.mock.On("InTx", _a0, _a1, _a2)}
|
|
}
|
|
|
|
func (_c *Store_InTx_Call) Run(run func(_a0 context.Context, _a1 func(database.Store) error, _a2 pgx.TxOptions)) *Store_InTx_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(func(database.Store) error), args[2].(pgx.TxOptions))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_InTx_Call) Return(_a0 error) *Store_InTx_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_InTx_Call) RunAndReturn(run func(context.Context, func(database.Store) error, pgx.TxOptions) error) *Store_InTx_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IncidentCalls provides a mock function with given fields: ctx
|
|
func (_m *Store) IncidentCalls(ctx context.Context) ([]database.IncidentCallsRow, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IncidentCalls")
|
|
}
|
|
|
|
var r0 []database.IncidentCallsRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]database.IncidentCallsRow, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []database.IncidentCallsRow); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.IncidentCallsRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_IncidentCalls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncidentCalls'
|
|
type Store_IncidentCalls_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IncidentCalls is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Store_Expecter) IncidentCalls(ctx interface{}) *Store_IncidentCalls_Call {
|
|
return &Store_IncidentCalls_Call{Call: _e.mock.On("IncidentCalls", ctx)}
|
|
}
|
|
|
|
func (_c *Store_IncidentCalls_Call) Run(run func(ctx context.Context)) *Store_IncidentCalls_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_IncidentCalls_Call) Return(_a0 []database.IncidentCallsRow, _a1 error) *Store_IncidentCalls_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_IncidentCalls_Call) RunAndReturn(run func(context.Context) ([]database.IncidentCallsRow, error)) *Store_IncidentCalls_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCallsCount provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) ListCallsCount(ctx context.Context, arg database.ListCallsCountParams) (int64, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCallsCount")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListCallsCountParams) (int64, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListCallsCountParams) int64); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.ListCallsCountParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_ListCallsCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCallsCount'
|
|
type Store_ListCallsCount_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCallsCount is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.ListCallsCountParams
|
|
func (_e *Store_Expecter) ListCallsCount(ctx interface{}, arg interface{}) *Store_ListCallsCount_Call {
|
|
return &Store_ListCallsCount_Call{Call: _e.mock.On("ListCallsCount", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_ListCallsCount_Call) Run(run func(ctx context.Context, arg database.ListCallsCountParams)) *Store_ListCallsCount_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.ListCallsCountParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListCallsCount_Call) Return(_a0 int64, _a1 error) *Store_ListCallsCount_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListCallsCount_Call) RunAndReturn(run func(context.Context, database.ListCallsCountParams) (int64, error)) *Store_ListCallsCount_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCallsP provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) ListCallsP(ctx context.Context, arg database.ListCallsPParams) ([]database.ListCallsPRow, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCallsP")
|
|
}
|
|
|
|
var r0 []database.ListCallsPRow
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListCallsPParams) ([]database.ListCallsPRow, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListCallsPParams) []database.ListCallsPRow); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.ListCallsPRow)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.ListCallsPParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_ListCallsP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCallsP'
|
|
type Store_ListCallsP_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCallsP is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.ListCallsPParams
|
|
func (_e *Store_Expecter) ListCallsP(ctx interface{}, arg interface{}) *Store_ListCallsP_Call {
|
|
return &Store_ListCallsP_Call{Call: _e.mock.On("ListCallsP", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_ListCallsP_Call) Run(run func(ctx context.Context, arg database.ListCallsPParams)) *Store_ListCallsP_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.ListCallsPParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListCallsP_Call) Return(_a0 []database.ListCallsPRow, _a1 error) *Store_ListCallsP_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListCallsP_Call) RunAndReturn(run func(context.Context, database.ListCallsPParams) ([]database.ListCallsPRow, error)) *Store_ListCallsP_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListIncidentsCount provides a mock function with given fields: ctx, start, end
|
|
func (_m *Store) ListIncidentsCount(ctx context.Context, start pgtype.Timestamptz, end pgtype.Timestamptz) (int64, error) {
|
|
ret := _m.Called(ctx, start, end)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListIncidentsCount")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)); ok {
|
|
return rf(ctx, start, end)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) int64); ok {
|
|
r0 = rf(ctx, start, end)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) error); ok {
|
|
r1 = rf(ctx, start, end)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_ListIncidentsCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIncidentsCount'
|
|
type Store_ListIncidentsCount_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListIncidentsCount is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - start pgtype.Timestamptz
|
|
// - end pgtype.Timestamptz
|
|
func (_e *Store_Expecter) ListIncidentsCount(ctx interface{}, start interface{}, end interface{}) *Store_ListIncidentsCount_Call {
|
|
return &Store_ListIncidentsCount_Call{Call: _e.mock.On("ListIncidentsCount", ctx, start, end)}
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsCount_Call) Run(run func(ctx context.Context, start pgtype.Timestamptz, end pgtype.Timestamptz)) *Store_ListIncidentsCount_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(pgtype.Timestamptz), args[2].(pgtype.Timestamptz))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsCount_Call) Return(_a0 int64, _a1 error) *Store_ListIncidentsCount_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsCount_Call) RunAndReturn(run func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)) *Store_ListIncidentsCount_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListIncidentsP provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) ListIncidentsP(ctx context.Context, arg database.ListIncidentsPParams) ([]database.Incident, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListIncidentsP")
|
|
}
|
|
|
|
var r0 []database.Incident
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListIncidentsPParams) ([]database.Incident, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.ListIncidentsPParams) []database.Incident); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]database.Incident)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.ListIncidentsPParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_ListIncidentsP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIncidentsP'
|
|
type Store_ListIncidentsP_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListIncidentsP is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.ListIncidentsPParams
|
|
func (_e *Store_Expecter) ListIncidentsP(ctx interface{}, arg interface{}) *Store_ListIncidentsP_Call {
|
|
return &Store_ListIncidentsP_Call{Call: _e.mock.On("ListIncidentsP", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsP_Call) Run(run func(ctx context.Context, arg database.ListIncidentsPParams)) *Store_ListIncidentsP_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.ListIncidentsPParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsP_Call) Return(_a0 []database.Incident, _a1 error) *Store_ListIncidentsP_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_ListIncidentsP_Call) RunAndReturn(run func(context.Context, database.ListIncidentsPParams) ([]database.Incident, error)) *Store_ListIncidentsP_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RestoreTalkgroupVersion provides a mock function with given fields: ctx, versionIds
|
|
func (_m *Store) RestoreTalkgroupVersion(ctx context.Context, versionIds int) (database.Talkgroup, error) {
|
|
ret := _m.Called(ctx, versionIds)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RestoreTalkgroupVersion")
|
|
}
|
|
|
|
var r0 database.Talkgroup
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) (database.Talkgroup, error)); ok {
|
|
return rf(ctx, versionIds)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) database.Talkgroup); ok {
|
|
r0 = rf(ctx, versionIds)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Talkgroup)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, versionIds)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_RestoreTalkgroupVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreTalkgroupVersion'
|
|
type Store_RestoreTalkgroupVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RestoreTalkgroupVersion is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - versionIds int
|
|
func (_e *Store_Expecter) RestoreTalkgroupVersion(ctx interface{}, versionIds interface{}) *Store_RestoreTalkgroupVersion_Call {
|
|
return &Store_RestoreTalkgroupVersion_Call{Call: _e.mock.On("RestoreTalkgroupVersion", ctx, versionIds)}
|
|
}
|
|
|
|
func (_c *Store_RestoreTalkgroupVersion_Call) Run(run func(ctx context.Context, versionIds int)) *Store_RestoreTalkgroupVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_RestoreTalkgroupVersion_Call) Return(_a0 database.Talkgroup, _a1 error) *Store_RestoreTalkgroupVersion_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_RestoreTalkgroupVersion_Call) RunAndReturn(run func(context.Context, int) (database.Talkgroup, error)) *Store_RestoreTalkgroupVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetAppPrefs provides a mock function with given fields: ctx, appName, prefs, uid
|
|
func (_m *Store) SetAppPrefs(ctx context.Context, appName string, prefs []byte, uid int) error {
|
|
ret := _m.Called(ctx, appName, prefs, uid)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetAppPrefs")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, []byte, int) error); ok {
|
|
r0 = rf(ctx, appName, prefs, uid)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_SetAppPrefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAppPrefs'
|
|
type Store_SetAppPrefs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetAppPrefs is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - appName string
|
|
// - prefs []byte
|
|
// - uid int
|
|
func (_e *Store_Expecter) SetAppPrefs(ctx interface{}, appName interface{}, prefs interface{}, uid interface{}) *Store_SetAppPrefs_Call {
|
|
return &Store_SetAppPrefs_Call{Call: _e.mock.On("SetAppPrefs", ctx, appName, prefs, uid)}
|
|
}
|
|
|
|
func (_c *Store_SetAppPrefs_Call) Run(run func(ctx context.Context, appName string, prefs []byte, uid int)) *Store_SetAppPrefs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].([]byte), args[3].(int))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetAppPrefs_Call) Return(_a0 error) *Store_SetAppPrefs_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetAppPrefs_Call) RunAndReturn(run func(context.Context, string, []byte, int) error) *Store_SetAppPrefs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetCallTranscript provides a mock function with given fields: ctx, iD, transcript
|
|
func (_m *Store) SetCallTranscript(ctx context.Context, iD uuid.UUID, transcript *string) error {
|
|
ret := _m.Called(ctx, iD, transcript)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetCallTranscript")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, *string) error); ok {
|
|
r0 = rf(ctx, iD, transcript)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_SetCallTranscript_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallTranscript'
|
|
type Store_SetCallTranscript_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetCallTranscript is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - iD uuid.UUID
|
|
// - transcript *string
|
|
func (_e *Store_Expecter) SetCallTranscript(ctx interface{}, iD interface{}, transcript interface{}) *Store_SetCallTranscript_Call {
|
|
return &Store_SetCallTranscript_Call{Call: _e.mock.On("SetCallTranscript", ctx, iD, transcript)}
|
|
}
|
|
|
|
func (_c *Store_SetCallTranscript_Call) Run(run func(ctx context.Context, iD uuid.UUID, transcript *string)) *Store_SetCallTranscript_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(*string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetCallTranscript_Call) Return(_a0 error) *Store_SetCallTranscript_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetCallTranscript_Call) RunAndReturn(run func(context.Context, uuid.UUID, *string) error) *Store_SetCallTranscript_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetTalkgroupTags provides a mock function with given fields: ctx, tags, systemID, tGID
|
|
func (_m *Store) SetTalkgroupTags(ctx context.Context, tags []string, systemID int32, tGID int32) error {
|
|
ret := _m.Called(ctx, tags, systemID, tGID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetTalkgroupTags")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, int32, int32) error); ok {
|
|
r0 = rf(ctx, tags, systemID, tGID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_SetTalkgroupTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTalkgroupTags'
|
|
type Store_SetTalkgroupTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetTalkgroupTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - tags []string
|
|
// - systemID int32
|
|
// - tGID int32
|
|
func (_e *Store_Expecter) SetTalkgroupTags(ctx interface{}, tags interface{}, systemID interface{}, tGID interface{}) *Store_SetTalkgroupTags_Call {
|
|
return &Store_SetTalkgroupTags_Call{Call: _e.mock.On("SetTalkgroupTags", ctx, tags, systemID, tGID)}
|
|
}
|
|
|
|
func (_c *Store_SetTalkgroupTags_Call) Run(run func(ctx context.Context, tags []string, systemID int32, tGID int32)) *Store_SetTalkgroupTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]string), args[2].(int32), args[3].(int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetTalkgroupTags_Call) Return(_a0 error) *Store_SetTalkgroupTags_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SetTalkgroupTags_Call) RunAndReturn(run func(context.Context, []string, int32, int32) error) *Store_SetTalkgroupTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// StoreDeletedTGVersion provides a mock function with given fields: ctx, systemID, tGID, submitter
|
|
func (_m *Store) StoreDeletedTGVersion(ctx context.Context, systemID *int32, tGID *int32, submitter *int32) error {
|
|
ret := _m.Called(ctx, systemID, tGID, submitter)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StoreDeletedTGVersion")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *int32, *int32, *int32) error); ok {
|
|
r0 = rf(ctx, systemID, tGID, submitter)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_StoreDeletedTGVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreDeletedTGVersion'
|
|
type Store_StoreDeletedTGVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StoreDeletedTGVersion is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - systemID *int32
|
|
// - tGID *int32
|
|
// - submitter *int32
|
|
func (_e *Store_Expecter) StoreDeletedTGVersion(ctx interface{}, systemID interface{}, tGID interface{}, submitter interface{}) *Store_StoreDeletedTGVersion_Call {
|
|
return &Store_StoreDeletedTGVersion_Call{Call: _e.mock.On("StoreDeletedTGVersion", ctx, systemID, tGID, submitter)}
|
|
}
|
|
|
|
func (_c *Store_StoreDeletedTGVersion_Call) Run(run func(ctx context.Context, systemID *int32, tGID *int32, submitter *int32)) *Store_StoreDeletedTGVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*int32), args[2].(*int32), args[3].(*int32))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_StoreDeletedTGVersion_Call) Return(_a0 error) *Store_StoreDeletedTGVersion_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_StoreDeletedTGVersion_Call) RunAndReturn(run func(context.Context, *int32, *int32, *int32) error) *Store_StoreDeletedTGVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// StoreTGVersion provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) StoreTGVersion(ctx context.Context, arg []database.StoreTGVersionParams) *database.StoreTGVersionBatchResults {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StoreTGVersion")
|
|
}
|
|
|
|
var r0 *database.StoreTGVersionBatchResults
|
|
if rf, ok := ret.Get(0).(func(context.Context, []database.StoreTGVersionParams) *database.StoreTGVersionBatchResults); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*database.StoreTGVersionBatchResults)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_StoreTGVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreTGVersion'
|
|
type Store_StoreTGVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StoreTGVersion is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg []database.StoreTGVersionParams
|
|
func (_e *Store_Expecter) StoreTGVersion(ctx interface{}, arg interface{}) *Store_StoreTGVersion_Call {
|
|
return &Store_StoreTGVersion_Call{Call: _e.mock.On("StoreTGVersion", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_StoreTGVersion_Call) Run(run func(ctx context.Context, arg []database.StoreTGVersionParams)) *Store_StoreTGVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]database.StoreTGVersionParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_StoreTGVersion_Call) Return(_a0 *database.StoreTGVersionBatchResults) *Store_StoreTGVersion_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_StoreTGVersion_Call) RunAndReturn(run func(context.Context, []database.StoreTGVersionParams) *database.StoreTGVersionBatchResults) *Store_StoreTGVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SweepCalls provides a mock function with given fields: ctx, rangeStart, rangeEnd
|
|
func (_m *Store) SweepCalls(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz) (int64, error) {
|
|
ret := _m.Called(ctx, rangeStart, rangeEnd)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SweepCalls")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)); ok {
|
|
return rf(ctx, rangeStart, rangeEnd)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) int64); ok {
|
|
r0 = rf(ctx, rangeStart, rangeEnd)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) error); ok {
|
|
r1 = rf(ctx, rangeStart, rangeEnd)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_SweepCalls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SweepCalls'
|
|
type Store_SweepCalls_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SweepCalls is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - rangeStart pgtype.Timestamptz
|
|
// - rangeEnd pgtype.Timestamptz
|
|
func (_e *Store_Expecter) SweepCalls(ctx interface{}, rangeStart interface{}, rangeEnd interface{}) *Store_SweepCalls_Call {
|
|
return &Store_SweepCalls_Call{Call: _e.mock.On("SweepCalls", ctx, rangeStart, rangeEnd)}
|
|
}
|
|
|
|
func (_c *Store_SweepCalls_Call) Run(run func(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz)) *Store_SweepCalls_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(pgtype.Timestamptz), args[2].(pgtype.Timestamptz))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SweepCalls_Call) Return(_a0 int64, _a1 error) *Store_SweepCalls_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_SweepCalls_Call) RunAndReturn(run func(context.Context, pgtype.Timestamptz, pgtype.Timestamptz) (int64, error)) *Store_SweepCalls_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateIncident provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) UpdateIncident(ctx context.Context, arg database.UpdateIncidentParams) (database.Incident, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateIncident")
|
|
}
|
|
|
|
var r0 database.Incident
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.UpdateIncidentParams) (database.Incident, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.UpdateIncidentParams) database.Incident); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Incident)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.UpdateIncidentParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_UpdateIncident_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateIncident'
|
|
type Store_UpdateIncident_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateIncident is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.UpdateIncidentParams
|
|
func (_e *Store_Expecter) UpdateIncident(ctx interface{}, arg interface{}) *Store_UpdateIncident_Call {
|
|
return &Store_UpdateIncident_Call{Call: _e.mock.On("UpdateIncident", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_UpdateIncident_Call) Run(run func(ctx context.Context, arg database.UpdateIncidentParams)) *Store_UpdateIncident_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.UpdateIncidentParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdateIncident_Call) Return(_a0 database.Incident, _a1 error) *Store_UpdateIncident_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdateIncident_Call) RunAndReturn(run func(context.Context, database.UpdateIncidentParams) (database.Incident, error)) *Store_UpdateIncident_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdatePassword provides a mock function with given fields: ctx, username, password
|
|
func (_m *Store) UpdatePassword(ctx context.Context, username string, password string) error {
|
|
ret := _m.Called(ctx, username, password)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdatePassword")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = rf(ctx, username, password)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_UpdatePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePassword'
|
|
type Store_UpdatePassword_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdatePassword is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - username string
|
|
// - password string
|
|
func (_e *Store_Expecter) UpdatePassword(ctx interface{}, username interface{}, password interface{}) *Store_UpdatePassword_Call {
|
|
return &Store_UpdatePassword_Call{Call: _e.mock.On("UpdatePassword", ctx, username, password)}
|
|
}
|
|
|
|
func (_c *Store_UpdatePassword_Call) Run(run func(ctx context.Context, username string, password string)) *Store_UpdatePassword_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdatePassword_Call) Return(_a0 error) *Store_UpdatePassword_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdatePassword_Call) RunAndReturn(run func(context.Context, string, string) error) *Store_UpdatePassword_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateTalkgroup provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) UpdateTalkgroup(ctx context.Context, arg database.UpdateTalkgroupParams) (database.Talkgroup, error) {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateTalkgroup")
|
|
}
|
|
|
|
var r0 database.Talkgroup
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.UpdateTalkgroupParams) (database.Talkgroup, error)); ok {
|
|
return rf(ctx, arg)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, database.UpdateTalkgroupParams) database.Talkgroup); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
r0 = ret.Get(0).(database.Talkgroup)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, database.UpdateTalkgroupParams) error); ok {
|
|
r1 = rf(ctx, arg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Store_UpdateTalkgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTalkgroup'
|
|
type Store_UpdateTalkgroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateTalkgroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg database.UpdateTalkgroupParams
|
|
func (_e *Store_Expecter) UpdateTalkgroup(ctx interface{}, arg interface{}) *Store_UpdateTalkgroup_Call {
|
|
return &Store_UpdateTalkgroup_Call{Call: _e.mock.On("UpdateTalkgroup", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_UpdateTalkgroup_Call) Run(run func(ctx context.Context, arg database.UpdateTalkgroupParams)) *Store_UpdateTalkgroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(database.UpdateTalkgroupParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdateTalkgroup_Call) Return(_a0 database.Talkgroup, _a1 error) *Store_UpdateTalkgroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpdateTalkgroup_Call) RunAndReturn(run func(context.Context, database.UpdateTalkgroupParams) (database.Talkgroup, error)) *Store_UpdateTalkgroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpsertTalkgroup provides a mock function with given fields: ctx, arg
|
|
func (_m *Store) UpsertTalkgroup(ctx context.Context, arg []database.UpsertTalkgroupParams) *database.UpsertTalkgroupBatchResults {
|
|
ret := _m.Called(ctx, arg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpsertTalkgroup")
|
|
}
|
|
|
|
var r0 *database.UpsertTalkgroupBatchResults
|
|
if rf, ok := ret.Get(0).(func(context.Context, []database.UpsertTalkgroupParams) *database.UpsertTalkgroupBatchResults); ok {
|
|
r0 = rf(ctx, arg)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*database.UpsertTalkgroupBatchResults)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Store_UpsertTalkgroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertTalkgroup'
|
|
type Store_UpsertTalkgroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpsertTalkgroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - arg []database.UpsertTalkgroupParams
|
|
func (_e *Store_Expecter) UpsertTalkgroup(ctx interface{}, arg interface{}) *Store_UpsertTalkgroup_Call {
|
|
return &Store_UpsertTalkgroup_Call{Call: _e.mock.On("UpsertTalkgroup", ctx, arg)}
|
|
}
|
|
|
|
func (_c *Store_UpsertTalkgroup_Call) Run(run func(ctx context.Context, arg []database.UpsertTalkgroupParams)) *Store_UpsertTalkgroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]database.UpsertTalkgroupParams))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpsertTalkgroup_Call) Return(_a0 *database.UpsertTalkgroupBatchResults) *Store_UpsertTalkgroup_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Store_UpsertTalkgroup_Call) RunAndReturn(run func(context.Context, []database.UpsertTalkgroupParams) *database.UpsertTalkgroupBatchResults) *Store_UpsertTalkgroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewStore creates a new instance of Store. 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 NewStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Store {
|
|
mock := &Store{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|