mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockContentService

type MockContentService struct {
	mock.Mock
}

MockContentService is an autogenerated mock type for the ContentService type

func NewMockContentService

func NewMockContentService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContentService

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

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

AuthorExists provides a mock function for the type MockContentService

func (*MockContentService) EXPECT

func (*MockContentService) GetCommentsForContent

func (_mock *MockContentService) GetCommentsForContent(ctx context.Context, contentID int) ([]*content.Comment, error)

GetCommentsForContent provides a mock function for the type MockContentService

func (*MockContentService) GetPublished

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

GetPublished provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedByAuthorUsername

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

GetPublishedByAuthorUsername provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedByID

func (_mock *MockContentService) GetPublishedByID(ctx context.Context, id int) (*content.Content, error)

GetPublishedByID provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedByPostType

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

GetPublishedByPostType provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedBySlugAny

func (_mock *MockContentService) GetPublishedBySlugAny(ctx context.Context, slug string) (*content.Content, error)

GetPublishedBySlugAny provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedByTag

func (_mock *MockContentService) GetPublishedByTag(ctx context.Context, tag string, limit int, offset int) ([]*content.Content, error)

GetPublishedByTag provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedCustomPostTypes

func (_mock *MockContentService) GetPublishedCustomPostTypes(ctx context.Context) ([]string, error)

GetPublishedCustomPostTypes provides a mock function for the type MockContentService

func (*MockContentService) GetPublishedPages

func (_mock *MockContentService) GetPublishedPages(ctx context.Context) ([]*content.Content, error)

GetPublishedPages provides a mock function for the type MockContentService

func (*MockContentService) GetTranslations

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

GetTranslations provides a mock function for the type MockContentService

type MockContentService_AuthorExists_Call

type MockContentService_AuthorExists_Call struct {
	*mock.Call
}

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

func (*MockContentService_AuthorExists_Call) Return

func (*MockContentService_AuthorExists_Call) Run

func (*MockContentService_AuthorExists_Call) RunAndReturn

type MockContentService_Expecter

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

func (*MockContentService_Expecter) AuthorExists

AuthorExists is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockContentService_Expecter) GetCommentsForContent

func (_e *MockContentService_Expecter) GetCommentsForContent(ctx any, contentID any) *MockContentService_GetCommentsForContent_Call

GetCommentsForContent is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockContentService_Expecter) GetPublished

func (_e *MockContentService_Expecter) GetPublished(ctx any, limit any, offset any) *MockContentService_GetPublished_Call

GetPublished is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockContentService_Expecter) GetPublishedByAuthorUsername

func (_e *MockContentService_Expecter) GetPublishedByAuthorUsername(ctx any, username any, limit any, offset any) *MockContentService_GetPublishedByAuthorUsername_Call

GetPublishedByAuthorUsername is a helper method to define mock.On call

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

func (*MockContentService_Expecter) GetPublishedByID

GetPublishedByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockContentService_Expecter) GetPublishedByPostType

func (_e *MockContentService_Expecter) GetPublishedByPostType(ctx any, postType any, limit any, offset any) *MockContentService_GetPublishedByPostType_Call

GetPublishedByPostType is a helper method to define mock.On call

  • ctx context.Context
  • postType string
  • limit int
  • offset int

func (*MockContentService_Expecter) GetPublishedBySlugAny

GetPublishedBySlugAny is a helper method to define mock.On call

  • ctx context.Context
  • slug string

func (*MockContentService_Expecter) GetPublishedByTag

func (_e *MockContentService_Expecter) GetPublishedByTag(ctx any, tag any, limit any, offset any) *MockContentService_GetPublishedByTag_Call

GetPublishedByTag is a helper method to define mock.On call

  • ctx context.Context
  • tag string
  • limit int
  • offset int

func (*MockContentService_Expecter) GetPublishedCustomPostTypes

GetPublishedCustomPostTypes is a helper method to define mock.On call

  • ctx context.Context

func (*MockContentService_Expecter) GetPublishedPages

GetPublishedPages is a helper method to define mock.On call

  • ctx context.Context

func (*MockContentService_Expecter) GetTranslations

func (_e *MockContentService_Expecter) GetTranslations(ctx any, translationGroupID any, excludeID any) *MockContentService_GetTranslations_Call

GetTranslations is a helper method to define mock.On call

  • ctx context.Context
  • translationGroupID int
  • excludeID int

type MockContentService_GetCommentsForContent_Call

type MockContentService_GetCommentsForContent_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetCommentsForContent_Call) Return

func (*MockContentService_GetCommentsForContent_Call) Run

func (*MockContentService_GetCommentsForContent_Call) RunAndReturn

type MockContentService_GetPublishedByAuthorUsername_Call

type MockContentService_GetPublishedByAuthorUsername_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedByAuthorUsername_Call) Return

func (*MockContentService_GetPublishedByAuthorUsername_Call) Run

func (*MockContentService_GetPublishedByAuthorUsername_Call) RunAndReturn

type MockContentService_GetPublishedByID_Call

type MockContentService_GetPublishedByID_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedByID_Call) Return

func (*MockContentService_GetPublishedByID_Call) Run

func (*MockContentService_GetPublishedByID_Call) RunAndReturn

