mocks

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

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 (*Store) CreateSystem

func (_mock *Store) CreateSystem(ctx context.Context, id int, name string, learned bool) error

CreateSystem provides a mock function for the type Store

func (*Store) DeleteSystem

func (_mock *Store) DeleteSystem(ctx context.Context, id int) error

DeleteSystem provides a mock function for the type Store

func (*Store) DeleteTG

func (_mock *Store) DeleteTG(ctx context.Context, id talkgroups.ID) error

DeleteTG provides a mock function for the type Store

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) HUP

func (_mock *Store) HUP(config1 *config.Config)

HUP provides a mock function for the type Store

func (*Store) Hint

func (_mock *Store) Hint(ctx context.Context, tgs []talkgroups.ID) error

Hint provides a mock function for the type Store

func (*Store) Invalidate

func (_mock *Store) Invalidate()

Invalidate provides a mock function for the type Store

func (*Store) LearnSystem

func (_mock *Store) LearnSystem(ctx context.Context, call *calls.Call) error

LearnSystem provides a mock function for the type Store

func (*Store) LearnTG

func (_mock *Store) LearnTG(ctx context.Context, call *calls.Call) (*talkgroups.Talkgroup, error)

LearnTG provides a mock function for the type Store

func (*Store) Load

func (_mock *Store) Load(ctx context.Context, tgs database.TGTuplesU) error

Load provides a mock function for the type Store

func (*Store) Metrics

func (_mock *Store) Metrics() *tgstore.TGStoreMetrics

Metrics provides a mock function for the type Store

func (*Store) RegisterFilter

func (_mock *Store) RegisterFilter(filter tgstore.Filter)

RegisterFilter provides a mock function for the type Store

func (*Store) SystemName

func (_mock *Store) SystemName(ctx context.Context, id int) (string, bool)

SystemName provides a mock function for the type Store

func (*Store) SystemTGs

func (_mock *Store) SystemTGs(ctx context.Context, systemID int, opts ...tgstore.Option) ([]*talkgroups.Talkgroup, error)

SystemTGs provides a mock function for the type Store

func (*Store) TG

func (_mock *Store) TG(ctx context.Context, tg talkgroups.ID) (*talkgroups.Talkgroup, error)

TG provides a mock function for the type Store

func (*Store) TGs

func (_mock *Store) TGs(ctx context.Context, tgs talkgroups.IDs, opts ...tgstore.Option) ([]*talkgroups.Talkgroup, error)

TGs provides a mock function for the type Store

func (*Store) TGsByTags

func (_mock *Store) TGsByTags(ctx context.Context, tagsAll []string, tagsAny []string, tagsNot []string) (talkgroups.IDs, error)

TGsByTags provides a mock function for the type Store

func (*Store) Tags

func (_mock *Store) Tags(ctx context.Context) ([]string, error)

Tags provides a mock function for the type Store

func (*Store) UnregisterFilter

func (_mock *Store) UnregisterFilter(filter tgstore.Filter)

UnregisterFilter provides a mock function for the type Store

func (*Store) UpdateTG

func (_mock *Store) UpdateTG(ctx context.Context, input database.UpdateTalkgroupParams) (*talkgroups.Talkgroup, error)

UpdateTG provides a mock function for the type Store

func (*Store) UpsertTGs

func (_mock *Store) UpsertTGs(ctx context.Context, system int, input []database.UpsertTalkgroupParams) ([]*talkgroups.Talkgroup, error)

UpsertTGs provides a mock function for the type Store

func (*Store) Weight

func (_mock *Store) Weight(ctx context.Context, id talkgroups.ID, t time.Time) float64

Weight provides a mock function for the type Store

type Store_CreateSystem_Call

type Store_CreateSystem_Call struct {
	*mock.Call
}

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

func (*Store_CreateSystem_Call) Return

func (*Store_CreateSystem_Call) Run

func (_c *Store_CreateSystem_Call) Run(run func(ctx context.Context, id int, name string, learned bool)) *Store_CreateSystem_Call

func (*Store_CreateSystem_Call) RunAndReturn

