mocks

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	mock.Mock
}

Answer is an autogenerated mock type for the Answer type

func NewAnswer

func NewAnswer(t interface {
	mock.TestingT
	Cleanup(func())
}) *Answer

NewAnswer creates a new instance of Answer. 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 (*Answer) EXPECT

func (_m *Answer) EXPECT() *Answer_Expecter

func (*Answer) Validate

func (_m *Answer) Validate(q types.Question) error

Validate provides a mock function with given fields: q

func (*Answer) Value

func (_m *Answer) Value() (driver.Value, error)

Value provides a mock function with given fields:

type Answer_Expecter

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

func (*Answer_Expecter) Validate

func (_e *Answer_Expecter) Validate(q interface{}) *Answer_Validate_Call

Validate is a helper method to define mock.On call

  • q types.Question

func (*Answer_Expecter) Value

func (_e *Answer_Expecter) Value() *Answer_Value_Call

Value is a helper method to define mock.On call

type Answer_Validate_Call

type Answer_Validate_Call struct {
	*mock.Call
}

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

func (*Answer_Validate_Call) Return

func (*Answer_Validate_Call) Run

func (*Answer_Validate_Call) RunAndReturn

func (_c *Answer_Validate_Call) RunAndReturn(run func(types.Question) error) *Answer_Validate_Call

type Answer_Value_Call

type Answer_Value_Call struct {
	*mock.Call
}

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

func (*Answer_Value_Call) Return

func (_c *Answer_Value_Call) Return(_a0 driver.Value, _a1 error) *Answer_Value_Call

func (*Answer_Value_Call) Run

func (_c *Answer_Value_Call) Run(run func()) *Answer_Value_Call

func (*Answer_Value_Call) RunAndReturn

func (_c *Answer_Value_Call) RunAndReturn(run func() (driver.Value, error)) *Answer_Value_Call

type Interface

type Interface struct {
	mock.Mock
}

Interface is an autogenerated mock type for the Interface type

func NewInterface

func NewInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *Interface

NewInterface creates a new instance of Interface. 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 (*Interface) Close

func (_m *Interface) Close() error

Close provides a mock function with given fields:

func (*Interface) CreateSurvey

func (_m *Interface) CreateSurvey(survey *types.Survey) error

CreateSurvey provides a mock function with given fields: survey

func (*Interface) CreateSurveySession

func (_m *Interface) CreateSurveySession(session *types.SurveySession) error

CreateSurveySession provides a mock function with given fields: session

func (*Interface) EXPECT

func (_m *Interface) EXPECT() *Interface_Expecter

func (*Interface) GetSurveyByField

func (_m *Interface) GetSurveyByField(field string, value interface{}) (*types.Survey, error)

GetSurveyByField provides a mock function with given fields: field, value

func (*Interface) GetSurveyQuestions

func (_m *Interface) GetSurveyQuestions(surveyID int64) ([]types.Question, error)

GetSurveyQuestions provides a mock function with given fields: surveyID

func (*Interface) GetSurveySession

func (_m *Interface) GetSurveySession(surveyUUID string, sessionUUID string) (*types.SurveySession, error)

GetSurveySession provides a mock function with given fields: surveyUUID, sessionUUID

func (*Interface) GetSurveySessionAnswers

func (_m *Interface) GetSurveySessionAnswers(sessionUUID string) ([]types.QuestionAnswer, error)

GetSurveySessionAnswers provides a mock function with given fields: sessionUUID

func (*Interface) GetSurveySessionByIPAddress

func (_m *Interface) GetSurveySessionByIPAddress(surveyUUID string, ipAddr string) (*types.SurveySession, error)

GetSurveySessionByIPAddress provides a mock function with given fields: surveyUUID, ipAddr

func (*Interface) GetSurveySessionsWithAnswers

func (_m *Interface) GetSurveySessionsWithAnswers(surveyUUID string, filter *types.SurveySessionsFilter) ([]types.SurveySession, int, error)

