Skip to content

Commit

Permalink
fix go import-ed linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitsethiaDH committed Apr 28, 2024
1 parent c6c646e commit ffe731a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
database.name=link_identity
database.host=root
database.host=localhost
database.username=root
database.pass=root
database.port=5432
Expand Down
36 changes: 29 additions & 7 deletions app/mock/contact_repository_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package mock

import (
"context"

"github.com/link-identity/app/domain"

"github.com/stretchr/testify/mock"
)

Expand All @@ -12,43 +14,63 @@ type ContactRepositoryMock struct {
}

// GetContactByEmail ...
func (m *ContactRepositoryMock) GetContactByEmail(ctx context.Context, email string) (*domain.Contact, error) {
func (m *ContactRepositoryMock) GetContactByEmail(
ctx context.Context,
email string,
) (*domain.Contact, error) {
args := m.Called(ctx, email)
return args.Get(0).(*domain.Contact), args.Error(1)
}

// GetContactByPhone ...
func (m *ContactRepositoryMock) GetContactByPhone(ctx context.Context, phone string) (*domain.Contact, error) {
func (m *ContactRepositoryMock) GetContactByPhone(
ctx context.Context,
phone string,
) (*domain.Contact, error) {
args := m.Called(ctx, phone)
return args.Get(0).(*domain.Contact), args.Error(1)
}

// GetAllContacts ...
func (m *ContactRepositoryMock) GetAllContacts(ctx context.Context) ([]*domain.Contact, error) {
func (m *ContactRepositoryMock) GetAllContacts(
ctx context.Context,
) ([]*domain.Contact, error) {
args := m.Called(ctx)
return args.Get(0).([]*domain.Contact), args.Error(1)
}

// GetAllSecondaryContacts ...
func (m *ContactRepositoryMock) GetAllSecondaryContacts(ctx context.Context, linkedID uint) ([]*domain.Contact, error) {
func (m *ContactRepositoryMock) GetAllSecondaryContacts(
ctx context.Context,
linkedID uint,
) ([]*domain.Contact, error) {
args := m.Called(ctx, linkedID)
return args.Get(0).([]*domain.Contact), args.Error(1)
}

// GetPrimaryContactFromLinkedID ...
func (m *ContactRepositoryMock) GetPrimaryContactFromLinkedID(ctx context.Context, linkedID uint) (*domain.Contact, error) {
func (m *ContactRepositoryMock) GetPrimaryContactFromLinkedID(
ctx context.Context,
linkedID uint,
) (*domain.Contact, error) {
args := m.Called(ctx, linkedID)
return args.Get(0).(*domain.Contact), args.Error(1)
}

// CreateContact ...
func (m *ContactRepositoryMock) CreateContact(ctx context.Context, contact *domain.Contact) (*domain.Contact, error) {
func (m *ContactRepositoryMock) CreateContact(
ctx context.Context,
contact *domain.Contact,
) (*domain.Contact, error) {
args := m.Called(ctx, contact)
return args.Get(0).(*domain.Contact), args.Error(1)
}

// UpdateContact ...
func (m *ContactRepositoryMock) UpdateContact(ctx context.Context, contact *domain.Contact) (*domain.Contact, error) {
func (m *ContactRepositoryMock) UpdateContact(
ctx context.Context,
contact *domain.Contact,
) (*domain.Contact, error) {
args := m.Called(ctx, contact)
return args.Get(0).(*domain.Contact), args.Error(1)
}

0 comments on commit ffe731a

Please sign in to comment.