mocks

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAPIKeyService

type MockAPIKeyService struct {
	mock.Mock
}

MockAPIKeyService is an autogenerated mock type for the APIKeyService type

func NewMockAPIKeyService

func NewMockAPIKeyService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAPIKeyService

NewMockAPIKeyService creates a new instance of MockAPIKeyService. 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 (*MockAPIKeyService) Create

func (_mock *MockAPIKeyService) Create(ctx context.Context, userID int, name string) (string, *apikey.APIKey, error)

Create provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) EXPECT

func (*MockAPIKeyService) List

func (_mock *MockAPIKeyService) List(ctx context.Context, userID int) ([]*apikey.APIKey, error)

List provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) Revoke

func (_mock *MockAPIKeyService) Revoke(ctx context.Context, id int, userID int) (*apikey.APIKey, error)

Revoke provides a mock function for the type MockAPIKeyService

type MockAPIKeyService_Create_Call

type MockAPIKeyService_Create_Call struct {
	*mock.Call
}

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

func (*MockAPIKeyService_Create_Call) Return

func (*MockAPIKeyService_Create_Call) Run

func (*MockAPIKeyService_Create_Call) RunAndReturn

func (_c *MockAPIKeyService_Create_Call) RunAndReturn(run func(ctx context.Context, userID int, name string) (string, *apikey.APIKey, error)) *MockAPIKeyService_Create_Call

type MockAPIKeyService_Expecter

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

func (*MockAPIKeyService_Expecter) Create

func (_e *MockAPIKeyService_Expecter) Create(ctx any, userID any, name any) *MockAPIKeyService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • name string

func (*MockAPIKeyService_Expecter) List

List is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockAPIKeyService_Expecter) Revoke

Revoke is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • userID int

type MockAPIKeyService_List_Call

type MockAPIKeyService_List_Call struct {
	*mock.Call
}

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

func (*MockAPIKeyService_List_Call) Return

func (*MockAPIKeyService_List_Call) Run

func (*MockAPIKeyService_List_Call) RunAndReturn

func (_c *MockAPIKeyService_List_Call) RunAndReturn(run func(ctx context.Context, userID int) ([]*apikey.APIKey, error)) *MockAPIKeyService_List_Call

type MockAPIKeyService_Revoke_Call

type MockAPIKeyService_Revoke_Call struct {
	*mock.Call
}

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

func (*MockAPIKeyService_Revoke_Call) Return

func (*MockAPIKeyService_Revoke_Call) Run

func (*MockAPIKeyService_Revoke_Call) RunAndReturn

func (_c *MockAPIKeyService_Revoke_Call) RunAndReturn(run func(ctx context.Context, id int, userID int) (*apikey.APIKey, error)) *MockAPIKeyService_Revoke_Call

type MockContentServiceInterface

type MockContentServiceInterface struct {
	mock.Mock
}

MockContentServiceInterface is an autogenerated mock type for the ContentServiceInterface type

func NewMockContentServiceInterface

func NewMockContentServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContentServiceInterface

NewMockContentServiceInterface creates a new instance of MockContentServiceInterface. 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 (*MockContentServiceInterface) AuthorExists

func (_mock *MockContentServiceInterface) AuthorExists(ctx context.Context, username string) (bool, error)

AuthorExists provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) Create

Create provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) DeleteContent

func (_mock *MockContentServiceInterface) DeleteContent(ctx context.Context, id int, userID int, role string) error

DeleteContent provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) EXPECT

func (*MockContentServiceInterface) GenerateSlugFromTitle

func (_mock *MockContentServiceInterface) GenerateSlugFromTitle(ctx context.Context, title string) (string, error)

GenerateSlugFromTitle provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetAll

func (_mock *MockContentServiceInterface) GetAll(ctx context.Context, limit int, offset int) ([]*content.Content, error)

GetAll provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetByID

func (_mock *MockContentServiceInterface) GetByID(ctx context.Context, id int) (*content.Content, error)

GetByID provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetByUser

func (_mock *MockContentServiceInterface) GetByUser(ctx context.Context, userID int, limit int, offset int) ([]*content.Content, error)

GetByUser provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublished

func (_mock *MockContentServiceInterface) GetPublished(ctx context.Context, limit int, offset int) ([]*content.Content, error)