GetSurveySessionsWithAnswers provides a mock function with given fields: surveyUUID, filter

func (*Interface) GetSurveys

func (_m *Interface) GetSurveys() ([]*types.Survey, error)

GetSurveys provides a mock function with given fields:

func (*Interface) Init

func (_m *Interface) Init() error

Init provides a mock function with given fields:

func (*Interface) Migrate

func (_m *Interface) Migrate() error

Migrate provides a mock function with given fields:

func (*Interface) Ping

func (_m *Interface) Ping() error

Ping provides a mock function with given fields:

func (*Interface) UpdateSurvey

func (_m *Interface) UpdateSurvey(survey *types.Survey) error

UpdateSurvey provides a mock function with given fields: survey

func (*Interface) UpdateSurveySessionStatus

func (_m *Interface) UpdateSurveySessionStatus(sessionUUID string, newStatus types.SurveySessionStatus) error

UpdateSurveySessionStatus provides a mock function with given fields: sessionUUID, newStatus

func (*Interface) UpsertSurveyQuestionAnswer

func (_m *Interface) UpsertSurveyQuestionAnswer(sessionUUID string, questionUUID string, answer types.Answer) error

UpsertSurveyQuestionAnswer provides a mock function with given fields: sessionUUID, questionUUID, answer

func (*Interface) UpsertSurveyQuestions

func (_m *Interface) UpsertSurveyQuestions(survey *types.Survey) error

UpsertSurveyQuestions provides a mock function with given fields: survey

type Interface_Close_Call

type Interface_Close_Call struct {
	*mock.Call
}

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

func (*Interface_Close_Call) Return

func (*Interface_Close_Call) Run

func (_c *Interface_Close_Call) Run(run func()) *Interface_Close_Call

func (*Interface_Close_Call) RunAndReturn

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

type Interface_CreateSurveySession_Call

type Interface_CreateSurveySession_Call struct {
	*mock.Call
}

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

func (*Interface_CreateSurveySession_Call) Return

func (*Interface_CreateSurveySession_Call) Run

func (*Interface_CreateSurveySession_Call) RunAndReturn

type Interface_CreateSurvey_Call

type Interface_CreateSurvey_Call struct {
	*mock.Call
}

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

func (*Interface_CreateSurvey_Call) Return

func (*Interface_CreateSurvey_Call) Run

func (*Interface_CreateSurvey_Call) RunAndReturn

type Interface_Expecter

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

func (*Interface_Expecter) Close

Close is a helper method to define mock.On call

func (*Interface_Expecter) CreateSurvey

func (_e *Interface_Expecter) CreateSurvey(survey interface{}) *Interface_CreateSurvey_Call

CreateSurvey is a helper method to define mock.On call

  • survey *types.Survey

func (*Interface_Expecter) CreateSurveySession

func (_e *Interface_Expecter) CreateSurveySession(session interface{}) *Interface_CreateSurveySession_Call

CreateSurveySession is a helper method to define mock.On call

  • session *types.SurveySession

func (*Interface_Expecter) GetSurveyByField

func (_e *Interface_Expecter) GetSurveyByField(field interface{}, value interface{}) *Interface_GetSurveyByField_Call

GetSurveyByField is a helper method to define mock.On call

  • field string
  • value interface{}

func (*Interface_Expecter) GetSurveyQuestions

func (_e *Interface_Expecter) GetSurveyQuestions(surveyID interface{}) *Interface_GetSurveyQuestions_Call

GetSurveyQuestions is a helper method to define mock.On call

  • surveyID int64

func (*Interface_Expecter) GetSurveySession

func (_e *Interface_Expecter) GetSurveySession(surveyUUID interface{}, sessionUUID interface{}) *Interface_GetSurveySession_Call

GetSurveySession is a helper method to define mock.On call

  • surveyUUID string
  • sessionUUID string