func (_c *Store_CreateSystem_Call) RunAndReturn(run func(ctx context.Context, id int, name string, learned bool) error) *Store_CreateSystem_Call

type Store_DeleteSystem_Call

type Store_DeleteSystem_Call struct {
	*mock.Call
}

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

func (*Store_DeleteSystem_Call) Return

func (*Store_DeleteSystem_Call) Run

func (*Store_DeleteSystem_Call) RunAndReturn

func (_c *Store_DeleteSystem_Call) RunAndReturn(run func(ctx context.Context, id int) error) *Store_DeleteSystem_Call

type Store_DeleteTG_Call

type Store_DeleteTG_Call struct {
	*mock.Call
}

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

func (*Store_DeleteTG_Call) Return

func (*Store_DeleteTG_Call) Run

func (*Store_DeleteTG_Call) RunAndReturn

func (_c *Store_DeleteTG_Call) RunAndReturn(run func(ctx context.Context, id talkgroups.ID) error) *Store_DeleteTG_Call

type Store_Expecter

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

func (*Store_Expecter) CreateSystem

func (_e *Store_Expecter) CreateSystem(ctx interface{}, id interface{}, name interface{}, learned interface{}) *Store_CreateSystem_Call

CreateSystem is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • name string
  • learned bool

func (*Store_Expecter) DeleteSystem

func (_e *Store_Expecter) DeleteSystem(ctx interface{}, id interface{}) *Store_DeleteSystem_Call

DeleteSystem is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*Store_Expecter) DeleteTG

func (_e *Store_Expecter) DeleteTG(ctx interface{}, id interface{}) *Store_DeleteTG_Call

DeleteTG is a helper method to define mock.On call

  • ctx context.Context
  • id talkgroups.ID

func (*Store_Expecter) HUP

func (_e *Store_Expecter) HUP(config1 interface{}) *Store_HUP_Call

HUP is a helper method to define mock.On call

  • config1 *config.Config

func (*Store_Expecter) Hint

func (_e *Store_Expecter) Hint(ctx interface{}, tgs interface{}) *Store_Hint_Call

Hint is a helper method to define mock.On call

  • ctx context.Context
  • tgs []talkgroups.ID

func (*Store_Expecter) Invalidate

func (_e *Store_Expecter) Invalidate() *Store_Invalidate_Call

Invalidate is a helper method to define mock.On call

func (*Store_Expecter) LearnSystem

func (_e *Store_Expecter) LearnSystem(ctx interface{}, call interface{}) *Store_LearnSystem_Call

LearnSystem is a helper method to define mock.On call

  • ctx context.Context
  • call *calls.Call

func (*Store_Expecter) LearnTG

func (_e *Store_Expecter) LearnTG(ctx interface{}, call interface{}) *Store_LearnTG_Call

LearnTG is a helper method to define mock.On call

  • ctx context.Context
  • call *calls.Call

func (*Store_Expecter) Load

func (_e *Store_Expecter) Load(ctx interface{}, tgs interface{}) *Store_Load_Call

Load is a helper method to define mock.On call

  • ctx context.Context
  • tgs database.TGTuplesU

func (*Store_Expecter) Metrics

func (_e *Store_Expecter) Metrics() *Store_Metrics_Call

Metrics is a helper method to define mock.On call

func (*Store_Expecter) RegisterFilter

func (_e *Store_Expecter) RegisterFilter(filter interface{}) *Store_RegisterFilter_Call

RegisterFilter is a helper method to define mock.On call

  • filter tgstore.Filter

func (*Store_Expecter) SystemName

func (_e *Store_Expecter) SystemName(ctx interface{}, id interface{}) *Store_SystemName_Call

SystemName is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*Store_Expecter) SystemTGs

func (_e *Store_Expecter) SystemTGs(ctx interface{}, systemID interface{}, opts ...interface{}) *Store_SystemTGs_Call

SystemTGs is a helper method to define mock.On call

  • ctx context.Context
  • systemID int
  • opts ...tgstore.Option

func (*Store_Expecter) TG

func (_e *Store_Expecter) TG(ctx interface{}, tg interface{}) *Store_TG_Call

TG is a helper method to define mock.On call

  • ctx context.Context
  • tg talkgroups.ID

