Documentation ¶
Index ¶
- type CountRepository
- type CounterRepository
- func (r CounterRepository) Create(counter *models.Counter) error
- func (r CounterRepository) DecreaseByName(name string) (models.Counter, error)
- func (r CounterRepository) GetByName(name string) (models.Counter, error)
- func (r CounterRepository) GetOrCreateByName(name string) (models.Counter, error)
- func (r CounterRepository) IncreaseByName(name string) (models.Counter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountRepository ¶
CountRepository is a repository for models.Count.
func (CountRepository) GroupByCounterNameAndTimeInterval ¶ added in v0.5.0
func (r CountRepository) GroupByCounterNameAndTimeInterval( name string, interval string, order string, ) ([]models.CountGroupResult, error)
GroupByCounterNameAndTimeInterval groups the counts by models.Counter name and time interval.
type CounterRepository ¶
CounterRepository is a repository for models.Counter.
func (CounterRepository) Create ¶
func (r CounterRepository) Create(counter *models.Counter) error
Create create counter.
func (CounterRepository) DecreaseByName ¶
func (r CounterRepository) DecreaseByName(name string) (models.Counter, error)
DecreaseByName decrease models.Counter by name.
func (CounterRepository) GetByName ¶
func (r CounterRepository) GetByName(name string) (models.Counter, error)
GetByName get counter by name.
func (CounterRepository) GetOrCreateByName ¶
func (r CounterRepository) GetOrCreateByName(name string) (models.Counter, error)
GetOrCreateByName get counter or create by name.
func (CounterRepository) IncreaseByName ¶
func (r CounterRepository) IncreaseByName(name string) (models.Counter, error)
IncreaseByName increase models.Counter by name.
Click to show internal directories.
Click to hide internal directories.