Documentation ¶
Index ¶
- Constants
- Variables
- type AddressService
- type CustomerMock
- type CustomerService
- func (service *CustomerService) Create(contextControl domain.ContextControl, customer domain.CustomerDomain) (domain.CustomerDomain, error)
- func (service *CustomerService) ValidateCreate(customer domain.CustomerDomain) error
- func (service *CustomerService) ValidateTypePerson(customer domain.CustomerDomain) error
- type PhoneMock
- type PhoneService
- func (service *PhoneService) Create(contextControl domain.ContextControl, phone domain.PhoneDomain) (domain.PhoneDomain, error)
- func (service *PhoneService) GetByID(contextControl domain.ContextControl, ID int64) (domain.PhoneDomain, bool, error)
- func (service *PhoneService) ValidatePhone(phone domain.PhoneDomain) error
- type ScheduleService
Constants ¶
View Source
const ( AddressErrorToSaveInCache = "error to save address in cache." AddressErrorToGetByIDInCache = "error to save and address in cache" )
View Source
const ( CustomerErrorToSaveInCache = "error to save customer in cache." CustomerErrorToGetByIDInCache = "error to get person in cache" InvalidTypeOfDocument = "invalid type of person" )
View Source
const ( TypePersonLegal = "legal" TypePersonIndividual = "individual" )
View Source
const ( PhoneCacheKeyTypeID = "ID" LandLinePhone = "landline_phone" MobilePhone = "mobile_phone" )
View Source
const ( PhoneErrorToSaveInCache = "error to save phone in cache" PhoneErrorToGetByIDInCache = "error to get phone by id in cache" ErrorInvalidMobilePhoneLength = "invalid Mobile Phone length error" ErrorInvalidLandLinePhoneLength = "invalid Land Line Phone length error" InvalidTypeOfPhone = "invalid type of phone" )
View Source
const (
AddressCacheKeyTypeID = "ID"
)
View Source
const (
CustomerCacheKeyTypeID = "CUSTOMER_ID"
)
Variables ¶
View Source
var AddressCacheTTL = 10 * time.Minute
View Source
var ClientCacheTTL = 10 * time.Minute
View Source
var PhoneCacheTTL = 10 * time.Minute
Functions ¶
This section is empty.
Types ¶
type AddressService ¶
type AddressService struct { LoggerSugar *zap.SugaredLogger AddressDomainDataBaseRepository output.IAddressDomainDataBaseRepository AddressDomainCacheRepository output.IAddressDomainCacheRepository }
func (AddressService) Create ¶
func (service AddressService) Create(contextControl domain.ContextControl, address domain.AddressDomain) (domain.AddressDomain, error)
func (AddressService) GetByID ¶
func (service AddressService) GetByID(contextControl domain.ContextControl, ID int64) (domain.AddressDomain, bool, error)
type CustomerMock ¶
type CustomerMock struct { CreateMock func(contextControl domain.ContextControl, customer domain.CustomerDomain) (domain.CustomerDomain, error) GetByIDMock func(ID int64) (domain.CustomerDomain, error) }
func (CustomerMock) Create ¶
func (c CustomerMock) Create(contextControl domain.ContextControl, customer domain.CustomerDomain) (domain.CustomerDomain, error)
func (CustomerMock) GetByID ¶
func (c CustomerMock) GetByID(ID int64) (domain.CustomerDomain, error)
type CustomerService ¶
type CustomerService struct { LoggerSugar *zap.SugaredLogger CustomerDomainDataBaseRepository output.ICustomerDomainDataBaseRepository CustomerDomainCacheRepository output.ICustomerDomainCacheRepository }
func (*CustomerService) Create ¶
func (service *CustomerService) Create(contextControl domain.ContextControl, customer domain.CustomerDomain) (domain.CustomerDomain, error)
func (*CustomerService) ValidateCreate ¶
func (service *CustomerService) ValidateCreate(customer domain.CustomerDomain) error
func (*CustomerService) ValidateTypePerson ¶
func (service *CustomerService) ValidateTypePerson(customer domain.CustomerDomain) error
type PhoneMock ¶
type PhoneMock struct { CreateMock func(contextControl domain.ContextControl, phone domain.PhoneDomain) (domain.PhoneDomain, error) GetByIDMock func(ID int64) (domain.PhoneDomain, error) }
func (PhoneMock) Create ¶
func (c PhoneMock) Create(contextControl domain.ContextControl, phone domain.PhoneDomain) (domain.PhoneDomain, error)
type PhoneService ¶
type PhoneService struct { LoggerSugar *zap.SugaredLogger PhoneDomainDataBaseRepository output.IPhoneDomainDataBaseRepository PhoneDomainCacheRepository output.IPhoneDomainCacheRepository }
func (*PhoneService) Create ¶
func (service *PhoneService) Create(contextControl domain.ContextControl, phone domain.PhoneDomain) (domain.PhoneDomain, error)
func (*PhoneService) GetByID ¶
func (service *PhoneService) GetByID(contextControl domain.ContextControl, ID int64) (domain.PhoneDomain, bool, error)
func (*PhoneService) ValidatePhone ¶
func (service *PhoneService) ValidatePhone(phone domain.PhoneDomain) error
type ScheduleService ¶
type ScheduleService struct {
LoggerSugar *zap.SugaredLogger
}
func (ScheduleService) CreateFromMessage ¶
func (ss ScheduleService) CreateFromMessage(contextControl domain.ContextControl, scheduleMessage domain.ScheduleMessage) error
Click to show internal directories.
Click to hide internal directories.