func (*Interface_Expecter) GetSurveySessionAnswers

func (_e *Interface_Expecter) GetSurveySessionAnswers(sessionUUID interface{}) *Interface_GetSurveySessionAnswers_Call

GetSurveySessionAnswers is a helper method to define mock.On call

  • sessionUUID string

func (*Interface_Expecter) GetSurveySessionByIPAddress

func (_e *Interface_Expecter) GetSurveySessionByIPAddress(surveyUUID interface{}, ipAddr interface{}) *Interface_GetSurveySessionByIPAddress_Call

GetSurveySessionByIPAddress is a helper method to define mock.On call

  • surveyUUID string
  • ipAddr string

func (*Interface_Expecter) GetSurveySessionsWithAnswers

func (_e *Interface_Expecter) GetSurveySessionsWithAnswers(surveyUUID interface{}, filter interface{}) *Interface_GetSurveySessionsWithAnswers_Call

GetSurveySessionsWithAnswers is a helper method to define mock.On call

  • surveyUUID string
  • filter *types.SurveySessionsFilter

func (*Interface_Expecter) GetSurveys

GetSurveys is a helper method to define mock.On call

func (*Interface_Expecter) Init

Init is a helper method to define mock.On call

func (*Interface_Expecter) Migrate

Migrate is a helper method to define mock.On call

func (*Interface_Expecter) Ping

Ping is a helper method to define mock.On call

func (*Interface_Expecter) UpdateSurvey

func (_e *Interface_Expecter) UpdateSurvey(survey interface{}) *Interface_UpdateSurvey_Call

UpdateSurvey is a helper method to define mock.On call

  • survey *types.Survey

func (*Interface_Expecter) UpdateSurveySessionStatus

func (_e *Interface_Expecter) UpdateSurveySessionStatus(sessionUUID interface{}, newStatus interface{}) *Interface_UpdateSurveySessionStatus_Call

UpdateSurveySessionStatus is a helper method to define mock.On call

  • sessionUUID string
  • newStatus types.SurveySessionStatus

func (*Interface_Expecter) UpsertSurveyQuestionAnswer

func (_e *Interface_Expecter) UpsertSurveyQuestionAnswer(sessionUUID interface{}, questionUUID interface{}, answer interface{}) *Interface_UpsertSurveyQuestionAnswer_Call

UpsertSurveyQuestionAnswer is a helper method to define mock.On call

  • sessionUUID string
  • questionUUID string
  • answer types.Answer

func (*Interface_Expecter) UpsertSurveyQuestions

func (_e *Interface_Expecter) UpsertSurveyQuestions(survey interface{}) *Interface_UpsertSurveyQuestions_Call

UpsertSurveyQuestions is a helper method to define mock.On call

  • survey *types.Survey

type Interface_GetSurveyByField_Call

type Interface_GetSurveyByField_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveyByField_Call) Return

func (*Interface_GetSurveyByField_Call) Run

func (_c *Interface_GetSurveyByField_Call) Run(run func(field string, value interface{})) *Interface_GetSurveyByField_Call

func (*Interface_GetSurveyByField_Call) RunAndReturn

func (_c *Interface_GetSurveyByField_Call) RunAndReturn(run func(string, interface{}) (*types.Survey, error)) *Interface_GetSurveyByField_Call

type Interface_GetSurveyQuestions_Call

type Interface_GetSurveyQuestions_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveyQuestions_Call) Return

func (*Interface_GetSurveyQuestions_Call) Run

func (*Interface_GetSurveyQuestions_Call) RunAndReturn

type Interface_GetSurveySessionAnswers_Call

type Interface_GetSurveySessionAnswers_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveySessionAnswers_Call) Return

func (*Interface_GetSurveySessionAnswers_Call) Run

func (*Interface_GetSurveySessionAnswers_Call) RunAndReturn

