Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NumberService ¶
type NumberService interface { // Create entity // Create(number *models.Number) (id int, err error) // Increment entity value byValue and return last number result Increment(number_id int, byValue int) (lastNumber int, err error) }
Number service that resonsible for increment number concurrently safe Once it was created, it's impossible to edit entity, better solution would be to create another one entity
func New ¶
func New(numRepo repo.NumberRepo) NumberService
Click to show internal directories.
Click to hide internal directories.