examples

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package examples is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailService

type MailService interface {
	SendMail() error
}

Interfaces

type MockMailService

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

MockMailService is a mock of MailService interface.

func NewMockMailService

func NewMockMailService(ctrl *gomock.Controller) *MockMailService

NewMockMailService creates a new mock instance.

func (*MockMailService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMailService) SendMail

func (m *MockMailService) SendMail() error

SendMail mocks base method.

type MockMailServiceMockRecorder

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

MockMailServiceMockRecorder is the mock recorder for MockMailService.

func (*MockMailServiceMockRecorder) SendMail

func (mr *MockMailServiceMockRecorder) SendMail() *gomock.Call

SendMail indicates an expected call of SendMail.

type MockUserRepository

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

MockUserRepository is a mock of UserRepository interface.

func NewMockUserRepository

func NewMockUserRepository(ctrl *gomock.Controller) *MockUserRepository

NewMockUserRepository creates a new mock instance.

func (*MockUserRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserRepository) GetUser

func (m *MockUserRepository) GetUser(arg0 string) (User, error)

GetUser mocks base method.

func (*MockUserRepository) StoreUser

func (m *MockUserRepository) StoreUser(arg0 User) error

StoreUser mocks base method.

type MockUserRepositoryMockRecorder

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

MockUserRepositoryMockRecorder is the mock recorder for MockUserRepository.

func (*MockUserRepositoryMockRecorder) GetUser

func (mr *MockUserRepositoryMockRecorder) GetUser(arg0 any) *gomock.Call

GetUser indicates an expected call of GetUser.

func (*MockUserRepositoryMockRecorder) StoreUser

func (mr *MockUserRepositoryMockRecorder) StoreUser(arg0 any) *gomock.Call

StoreUser indicates an expected call of StoreUser.

type User

type User struct {
	Name string
}

type UserController

type UserController struct {
	Mailer     MailService
	Repository UserRepository
}

System under test.

func (*UserController) Handle

func (c *UserController) Handle(userName string, payload string) (*User, error)

type UserRepository

type UserRepository interface {
	GetUser(string) (User, error)
	StoreUser(User) error
}

Jump to

Keyboard shortcuts

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