number

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL