Documentation ¶
Index ¶
- type Contact
- type CreateCmd
- type EditNameCmd
- type FakeContactBuilder
- type MockService
- func (_m *MockService) Create(ctx context.Context, cmd *CreateCmd) (*Contact, error)
- func (_m *MockService) Delete(ctx context.Context, contact *Contact) error
- func (_m *MockService) EditName(ctx context.Context, cmd *EditNameCmd) (*Contact, error)
- func (_m *MockService) GetAll(ctx context.Context, paginateCmd *sqlstorage.PaginateCmd) ([]Contact, error)
- func (_m *MockService) GetByID(ctx context.Context, id uuid.UUID) (*Contact, error)
- type Name
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditNameCmd ¶
type FakeContactBuilder ¶
type FakeContactBuilder struct {
// contains filtered or unexported fields
}
func NewFakeContact ¶
func NewFakeContact(t testing.TB) *FakeContactBuilder
func (*FakeContactBuilder) Build ¶
func (f *FakeContactBuilder) Build() *Contact
func (*FakeContactBuilder) BuildAndStore ¶
func (f *FakeContactBuilder) BuildAndStore(ctx context.Context, db sqlstorage.Querier) *Contact
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface { mock.TestingT Cleanup(func()) }) *MockService
NewMockService creates a new instance of MockService. 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 (*MockService) Delete ¶
func (_m *MockService) Delete(ctx context.Context, contact *Contact) error
Delete provides a mock function with given fields: ctx, contact
func (*MockService) EditName ¶
func (_m *MockService) EditName(ctx context.Context, cmd *EditNameCmd) (*Contact, error)
EditName provides a mock function with given fields: ctx, cmd
func (*MockService) GetAll ¶
func (_m *MockService) GetAll(ctx context.Context, paginateCmd *sqlstorage.PaginateCmd) ([]Contact, error)
GetAll provides a mock function with given fields: ctx, paginateCmd
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
func (*Name) DisplayName ¶
func (*Name) MiddleName ¶
type Service ¶
type Service interface { Create(ctx context.Context, cmd *CreateCmd) (*Contact, error) GetByID(ctx context.Context, id uuid.UUID) (*Contact, error) EditName(ctx context.Context, cmd *EditNameCmd) (*Contact, error) GetAll(ctx context.Context) ([]Contact, error) Delete(ctx context.Context, contact *Contact) error }
Click to show internal directories.
Click to hide internal directories.