mocks

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: GPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func NewHandler

func NewHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Handler

NewHandler creates a new instance of Handler. 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 (*Handler) CheckPermission added in v0.30.0

func (_mock *Handler) CheckPermission(user1 user.User, p schedule.Permission) bool

CheckPermission provides a mock function for the type Handler

func (*Handler) Close

func (_mock *Handler) Close()

Close provides a mock function for the type Handler

func (*Handler) CreateJob

func (_mock *Handler) CreateJob(job *schedule.Config, schedules []*calendar.Event, permission schedule.Permission) error

CreateJob provides a mock function for the type Handler

func (*Handler) DetectSchedulePermission added in v0.30.0

func (_mock *Handler) DetectSchedulePermission(permission schedule.Permission) (schedule.Permission, bool)

DetectSchedulePermission provides a mock function for the type Handler

func (*Handler) DisplayJobStatus

func (_mock *Handler) DisplayJobStatus(job *schedule.Config) error

DisplayJobStatus provides a mock function for the type Handler

func (*Handler) DisplaySchedules

func (_mock *Handler) DisplaySchedules(profile string, command string, schedules []string) error

DisplaySchedules provides a mock function for the type Handler

func (*Handler) DisplayStatus

func (_mock *Handler) DisplayStatus(profileName string) error

DisplayStatus provides a mock function for the type Handler

func (*Handler) EXPECT

func (_m *Handler) EXPECT() *Handler_Expecter

func (*Handler) Init

func (_mock *Handler) Init() error

Init provides a mock function for the type Handler

func (*Handler) ParseSchedules

func (_mock *Handler) ParseSchedules(schedules []string) ([]*calendar.Event, error)

ParseSchedules provides a mock function for the type Handler

func (*Handler) RemoveJob

func (_mock *Handler) RemoveJob(job *schedule.Config, permission schedule.Permission) error

RemoveJob provides a mock function for the type Handler

func (*Handler) Scheduled added in v0.30.0

func (_mock *Handler) Scheduled(profileName string) ([]schedule.Config, error)

Scheduled provides a mock function for the type Handler

type Handler_CheckPermission_Call added in v0.30.0

type Handler_CheckPermission_Call struct {
	*mock.Call
}

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

func (*Handler_CheckPermission_Call) Return added in v0.30.0

func (*Handler_CheckPermission_Call) Run added in v0.30.0

func (*Handler_CheckPermission_Call) RunAndReturn added in v0.30.0

type Handler_Close_Call

type Handler_Close_Call struct {
	*mock.Call
}

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

func (*Handler_Close_Call) Return

func (_c *Handler_Close_Call) Return() *Handler_Close_Call

func (*Handler_Close_Call) Run

func (_c *Handler_Close_Call) Run(run func()) *Handler_Close_Call

func (*Handler_Close_Call) RunAndReturn

func (_c *Handler_Close_Call) RunAndReturn(run func()) *Handler_Close_Call

type Handler_CreateJob_Call

type Handler_CreateJob_Call struct {
	*mock.Call
}

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

func (*Handler_CreateJob_Call) Return

func (*Handler_CreateJob_Call) Run

func (_c *Handler_CreateJob_Call) Run(run func(job *schedule.Config, schedules []*calendar.Event, permission schedule.Permission)) *Handler_CreateJob_Call

func (*Handler_CreateJob_Call) RunAndReturn

func (_c *Handler_CreateJob_Call) RunAndReturn(run func(job *schedule.Config, schedules []*calendar.Event, permission schedule.Permission) error) *Handler_CreateJob_Call

type Handler_DetectSchedulePermission_Call added in v0.30.0

type Handler_DetectSchedulePermission_Call struct {
	*mock.Call
}

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

func (*Handler_DetectSchedulePermission_Call) Return added in v0.30.0

func (*Handler_DetectSchedulePermission_Call) Run added in v0.30.0

func (*Handler_DetectSchedulePermission_Call) RunAndReturn added in v0.30.0

type Handler_DisplayJobStatus_Call

type Handler_DisplayJobStatus_Call struct {
	*mock.Call
}

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

func (*Handler_DisplayJobStatus_Call) Return

func (*Handler_DisplayJobStatus_Call) Run

func (*Handler_DisplayJobStatus_Call) RunAndReturn

type Handler_DisplaySchedules_Call

type Handler_DisplaySchedules_Call struct {
	*mock.Call
}

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

func (*Handler_DisplaySchedules_Call) Return

func (*Handler_DisplaySchedules_Call) Run

func (_c *Handler_DisplaySchedules_Call) Run(run func(profile string, command string, schedules []string)) *Handler_DisplaySchedules_Call

func (*Handler_DisplaySchedules_Call) RunAndReturn

func (_c *Handler_DisplaySchedules_Call) RunAndReturn(run func(profile string, command string, schedules []string) error) *Handler_DisplaySchedules_Call

type Handler_DisplayStatus_Call

type Handler_DisplayStatus_Call struct {
	*mock.Call
}

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

func (*Handler_DisplayStatus_Call) Return

func (*Handler_DisplayStatus_Call) Run