func (*Store_Expecter) TGs

func (_e *Store_Expecter) TGs(ctx interface{}, tgs interface{}, opts ...interface{}) *Store_TGs_Call

TGs is a helper method to define mock.On call

  • ctx context.Context
  • tgs talkgroups.IDs
  • opts ...tgstore.Option

func (*Store_Expecter) TGsByTags

func (_e *Store_Expecter) TGsByTags(ctx interface{}, tagsAll interface{}, tagsAny interface{}, tagsNot interface{}) *Store_TGsByTags_Call

TGsByTags is a helper method to define mock.On call

  • ctx context.Context
  • tagsAll []string
  • tagsAny []string
  • tagsNot []string

func (*Store_Expecter) Tags

func (_e *Store_Expecter) Tags(ctx interface{}) *Store_Tags_Call

Tags is a helper method to define mock.On call

  • ctx context.Context

func (*Store_Expecter) UnregisterFilter

func (_e *Store_Expecter) UnregisterFilter(filter interface{}) *Store_UnregisterFilter_Call

UnregisterFilter is a helper method to define mock.On call

  • filter tgstore.Filter

func (*Store_Expecter) UpdateTG

func (_e *Store_Expecter) UpdateTG(ctx interface{}, input interface{}) *Store_UpdateTG_Call

UpdateTG is a helper method to define mock.On call

  • ctx context.Context
  • input database.UpdateTalkgroupParams

func (*Store_Expecter) UpsertTGs

func (_e *Store_Expecter) UpsertTGs(ctx interface{}, system interface{}, input interface{}) *Store_UpsertTGs_Call

UpsertTGs is a helper method to define mock.On call

  • ctx context.Context
  • system int
  • input []database.UpsertTalkgroupParams

func (*Store_Expecter) Weight

func (_e *Store_Expecter) Weight(ctx interface{}, id interface{}, t interface{}) *Store_Weight_Call

Weight is a helper method to define mock.On call

  • ctx context.Context
  • id talkgroups.ID
  • t time.Time

type Store_HUP_Call

type Store_HUP_Call struct {
	*mock.Call
}

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

func (*Store_HUP_Call) Return

func (_c *Store_HUP_Call) Return() *Store_HUP_Call

func (*Store_HUP_Call) Run

func (_c *Store_HUP_Call) Run(run func(config1 *config.Config)) *Store_HUP_Call

func (*Store_HUP_Call) RunAndReturn

func (_c *Store_HUP_Call) RunAndReturn(run func(config1 *config.Config)) *Store_HUP_Call

type Store_Hint_Call

type Store_Hint_Call struct {
	*mock.Call
}

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

func (*Store_Hint_Call) Return

func (_c *Store_Hint_Call) Return(err error) *Store_Hint_Call

func (*Store_Hint_Call) Run

func (_c *Store_Hint_Call) Run(run func(ctx context.Context, tgs []talkgroups.ID)) *Store_Hint_Call

func (*Store_Hint_Call) RunAndReturn

func (_c *Store_Hint_Call) RunAndReturn(run func(ctx context.Context, tgs []talkgroups.ID) error) *Store_Hint_Call

type Store_Invalidate_Call

type Store_Invalidate_Call struct {
	*mock.Call
}

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

func (*Store_Invalidate_Call) Return

func (*Store_Invalidate_Call) Run

func (_c *Store_Invalidate_Call) Run(run func()) *Store_Invalidate_Call

func (*Store_Invalidate_Call) RunAndReturn

func (_c *Store_Invalidate_Call) RunAndReturn(run func()) *Store_Invalidate_Call

type Store_LearnSystem_Call

type Store_LearnSystem_Call struct {
	*mock.Call
}

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

func (*Store_LearnSystem_Call) Return

func (*Store_LearnSystem_Call) Run

func (_c *Store_LearnSystem_Call) Run(run func(ctx context.Context, call *calls.Call)) *Store_LearnSystem_Call

func (*Store_LearnSystem_Call) RunAndReturn

func (_c *Store_LearnSystem_Call) RunAndReturn(run func(ctx context.Context, call *calls.Call) error) *Store_LearnSystem_Call