type Interface_GetSurveySessionByIPAddress_Call

type Interface_GetSurveySessionByIPAddress_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveySessionByIPAddress_Call) Return

func (*Interface_GetSurveySessionByIPAddress_Call) Run

func (*Interface_GetSurveySessionByIPAddress_Call) RunAndReturn

type Interface_GetSurveySession_Call

type Interface_GetSurveySession_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveySession_Call) Return

func (*Interface_GetSurveySession_Call) Run

func (_c *Interface_GetSurveySession_Call) Run(run func(surveyUUID string, sessionUUID string)) *Interface_GetSurveySession_Call

func (*Interface_GetSurveySession_Call) RunAndReturn

type Interface_GetSurveySessionsWithAnswers_Call

type Interface_GetSurveySessionsWithAnswers_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveySessionsWithAnswers_Call) Return

func (*Interface_GetSurveySessionsWithAnswers_Call) Run

func (*Interface_GetSurveySessionsWithAnswers_Call) RunAndReturn

type Interface_GetSurveys_Call

type Interface_GetSurveys_Call struct {
	*mock.Call
}

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

func (*Interface_GetSurveys_Call) Return

func (*Interface_GetSurveys_Call) Run

func (*Interface_GetSurveys_Call) RunAndReturn

func (_c *Interface_GetSurveys_Call) RunAndReturn(run func() ([]*types.Survey, error)) *Interface_GetSurveys_Call

type Interface_Init_Call

type Interface_Init_Call struct {
	*mock.Call
}

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

func (*Interface_Init_Call) Return

func (*Interface_Init_Call) Run

func (_c *Interface_Init_Call) Run(run func()) *Interface_Init_Call

func (*Interface_Init_Call) RunAndReturn

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

type Interface_Migrate_Call

type Interface_Migrate_Call struct {
	*mock.Call
}

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

func (*Interface_Migrate_Call) Return

func (*Interface_Migrate_Call) Run

func (_c *Interface_Migrate_Call) Run(run func()) *Interface_Migrate_Call

func (*Interface_Migrate_Call) RunAndReturn

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

type Interface_Ping_Call

type Interface_Ping_Call struct {
	*mock.Call
}

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

func (*Interface_Ping_Call) Return

func (*Interface_Ping_Call) Run

func (_c *Interface_Ping_Call) Run(run func()) *Interface_Ping_Call

func (*Interface_Ping_Call) RunAndReturn

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

type Interface_UpdateSurveySessionStatus_Call

type Interface_UpdateSurveySessionStatus_Call struct {
	*mock.Call
}

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

func (*Interface_UpdateSurveySessionStatus_Call) Return

func (*Interface_UpdateSurveySessionStatus_Call) Run

func (*Interface_UpdateSurveySessionStatus_Call) RunAndReturn

type Interface_UpdateSurvey_Call

type Interface_UpdateSurvey_Call struct {
	*mock.Call
}

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

func (*Interface_UpdateSurvey_Call) Return

func (*Interface_UpdateSurvey_Call) Run

func (*Interface_UpdateSurvey_Call) RunAndReturn

type Interface_UpsertSurveyQuestionAnswer_Call

type Interface_UpsertSurveyQuestionAnswer_Call struct {
	*mock.Call
}

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

func (*Interface_UpsertSurveyQuestionAnswer_Call) Return

func (*Interface_UpsertSurveyQuestionAnswer_Call) Run

func (*Interface_UpsertSurveyQuestionAnswer_Call) RunAndReturn

type Interface_UpsertSurveyQuestions_Call

type Interface_UpsertSurveyQuestions_Call struct {
	*mock.Call
}

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

func (*Interface_UpsertSurveyQuestions_Call) Return

func (*Interface_UpsertSurveyQuestions_Call) Run

func (*Interface_UpsertSurveyQuestions_Call) RunAndReturn

Jump to

Keyboard shortcuts

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