GetPublished provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublishedArchive added in v0.6.0

func (_mock *MockContentServiceInterface) GetPublishedArchive(ctx context.Context, postType string, language string) ([]*content.ArchiveMonth, error)

GetPublishedArchive provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublishedAuthors added in v0.5.0

func (_mock *MockContentServiceInterface) GetPublishedAuthors(ctx context.Context, limit int, offset int) ([]*content.PublishedAuthor, error)

GetPublishedAuthors provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublishedByAuthorUsername

func (_mock *MockContentServiceInterface) GetPublishedByAuthorUsername(ctx context.Context, username string, language string, limit int, offset int) ([]*content.Content, error)

GetPublishedByAuthorUsername provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublishedByPostType added in v0.6.0

func (_mock *MockContentServiceInterface) GetPublishedByPostType(ctx context.Context, postType string, language string, year int, month int, limit int, offset int) ([]*content.Content, error)

GetPublishedByPostType provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetPublishedBySlug

func (_mock *MockContentServiceInterface) GetPublishedBySlug(ctx context.Context, slug string, language string) (*content.Content, error)

GetPublishedBySlug provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) GetTranslations

func (_mock *MockContentServiceInterface) GetTranslations(ctx context.Context, translationGroupID int, excludeID int) ([]*content.Content, error)

GetTranslations provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) ListByFilters

func (_mock *MockContentServiceInterface) ListByFilters(ctx context.Context, userID int, filters content.ContentFilters) ([]*content.Content, error)

ListByFilters provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) SearchPublished

func (_mock *MockContentServiceInterface) SearchPublished(ctx context.Context, query string, limit int) ([]*content.Content, error)

SearchPublished provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) SetSystemFields

func (_mock *MockContentServiceInterface) SetSystemFields(ctx context.Context, contentID int, systemFields map[string]any) (*content.Content, error)

SetSystemFields provides a mock function for the type MockContentServiceInterface

func (*MockContentServiceInterface) Update

Update provides a mock function for the type MockContentServiceInterface

type MockContentServiceInterface_AuthorExists_Call

type MockContentServiceInterface_AuthorExists_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_AuthorExists_Call) Return

func (*MockContentServiceInterface_AuthorExists_Call) Run

func (*MockContentServiceInterface_AuthorExists_Call) RunAndReturn

type MockContentServiceInterface_Create_Call

type MockContentServiceInterface_Create_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_Create_Call) Return

func (*MockContentServiceInterface_Create_Call) Run

func (*MockContentServiceInterface_Create_Call) RunAndReturn

type MockContentServiceInterface_DeleteContent_Call

type MockContentServiceInterface_DeleteContent_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_DeleteContent_Call) Return

func (*MockContentServiceInterface_DeleteContent_Call) Run

func (*MockContentServiceInterface_DeleteContent_Call) RunAndReturn

type MockContentServiceInterface_Expecter

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

func (*MockContentServiceInterface_Expecter) AuthorExists

AuthorExists is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockContentServiceInterface_Expecter) Create

Create is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • req content.CreateContentRequest

func (*MockContentServiceInterface_Expecter) DeleteContent

DeleteContent is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • userID int
  • role string

func (*MockContentServiceInterface_Expecter) GenerateSlugFromTitle

GenerateSlugFromTitle is a helper method to define mock.On call

  • ctx context.Context
  • title string

func (*MockContentServiceInterface_Expecter) GetAll

GetAll is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetByID

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockContentServiceInterface_Expecter) GetByUser

GetByUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetPublished

GetPublished is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetPublishedArchive added in v0.6.0

GetPublishedArchive is a helper method to define mock.On call

  • ctx context.Context
  • postType string
  • language string

func (*MockContentServiceInterface_Expecter) GetPublishedAuthors added in v0.5.0

GetPublishedAuthors is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetPublishedByAuthorUsername

func (_e *MockContentServiceInterface_Expecter) GetPublishedByAuthorUsername(ctx any, username any, language any, limit any, offset any) *MockContentServiceInterface_GetPublishedByAuthorUsername_Call

GetPublishedByAuthorUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • language string
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetPublishedByPostType added in v0.6.0

func (_e *MockContentServiceInterface_Expecter) GetPublishedByPostType(ctx any, postType any, language any, year any, month any, limit any, offset any) *MockContentServiceInterface_GetPublishedByPostType_Call