func (_c *Handler_DisplayStatus_Call) Run(run func(profileName string)) *Handler_DisplayStatus_Call

func (*Handler_DisplayStatus_Call) RunAndReturn

func (_c *Handler_DisplayStatus_Call) RunAndReturn(run func(profileName string) error) *Handler_DisplayStatus_Call

type Handler_Expecter

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

func (*Handler_Expecter) CheckPermission added in v0.30.0

func (_e *Handler_Expecter) CheckPermission(user1 any, p any) *Handler_CheckPermission_Call

CheckPermission is a helper method to define mock.On call

  • user1 user.User
  • p schedule.Permission

func (*Handler_Expecter) Close

func (_e *Handler_Expecter) Close() *Handler_Close_Call

Close is a helper method to define mock.On call

func (*Handler_Expecter) CreateJob

func (_e *Handler_Expecter) CreateJob(job any, schedules any, permission any) *Handler_CreateJob_Call

CreateJob is a helper method to define mock.On call

  • job *schedule.Config
  • schedules []*calendar.Event
  • permission schedule.Permission

func (*Handler_Expecter) DetectSchedulePermission added in v0.30.0

func (_e *Handler_Expecter) DetectSchedulePermission(permission any) *Handler_DetectSchedulePermission_Call

DetectSchedulePermission is a helper method to define mock.On call

  • permission schedule.Permission

func (*Handler_Expecter) DisplayJobStatus

func (_e *Handler_Expecter) DisplayJobStatus(job any) *Handler_DisplayJobStatus_Call

DisplayJobStatus is a helper method to define mock.On call

  • job *schedule.Config

func (*Handler_Expecter) DisplaySchedules

func (_e *Handler_Expecter) DisplaySchedules(profile any, command any, schedules any) *Handler_DisplaySchedules_Call

DisplaySchedules is a helper method to define mock.On call

  • profile string
  • command string
  • schedules []string

func (*Handler_Expecter) DisplayStatus

func (_e *Handler_Expecter) DisplayStatus(profileName any) *Handler_DisplayStatus_Call

DisplayStatus is a helper method to define mock.On call

  • profileName string

func (*Handler_Expecter) Init

func (_e *Handler_Expecter) Init() *Handler_Init_Call

Init is a helper method to define mock.On call

func (*Handler_Expecter) ParseSchedules

func (_e *Handler_Expecter) ParseSchedules(schedules any) *Handler_ParseSchedules_Call

ParseSchedules is a helper method to define mock.On call

  • schedules []string

func (*Handler_Expecter) RemoveJob

func (_e *Handler_Expecter) RemoveJob(job any, permission any) *Handler_RemoveJob_Call

RemoveJob is a helper method to define mock.On call

  • job *schedule.Config
  • permission schedule.Permission

func (*Handler_Expecter) Scheduled added in v0.30.0

func (_e *Handler_Expecter) Scheduled(profileName any) *Handler_Scheduled_Call

Scheduled is a helper method to define mock.On call

  • profileName string

type Handler_Init_Call

type Handler_Init_Call struct {
	*mock.Call
}

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

func (*Handler_Init_Call) Return

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

func (*Handler_Init_Call) Run

func (_c *Handler_Init_Call) Run(run func()) *Handler_Init_Call

func (*Handler_Init_Call) RunAndReturn

func (_c *Handler_Init_Call) RunAndReturn(run func() error) *Handler_Init_Call

type Handler_ParseSchedules_Call

type Handler_ParseSchedules_Call struct {
	*mock.Call
}

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

func (*Handler_ParseSchedules_Call) Return

func (*Handler_ParseSchedules_Call) Run

func (_c *Handler_ParseSchedules_Call) Run(run func(schedules []string)) *Handler_ParseSchedules_Call

func (*Handler_ParseSchedules_Call) RunAndReturn

func (_c *Handler_ParseSchedules_Call) RunAndReturn(run func(schedules []string) ([]*calendar.Event, error)) *Handler_ParseSchedules_Call

type Handler_RemoveJob_Call

type Handler_RemoveJob_Call struct {
	*mock.Call
}

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

func (*Handler_RemoveJob_Call) Return

func (*Handler_RemoveJob_Call) Run

func (_c *Handler_RemoveJob_Call) Run(run func(job *schedule.Config, permission schedule.Permission)) *Handler_RemoveJob_Call

func (*Handler_RemoveJob_Call) RunAndReturn

func (_c *Handler_RemoveJob_Call) RunAndReturn(run func(job *schedule.Config, permission schedule.Permission) error) *Handler_RemoveJob_Call

type Handler_Scheduled_Call added in v0.30.0

type Handler_Scheduled_Call struct {
	*mock.Call
}

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

func (*Handler_Scheduled_Call) Return added in v0.30.0

func (*Handler_Scheduled_Call) Run added in v0.30.0

func (_c *Handler_Scheduled_Call) Run(run func(profileName string)) *Handler_Scheduled_Call

func (*Handler_Scheduled_Call) RunAndReturn added in v0.30.0

func (_c *Handler_Scheduled_Call) RunAndReturn(run func(profileName string) ([]schedule.Config, error)) *Handler_Scheduled_Call

Jump to

Keyboard shortcuts

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