Add Contact Management Functionality
- Introduced a new contact management feature, including the ability to create, retrieve, search, update, and delete contact messages. - Implemented the Contact entity, repository, service, and handler layers following Clean Architecture principles. - Added API endpoints for contact operations in Swagger documentation, ensuring comprehensive API specifications. - Enhanced error handling and validation for contact data, improving robustness and user experience. - Updated the main application to initialize the contact repository and service, integrating them into the existing system.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package contact
|
||||
|
||||
import "errors"
|
||||
|
||||
// Custom errors for contact domain
|
||||
var (
|
||||
ErrContactNotFound = errors.New("contact not found")
|
||||
ErrContactAlreadyResolved = errors.New("contact is already resolved")
|
||||
ErrContactClosed = errors.New("contact is closed and cannot be updated")
|
||||
ErrInvalidStatus = errors.New("invalid contact status")
|
||||
ErrInvalidDateRange = errors.New("invalid date range: date_from must be before date_to")
|
||||
ErrUnauthorizedAccess = errors.New("unauthorized access to contact")
|
||||
ErrInvalidContactData = errors.New("invalid contact data")
|
||||
ErrEmailRequired = errors.New("email is required")
|
||||
ErrPhoneRequired = errors.New("phone is required")
|
||||
ErrMessageRequired = errors.New("message is required")
|
||||
ErrFullNameRequired = errors.New("full name is required")
|
||||
)
|
||||
Reference in New Issue
Block a user