GetPublishedByPostType is a helper method to define mock.On call

  • ctx context.Context
  • postType string
  • language string
  • year int
  • month int
  • limit int
  • offset int

func (*MockContentServiceInterface_Expecter) GetPublishedBySlug

GetPublishedBySlug is a helper method to define mock.On call

  • ctx context.Context
  • slug string
  • language string

func (*MockContentServiceInterface_Expecter) GetTranslations

func (_e *MockContentServiceInterface_Expecter) GetTranslations(ctx any, translationGroupID any, excludeID any) *MockContentServiceInterface_GetTranslations_Call

GetTranslations is a helper method to define mock.On call

  • ctx context.Context
  • translationGroupID int
  • excludeID int

func (*MockContentServiceInterface_Expecter) ListByFilters

ListByFilters is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • filters content.ContentFilters

func (*MockContentServiceInterface_Expecter) SearchPublished

SearchPublished is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • limit int

func (*MockContentServiceInterface_Expecter) SetSystemFields

func (_e *MockContentServiceInterface_Expecter) SetSystemFields(ctx any, contentID any, systemFields any) *MockContentServiceInterface_SetSystemFields_Call

SetSystemFields is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • systemFields map[string]any

func (*MockContentServiceInterface_Expecter) Update

Update is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • userID int
  • role string
  • req content.UpdateContentRequest

type MockContentServiceInterface_GenerateSlugFromTitle_Call

type MockContentServiceInterface_GenerateSlugFromTitle_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GenerateSlugFromTitle_Call) Return

func (*MockContentServiceInterface_GenerateSlugFromTitle_Call) Run

func (*MockContentServiceInterface_GenerateSlugFromTitle_Call) RunAndReturn

type MockContentServiceInterface_GetAll_Call

type MockContentServiceInterface_GetAll_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetAll_Call) Return

func (*MockContentServiceInterface_GetAll_Call) Run

func (*MockContentServiceInterface_GetAll_Call) RunAndReturn

type MockContentServiceInterface_GetByID_Call

type MockContentServiceInterface_GetByID_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetByID_Call) Return

func (*MockContentServiceInterface_GetByID_Call) Run

func (*MockContentServiceInterface_GetByID_Call) RunAndReturn

type MockContentServiceInterface_GetByUser_Call

type MockContentServiceInterface_GetByUser_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetByUser_Call) Return

func (*MockContentServiceInterface_GetByUser_Call) Run

func (*MockContentServiceInterface_GetByUser_Call) RunAndReturn

type MockContentServiceInterface_GetPublishedArchive_Call added in v0.6.0

type MockContentServiceInterface_GetPublishedArchive_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublishedArchive_Call) Return added in v0.6.0

func (*MockContentServiceInterface_GetPublishedArchive_Call) Run added in v0.6.0

func (*MockContentServiceInterface_GetPublishedArchive_Call) RunAndReturn added in v0.6.0

type MockContentServiceInterface_GetPublishedAuthors_Call added in v0.5.0

type MockContentServiceInterface_GetPublishedAuthors_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublishedAuthors_Call) Return added in v0.5.0

func (*MockContentServiceInterface_GetPublishedAuthors_Call) Run added in v0.5.0

func (*MockContentServiceInterface_GetPublishedAuthors_Call) RunAndReturn added in v0.5.0

type MockContentServiceInterface_GetPublishedByAuthorUsername_Call

type MockContentServiceInterface_GetPublishedByAuthorUsername_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublishedByAuthorUsername_Call) Return

func (*MockContentServiceInterface_GetPublishedByAuthorUsername_Call) Run

func (*MockContentServiceInterface_GetPublishedByAuthorUsername_Call) RunAndReturn

type MockContentServiceInterface_GetPublishedByPostType_Call added in v0.6.0

type MockContentServiceInterface_GetPublishedByPostType_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublishedByPostType_Call) Return added in v0.6.0

func (*MockContentServiceInterface_GetPublishedByPostType_Call) Run added in v0.6.0

func (*MockContentServiceInterface_GetPublishedByPostType_Call) RunAndReturn added in v0.6.0

type MockContentServiceInterface_GetPublishedBySlug_Call

type MockContentServiceInterface_GetPublishedBySlug_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublishedBySlug_Call) Return

