func (op deviceServiceLoadAll) Execute() (services []contract.DeviceService, err error) {
	services, err = op.database.GetAllDeviceServices()
	if err != nil {
		op.logger.Error(err.Error())
		return
	}
	if len(services) > op.config.MaxResultCount {
		err = errors.NewErrLimitExceeded(op.config.MaxResultCount)
		return []contract.DeviceService{}, err
	}
	return
}
// Execute performs an operation that retrieves all DeviceService registered.
Execute performs an operation that retrieves all DeviceService registered.
// Execute performs an operation that retrieves all DeviceService registered .
func (op deviceServiceLoadAll) Execute() (services []contract.DeviceService, err error) {
	services, err = op.database.GetAllDeviceServices()
	if err != nil {
		op.logger.Error(err.Error())
		return
	}
	if len(services) > op.config.MaxResultCount {
		err = errors.NewErrLimitExceeded(op.config.MaxResultCount)
		return []contract.DeviceService{}, err
	}
	return
}
func ( op deviceServiceLoadAll ) Execute ( ) ( services [ ] contract . DeviceService , err error ) { services , err = op . database . GetAllDeviceServices ( ) if err != nil { op . logger . Error ( err . Error ( ) ) return } if len ( services ) > op . config . MaxResultCount { err = errors . NewErrLimitExceeded ( op . config . MaxResultCount ) return [ ] contract . DeviceService { } , err } return }
Execute performs an operation that retrieves all DeviceService registered.
Execute performs an operation that retrieves all DeviceService registered .