type Store_LearnTG_Call

type Store_LearnTG_Call struct {
	*mock.Call
}

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

func (*Store_LearnTG_Call) Return

func (_c *Store_LearnTG_Call) Return(talkgroup *talkgroups.Talkgroup, err error) *Store_LearnTG_Call

func (*Store_LearnTG_Call) Run

func (_c *Store_LearnTG_Call) Run(run func(ctx context.Context, call *calls.Call)) *Store_LearnTG_Call

func (*Store_LearnTG_Call) RunAndReturn

func (_c *Store_LearnTG_Call) RunAndReturn(run func(ctx context.Context, call *calls.Call) (*talkgroups.Talkgroup, error)) *Store_LearnTG_Call

type Store_Load_Call

type Store_Load_Call struct {
	*mock.Call
}

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

func (*Store_Load_Call) Return

func (_c *Store_Load_Call) Return(err error) *Store_Load_Call

func (*Store_Load_Call) Run

func (_c *Store_Load_Call) Run(run func(ctx context.Context, tgs database.TGTuplesU)) *Store_Load_Call

func (*Store_Load_Call) RunAndReturn

func (_c *Store_Load_Call) RunAndReturn(run func(ctx context.Context, tgs database.TGTuplesU) error) *Store_Load_Call

type Store_Metrics_Call

type Store_Metrics_Call struct {
	*mock.Call
}

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

func (*Store_Metrics_Call) Return

func (_c *Store_Metrics_Call) Return(tGStoreMetrics *tgstore.TGStoreMetrics) *Store_Metrics_Call

func (*Store_Metrics_Call) Run

func (_c *Store_Metrics_Call) Run(run func()) *Store_Metrics_Call

func (*Store_Metrics_Call) RunAndReturn

func (_c *Store_Metrics_Call) RunAndReturn(run func() *tgstore.TGStoreMetrics) *Store_Metrics_Call

type Store_RegisterFilter_Call

type Store_RegisterFilter_Call struct {
	*mock.Call
}

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

func (*Store_RegisterFilter_Call) Return

func (*Store_RegisterFilter_Call) Run

func (*Store_RegisterFilter_Call) RunAndReturn

func (_c *Store_RegisterFilter_Call) RunAndReturn(run func(filter tgstore.Filter)) *Store_RegisterFilter_Call

type Store_SystemName_Call

type Store_SystemName_Call struct {
	*mock.Call
}

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

func (*Store_SystemName_Call) Return

func (*Store_SystemName_Call) Run

func (_c *Store_SystemName_Call) Run(run func(ctx context.Context, id int)) *Store_SystemName_Call

func (*Store_SystemName_Call) RunAndReturn

func (_c *Store_SystemName_Call) RunAndReturn(run func(ctx context.Context, id int) (string, bool)) *Store_SystemName_Call

type Store_SystemTGs_Call

type Store_SystemTGs_Call struct {
	*mock.Call
}

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

func (*Store_SystemTGs_Call) Return

func (_c *Store_SystemTGs_Call) Return(talkgroups1 []*talkgroups.Talkgroup, err error) *Store_SystemTGs_Call

func (*Store_SystemTGs_Call) Run

func (_c *Store_SystemTGs_Call) Run(run func(ctx context.Context, systemID int, opts ...tgstore.Option)) *Store_SystemTGs_Call

func (*Store_SystemTGs_Call) RunAndReturn

func (_c *Store_SystemTGs_Call) RunAndReturn(run func(ctx context.Context, systemID int, opts ...tgstore.Option) ([]*talkgroups.Talkgroup, error)) *Store_SystemTGs_Call

type Store_TG_Call

type Store_TG_Call struct {
	*mock.Call
}

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

func (*Store_TG_Call) Return

func (_c *Store_TG_Call) Return(talkgroup *talkgroups.Talkgroup, err error) *Store_TG_Call

func (*Store_TG_Call) Run

func (_c *Store_TG_Call) Run(run func(ctx context.Context, tg talkgroups.ID)) *Store_TG_Call

func (*Store_TG_Call) RunAndReturn