func (*MockContentServiceInterface_GetPublishedBySlug_Call) Run

func (*MockContentServiceInterface_GetPublishedBySlug_Call) RunAndReturn

type MockContentServiceInterface_GetPublished_Call

type MockContentServiceInterface_GetPublished_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetPublished_Call) Return

func (*MockContentServiceInterface_GetPublished_Call) Run

func (*MockContentServiceInterface_GetPublished_Call) RunAndReturn

type MockContentServiceInterface_GetTranslations_Call

type MockContentServiceInterface_GetTranslations_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_GetTranslations_Call) Return

func (*MockContentServiceInterface_GetTranslations_Call) Run

func (*MockContentServiceInterface_GetTranslations_Call) RunAndReturn

type MockContentServiceInterface_ListByFilters_Call

type MockContentServiceInterface_ListByFilters_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_ListByFilters_Call) Return

func (*MockContentServiceInterface_ListByFilters_Call) Run

func (*MockContentServiceInterface_ListByFilters_Call) RunAndReturn

type MockContentServiceInterface_SearchPublished_Call

type MockContentServiceInterface_SearchPublished_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_SearchPublished_Call) Return

func (*MockContentServiceInterface_SearchPublished_Call) Run

func (*MockContentServiceInterface_SearchPublished_Call) RunAndReturn

type MockContentServiceInterface_SetSystemFields_Call

type MockContentServiceInterface_SetSystemFields_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_SetSystemFields_Call) Return

func (*MockContentServiceInterface_SetSystemFields_Call) Run

func (*MockContentServiceInterface_SetSystemFields_Call) RunAndReturn

type MockContentServiceInterface_Update_Call

type MockContentServiceInterface_Update_Call struct {
	*mock.Call
}

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

func (*MockContentServiceInterface_Update_Call) Return

func (*MockContentServiceInterface_Update_Call) Run

func (*MockContentServiceInterface_Update_Call) RunAndReturn

type MockDashboardServiceInterface

type MockDashboardServiceInterface struct {
	mock.Mock
}

MockDashboardServiceInterface is an autogenerated mock type for the DashboardServiceInterface type

func NewMockDashboardServiceInterface

func NewMockDashboardServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDashboardServiceInterface

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

func (*MockDashboardServiceInterface) GetStats

func (_mock *MockDashboardServiceInterface) GetStats(ctx context.Context, userID int) (*dashboard.Stats, error)

GetStats provides a mock function for the type MockDashboardServiceInterface

type MockDashboardServiceInterface_Expecter

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

func (*MockDashboardServiceInterface_Expecter) GetStats

GetStats is a helper method to define mock.On call

  • ctx context.Context
  • userID int

type MockDashboardServiceInterface_GetStats_Call

type MockDashboardServiceInterface_GetStats_Call struct {
	*mock.Call
}

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

func (*MockDashboardServiceInterface_GetStats_Call) Return

func (*MockDashboardServiceInterface_GetStats_Call) Run

func (*MockDashboardServiceInterface_GetStats_Call) RunAndReturn

type MockMediaLister added in v0.6.0

type MockMediaLister struct {
	mock.Mock
}

MockMediaLister is an autogenerated mock type for the MediaLister type

func NewMockMediaLister added in v0.6.0

func NewMockMediaLister(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMediaLister

NewMockMediaLister creates a new instance of MockMediaLister. 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 (*MockMediaLister) EXPECT added in v0.6.0

func (*MockMediaLister) ListByCursor added in v0.6.0

func (_mock *MockMediaLister) ListByCursor(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)

ListByCursor provides a mock function for the type MockMediaLister

type MockMediaLister_Expecter added in v0.6.0

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

func (*MockMediaLister_Expecter) ListByCursor added in v0.6.0

func (_e *MockMediaLister_Expecter) ListByCursor(ctx any, userID any, limit any, beforeID any) *MockMediaLister_ListByCursor_Call

ListByCursor is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • limit int
  • beforeID int

type MockMediaLister_ListByCursor_Call added in v0.6.0

type MockMediaLister_ListByCursor_Call struct {
	*mock.Call
}

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

func (*MockMediaLister_ListByCursor_Call) Return added in v0.6.0

func (*MockMediaLister_ListByCursor_Call) Run added in v0.6.0

func (_c *MockMediaLister_ListByCursor_Call) Run(run func(ctx context.Context, userID int, limit int, beforeID int)) *MockMediaLister_ListByCursor_Call

func (*MockMediaLister_ListByCursor_Call) RunAndReturn added in v0.6.0

func (_c *MockMediaLister_ListByCursor_Call) RunAndReturn(run func(ctx context.Context, userID int, limit int, beforeID int) ([]*media.Media, error)) *MockMediaLister_ListByCursor_Call

type MockMediaServiceInterface

type MockMediaServiceInterface struct {
	mock.Mock
}

MockMediaServiceInterface is an autogenerated mock type for the MediaServiceInterface type

func NewMockMediaServiceInterface

func NewMockMediaServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMediaServiceInterface

NewMockMediaServiceInterface creates a new instance of MockMediaServiceInterface. 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 (*MockMediaServiceInterface) Delete

func (_mock *MockMediaServiceInterface) Delete(ctx context.Context, id int, userID int, userRole string) error

Delete provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) EXPECT