type MockContentService_GetPublishedByPostType_Call

type MockContentService_GetPublishedByPostType_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedByPostType_Call) Return

func (*MockContentService_GetPublishedByPostType_Call) Run

func (*MockContentService_GetPublishedByPostType_Call) RunAndReturn

type MockContentService_GetPublishedBySlugAny_Call

type MockContentService_GetPublishedBySlugAny_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedBySlugAny_Call) Return

func (*MockContentService_GetPublishedBySlugAny_Call) Run

func (*MockContentService_GetPublishedBySlugAny_Call) RunAndReturn

type MockContentService_GetPublishedByTag_Call

type MockContentService_GetPublishedByTag_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedByTag_Call) Return

func (*MockContentService_GetPublishedByTag_Call) Run

func (*MockContentService_GetPublishedByTag_Call) RunAndReturn

type MockContentService_GetPublishedCustomPostTypes_Call

type MockContentService_GetPublishedCustomPostTypes_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedCustomPostTypes_Call) Return

func (*MockContentService_GetPublishedCustomPostTypes_Call) Run

func (*MockContentService_GetPublishedCustomPostTypes_Call) RunAndReturn

type MockContentService_GetPublishedPages_Call

type MockContentService_GetPublishedPages_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublishedPages_Call) Return

func (*MockContentService_GetPublishedPages_Call) Run

func (*MockContentService_GetPublishedPages_Call) RunAndReturn

type MockContentService_GetPublished_Call

type MockContentService_GetPublished_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetPublished_Call) Return

func (*MockContentService_GetPublished_Call) Run

func (*MockContentService_GetPublished_Call) RunAndReturn

type MockContentService_GetTranslations_Call

type MockContentService_GetTranslations_Call struct {
	*mock.Call
}

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

func (*MockContentService_GetTranslations_Call) Return

func (*MockContentService_GetTranslations_Call) Run

func (_c *MockContentService_GetTranslations_Call) Run(run func(ctx context.Context, translationGroupID int, excludeID int)) *MockContentService_GetTranslations_Call

func (*MockContentService_GetTranslations_Call) RunAndReturn

func (_c *MockContentService_GetTranslations_Call) RunAndReturn(run func(ctx context.Context, translationGroupID int, excludeID int) ([]*content.Content, error)) *MockContentService_GetTranslations_Call

type MockPostTypeResolver

type MockPostTypeResolver struct {
	mock.Mock
}

MockPostTypeResolver is an autogenerated mock type for the PostTypeResolver type

func NewMockPostTypeResolver

func NewMockPostTypeResolver(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPostTypeResolver

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

func (*MockPostTypeResolver) GetBySlug

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

GetBySlug provides a mock function for the type MockPostTypeResolver

type MockPostTypeResolver_Expecter

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

func (*MockPostTypeResolver_Expecter) GetBySlug

GetBySlug is a helper method to define mock.On call

  • slug string

type MockPostTypeResolver_GetBySlug_Call

type MockPostTypeResolver_GetBySlug_Call struct {
	*mock.Call
}

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

func (*MockPostTypeResolver_GetBySlug_Call) Return

func (*MockPostTypeResolver_GetBySlug_Call) Run

func (*MockPostTypeResolver_GetBySlug_Call) RunAndReturn

type MockUserFieldResolver

type MockUserFieldResolver struct {
	mock.Mock
}

MockUserFieldResolver is an autogenerated mock type for the UserFieldResolver type

func NewMockUserFieldResolver

func NewMockUserFieldResolver(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserFieldResolver

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

func (*MockUserFieldResolver) GetUserFields

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

GetUserFields provides a mock function for the type MockUserFieldResolver

type MockUserFieldResolver_Expecter

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

func (*MockUserFieldResolver_Expecter) GetUserFields

GetUserFields is a helper method to define mock.On call

type MockUserFieldResolver_GetUserFields_Call

type MockUserFieldResolver_GetUserFields_Call struct {
	*mock.Call
}

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

func (*MockUserFieldResolver_GetUserFields_Call) Return

func (*MockUserFieldResolver_GetUserFields_Call) Run

func (*MockUserFieldResolver_GetUserFields_Call) RunAndReturn

type MockUserProvider

type MockUserProvider struct {
	mock.Mock
}

MockUserProvider is an autogenerated mock type for the UserProvider type

func NewMockUserProvider

func NewMockUserProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserProvider

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

func (*MockUserProvider) GetUserByUsername

func (_mock *MockUserProvider) GetUserByUsername(ctx context.Context, username string) (*contentpage.UserBasicInfo, error)

GetUserByUsername provides a mock function for the type MockUserProvider

type MockUserProvider_Expecter

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

func (*MockUserProvider_Expecter) GetUserByUsername

func (_e *MockUserProvider_Expecter) GetUserByUsername(ctx any, username any) *MockUserProvider_GetUserByUsername_Call

GetUserByUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string

type MockUserProvider_GetUserByUsername_Call

type MockUserProvider_GetUserByUsername_Call struct {
	*mock.Call
}

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

func (*MockUserProvider_GetUserByUsername_Call) Return

func (*MockUserProvider_GetUserByUsername_Call) Run

func (*MockUserProvider_GetUserByUsername_Call) RunAndReturn

Jump to

Keyboard shortcuts

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