func (_c *Store_TG_Call) RunAndReturn(run func(ctx context.Context, tg talkgroups.ID) (*talkgroups.Talkgroup, error)) *Store_TG_Call

type Store_TGsByTags_Call

type Store_TGsByTags_Call struct {
	*mock.Call
}

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

func (*Store_TGsByTags_Call) Return

func (*Store_TGsByTags_Call) Run

func (_c *Store_TGsByTags_Call) Run(run func(ctx context.Context, tagsAll []string, tagsAny []string, tagsNot []string)) *Store_TGsByTags_Call

func (*Store_TGsByTags_Call) RunAndReturn

func (_c *Store_TGsByTags_Call) RunAndReturn(run func(ctx context.Context, tagsAll []string, tagsAny []string, tagsNot []string) (talkgroups.IDs, error)) *Store_TGsByTags_Call

type Store_TGs_Call

type Store_TGs_Call struct {
	*mock.Call
}

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

func (*Store_TGs_Call) Return

func (_c *Store_TGs_Call) Return(talkgroups1 []*talkgroups.Talkgroup, err error) *Store_TGs_Call

func (*Store_TGs_Call) Run

func (_c *Store_TGs_Call) Run(run func(ctx context.Context, tgs talkgroups.IDs, opts ...tgstore.Option)) *Store_TGs_Call

func (*Store_TGs_Call) RunAndReturn

func (_c *Store_TGs_Call) RunAndReturn(run func(ctx context.Context, tgs talkgroups.IDs, opts ...tgstore.Option) ([]*talkgroups.Talkgroup, error)) *Store_TGs_Call

type Store_Tags_Call

type Store_Tags_Call struct {
	*mock.Call
}

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

func (*Store_Tags_Call) Return

func (_c *Store_Tags_Call) Return(strings []string, err error) *Store_Tags_Call

func (*Store_Tags_Call) Run

func (_c *Store_Tags_Call) Run(run func(ctx context.Context)) *Store_Tags_Call

func (*Store_Tags_Call) RunAndReturn

func (_c *Store_Tags_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *Store_Tags_Call

type Store_UnregisterFilter_Call

type Store_UnregisterFilter_Call struct {
	*mock.Call
}

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

func (*Store_UnregisterFilter_Call) Return

func (*Store_UnregisterFilter_Call) Run

func (*Store_UnregisterFilter_Call) RunAndReturn

func (_c *Store_UnregisterFilter_Call) RunAndReturn(run func(filter tgstore.Filter)) *Store_UnregisterFilter_Call

type Store_UpdateTG_Call

type Store_UpdateTG_Call struct {
	*mock.Call
}

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

func (*Store_UpdateTG_Call) Return

func (_c *Store_UpdateTG_Call) Return(talkgroup *talkgroups.Talkgroup, err error) *Store_UpdateTG_Call

func (*Store_UpdateTG_Call) Run

func (*Store_UpdateTG_Call) RunAndReturn

type Store_UpsertTGs_Call

type Store_UpsertTGs_Call struct {
	*mock.Call
}

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

func (*Store_UpsertTGs_Call) Return

func (_c *Store_UpsertTGs_Call) Return(talkgroups1 []*talkgroups.Talkgroup, err error) *Store_UpsertTGs_Call

func (*Store_UpsertTGs_Call) Run

func (*Store_UpsertTGs_Call) RunAndReturn

func (_c *Store_UpsertTGs_Call) RunAndReturn(run func(ctx context.Context, system int, input []database.UpsertTalkgroupParams) ([]*talkgroups.Talkgroup, error)) *Store_UpsertTGs_Call

type Store_Weight_Call

type Store_Weight_Call struct {
	*mock.Call
}

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

func (*Store_Weight_Call) Return

func (*Store_Weight_Call) Run

func (_c *Store_Weight_Call) Run(run func(ctx context.Context, id talkgroups.ID, t time.Time)) *Store_Weight_Call

func (*Store_Weight_Call) RunAndReturn

func (_c *Store_Weight_Call) RunAndReturn(run func(ctx context.Context, id talkgroups.ID, t time.Time) float64) *Store_Weight_Call

Jump to

Keyboard shortcuts

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