func (*MockMediaServiceInterface) ForceUpload

func (_mock *MockMediaServiceInterface) ForceUpload(ctx context.Context, req media.UploadRequest) (*media.Media, error)

ForceUpload provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) GenerateFromBytes

func (_mock *MockMediaServiceInterface) GenerateFromBytes(ctx context.Context, imageBytes []byte, userID int, altText string, originalFilename string) (*media.Media, error)

GenerateFromBytes provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) GetAll

func (_mock *MockMediaServiceInterface) GetAll(ctx context.Context, limit int, offset int) ([]*media.Media, error)

GetAll provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) GetByID

func (_mock *MockMediaServiceInterface) GetByID(ctx context.Context, id int) (*media.Media, error)

GetByID provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) SearchMedia

func (_mock *MockMediaServiceInterface) SearchMedia(ctx context.Context, search string, dateFilter string, limit int, offset int) ([]*media.Media, error)

SearchMedia provides a mock function for the type MockMediaServiceInterface

func (*MockMediaServiceInterface) Upload

Upload provides a mock function for the type MockMediaServiceInterface

type MockMediaServiceInterface_Delete_Call

type MockMediaServiceInterface_Delete_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_Delete_Call) Return

func (*MockMediaServiceInterface_Delete_Call) Run

func (*MockMediaServiceInterface_Delete_Call) RunAndReturn

func (_c *MockMediaServiceInterface_Delete_Call) RunAndReturn(run func(ctx context.Context, id int, userID int, userRole string) error) *MockMediaServiceInterface_Delete_Call

type MockMediaServiceInterface_Expecter

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

func (*MockMediaServiceInterface_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • userID int
  • userRole string

func (*MockMediaServiceInterface_Expecter) ForceUpload

ForceUpload is a helper method to define mock.On call

  • ctx context.Context
  • req media.UploadRequest

func (*MockMediaServiceInterface_Expecter) GenerateFromBytes

func (_e *MockMediaServiceInterface_Expecter) GenerateFromBytes(ctx any, imageBytes any, userID any, altText any, originalFilename any) *MockMediaServiceInterface_GenerateFromBytes_Call

GenerateFromBytes is a helper method to define mock.On call

  • ctx context.Context
  • imageBytes []byte
  • userID int
  • altText string
  • originalFilename string

func (*MockMediaServiceInterface_Expecter) GetAll

GetAll is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockMediaServiceInterface_Expecter) GetByID

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockMediaServiceInterface_Expecter) SearchMedia

func (_e *MockMediaServiceInterface_Expecter) SearchMedia(ctx any, search any, dateFilter any, limit any, offset any) *MockMediaServiceInterface_SearchMedia_Call

SearchMedia is a helper method to define mock.On call

  • ctx context.Context
  • search string
  • dateFilter string
  • limit int
  • offset int

func (*MockMediaServiceInterface_Expecter) Upload

Upload is a helper method to define mock.On call

  • ctx context.Context
  • req media.UploadRequest

type MockMediaServiceInterface_ForceUpload_Call

type MockMediaServiceInterface_ForceUpload_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_ForceUpload_Call) Return

func (*MockMediaServiceInterface_ForceUpload_Call) Run

func (*MockMediaServiceInterface_ForceUpload_Call) RunAndReturn

type MockMediaServiceInterface_GenerateFromBytes_Call

type MockMediaServiceInterface_GenerateFromBytes_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_GenerateFromBytes_Call) Return

func (*MockMediaServiceInterface_GenerateFromBytes_Call) Run

func (_c *MockMediaServiceInterface_GenerateFromBytes_Call) Run(run func(ctx context.Context, imageBytes []byte, userID int, altText string, originalFilename string)) *MockMediaServiceInterface_GenerateFromBytes_Call

func (*MockMediaServiceInterface_GenerateFromBytes_Call) RunAndReturn

func (_c *MockMediaServiceInterface_GenerateFromBytes_Call) RunAndReturn(run func(ctx context.Context, imageBytes []byte, userID int, altText string, originalFilename string) (*media.Media, error)) *MockMediaServiceInterface_GenerateFromBytes_Call

type MockMediaServiceInterface_GetAll_Call

type MockMediaServiceInterface_GetAll_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_GetAll_Call) Return

func (*MockMediaServiceInterface_GetAll_Call) Run

func (*MockMediaServiceInterface_GetAll_Call) RunAndReturn

type MockMediaServiceInterface_GetByID_Call

type MockMediaServiceInterface_GetByID_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_GetByID_Call) Return

func (*MockMediaServiceInterface_GetByID_Call) Run

func (*MockMediaServiceInterface_GetByID_Call) RunAndReturn

type MockMediaServiceInterface_SearchMedia_Call

type MockMediaServiceInterface_SearchMedia_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_SearchMedia_Call) Return

func (*MockMediaServiceInterface_SearchMedia_Call) Run

func (*MockMediaServiceInterface_SearchMedia_Call) RunAndReturn

func (_c *MockMediaServiceInterface_SearchMedia_Call) RunAndReturn(run func(ctx context.Context, search string, dateFilter string, limit int, offset int) ([]*media.Media, error)) *MockMediaServiceInterface_SearchMedia_Call

type MockMediaServiceInterface_Upload_Call

type MockMediaServiceInterface_Upload_Call struct {
	*mock.Call
}

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

func (*MockMediaServiceInterface_Upload_Call) Return

func (*MockMediaServiceInterface_Upload_Call) Run

func (*MockMediaServiceInterface_Upload_Call) RunAndReturn

type MockPostTypeServiceInterface

type MockPostTypeServiceInterface struct {
	mock.Mock
}

MockPostTypeServiceInterface is an autogenerated mock type for the PostTypeServiceInterface type

func NewMockPostTypeServiceInterface

func NewMockPostTypeServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPostTypeServiceInterface

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

func (*MockPostTypeServiceInterface) GetAll

GetAll provides a mock function for the type MockPostTypeServiceInterface

func (*MockPostTypeServiceInterface) GetBySlug

func (_mock *MockPostTypeServiceInterface) GetBySlug(slug string) (posttype.PostType, error)

GetBySlug provides a mock function for the type MockPostTypeServiceInterface

func (*MockPostTypeServiceInterface) GetUserFields

func (_mock *MockPostTypeServiceInterface) GetUserFields() []customfield.FieldSchema

GetUserFields provides a mock function for the type MockPostTypeServiceInterface

func (*MockPostTypeServiceInterface) GetUserSystemFields

func (_mock *MockPostTypeServiceInterface) GetUserSystemFields() []customfield.FieldSchema

GetUserSystemFields provides a mock function for the type MockPostTypeServiceInterface

func (*MockPostTypeServiceInterface) Register

Register provides a mock function for the type MockPostTypeServiceInterface

type MockPostTypeServiceInterface_Expecter

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

func (*MockPostTypeServiceInterface_Expecter) GetAll

GetAll is a helper method to define mock.On call

func (*MockPostTypeServiceInterface_Expecter) GetBySlug

GetBySlug is a helper method to define mock.On call

  • slug string

func (*MockPostTypeServiceInterface_Expecter) GetUserFields

GetUserFields is a helper method to define mock.On call

func (*MockPostTypeServiceInterface_Expecter) GetUserSystemFields

GetUserSystemFields is a helper method to define mock.On call

func (*MockPostTypeServiceInterface_Expecter) Register

Register is a helper method to define mock.On call

  • pt posttype.PostType

type MockPostTypeServiceInterface_GetAll_Call

type MockPostTypeServiceInterface_GetAll_Call struct {
	*mock.Call
}

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

func (*MockPostTypeServiceInterface_GetAll_Call) Return

func (*MockPostTypeServiceInterface_GetAll_Call) Run

func (*MockPostTypeServiceInterface_GetAll_Call) RunAndReturn

type MockPostTypeServiceInterface_GetBySlug_Call

type MockPostTypeServiceInterface_GetBySlug_Call struct {
	*mock.Call
}

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

func (*MockPostTypeServiceInterface_GetBySlug_Call) Return

func (*MockPostTypeServiceInterface_GetBySlug_Call) Run

func (*MockPostTypeServiceInterface_GetBySlug_Call) RunAndReturn

type MockPostTypeServiceInterface_GetUserFields_Call

type MockPostTypeServiceInterface_GetUserFields_Call struct {
	*mock.Call
}

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

func (*MockPostTypeServiceInterface_GetUserFields_Call) Return

func (*MockPostTypeServiceInterface_GetUserFields_Call) Run

func (*MockPostTypeServiceInterface_GetUserFields_Call) RunAndReturn

type MockPostTypeServiceInterface_GetUserSystemFields_Call

type MockPostTypeServiceInterface_GetUserSystemFields_Call struct {
	*mock.Call
}

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

func (*MockPostTypeServiceInterface_GetUserSystemFields_Call) Return

func (*MockPostTypeServiceInterface_GetUserSystemFields_Call) Run

func (*MockPostTypeServiceInterface_GetUserSystemFields_Call) RunAndReturn

type MockPostTypeServiceInterface_Register_Call

type MockPostTypeServiceInterface_Register_Call struct {
	*mock.Call
}

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

func (*MockPostTypeServiceInterface_Register_Call) Return

func (*MockPostTypeServiceInterface_Register_Call) Run

func (*MockPostTypeServiceInterface_Register_Call) RunAndReturn

type MockTextGenerationService

type MockTextGenerationService struct {
	mock.Mock
}

MockTextGenerationService is an autogenerated mock type for the TextGenerationService type

func NewMockTextGenerationService

func NewMockTextGenerationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTextGenerationService

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

func (*MockTextGenerationService) EnhanceText

func (_mock *MockTextGenerationService) EnhanceText(ctx context.Context, content string, format string, mediaContext string) (string, error)

EnhanceText provides a mock function for the type MockTextGenerationService

func (*MockTextGenerationService) TranslateText

func (_mock *MockTextGenerationService) TranslateText(ctx context.Context, content string, sourceLang string, targetLang string, format string) (string, error)

TranslateText provides a mock function for the type MockTextGenerationService

type MockTextGenerationService_EnhanceText_Call

type MockTextGenerationService_EnhanceText_Call struct {
	*mock.Call
}

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

func (*MockTextGenerationService_EnhanceText_Call) Return

func (*MockTextGenerationService_EnhanceText_Call) Run

func (*MockTextGenerationService_EnhanceText_Call) RunAndReturn

type MockTextGenerationService_Expecter

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

func (*MockTextGenerationService_Expecter) EnhanceText

func (_e *MockTextGenerationService_Expecter) EnhanceText(ctx any, content any, format any, mediaContext any) *MockTextGenerationService_EnhanceText_Call

EnhanceText is a helper method to define mock.On call

  • ctx context.Context
  • content string
  • format string
  • mediaContext string

func (*MockTextGenerationService_Expecter) TranslateText

func (_e *MockTextGenerationService_Expecter) TranslateText(ctx any, content any, sourceLang any, targetLang any, format any) *MockTextGenerationService_TranslateText_Call

TranslateText is a helper method to define mock.On call

  • ctx context.Context
  • content string
  • sourceLang string
  • targetLang string
  • format string

type MockTextGenerationService_TranslateText_Call

type MockTextGenerationService_TranslateText_Call struct {
	*mock.Call
}

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

func (*MockTextGenerationService_TranslateText_Call) Return

func (*MockTextGenerationService_TranslateText_Call) Run

func (*MockTextGenerationService_TranslateText_Call) RunAndReturn

func (_c *MockTextGenerationService_TranslateText_Call) RunAndReturn(run func(ctx context.Context, content string, sourceLang string, targetLang string, format string) (string, error)) *MockTextGenerationService_TranslateText_Call

Jump to

Keyboard shortcuts

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