Documentation ¶
Index ¶
- type CounterRepository
- func (r CounterRepository) CountCounters() (int64, error)
- func (r CounterRepository) CountCounts() (int64, error)
- func (r CounterRepository) CountNamespaces() (int64, error)
- func (r CounterRepository) Create(counter *models.Counter) error
- func (r CounterRepository) DecreaseByName(namespace, name string) (models.Counter, error)
- func (r CounterRepository) GetByName(namespace, name string) (models.Counter, error)
- func (r CounterRepository) GetOrCreateByName(namespace, name string) (models.Counter, error)
- func (r CounterRepository) GroupByCounterNameAndTimeInterval(namespace string, name string, interval string, order string) ([]models.CountGroupResult, error)
- func (r CounterRepository) IncreaseByName(namespace, name string) (models.Counter, error)
- func (r CounterRepository) SetByName(namespace, name string, count uint) (models.Counter, error)
- type NamespaceRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterRepository ¶
CounterRepository is a repository for models.Counter.
func (CounterRepository) CountCounters ¶ added in v0.66.0
func (r CounterRepository) CountCounters() (int64, error)
CountCounters counts counters.
func (CounterRepository) CountCounts ¶ added in v0.66.0
func (r CounterRepository) CountCounts() (int64, error)
CountCounts counts counts.
func (CounterRepository) CountNamespaces ¶ added in v0.66.0
func (r CounterRepository) CountNamespaces() (int64, error)
CountNamespaces counts namespaces.
func (CounterRepository) Create ¶
func (r CounterRepository) Create(counter *models.Counter) error
Create creates counter.
func (CounterRepository) DecreaseByName ¶
func (r CounterRepository) DecreaseByName(namespace, name string) (models.Counter, error)
DecreaseByName decrease models.Counter by name.
func (CounterRepository) GetByName ¶
func (r CounterRepository) GetByName(namespace, name string) (models.Counter, error)
GetByName get counter by name.
func (CounterRepository) GetOrCreateByName ¶
func (r CounterRepository) GetOrCreateByName(namespace, name string) (models.Counter, error)
GetOrCreateByName get counter or create by name.
func (CounterRepository) GroupByCounterNameAndTimeInterval ¶
func (r CounterRepository) GroupByCounterNameAndTimeInterval( namespace string, name string, interval string, order string, ) ([]models.CountGroupResult, error)
GroupByCounterNameAndTimeInterval returns stats of given models.Counter and models.Namespace.
func (CounterRepository) IncreaseByName ¶
func (r CounterRepository) IncreaseByName(namespace, name string) (models.Counter, error)
IncreaseByName increase models.Counter by name.
type NamespaceRepository ¶
NamespaceRepository is a repository for models.Namespace.
func (NamespaceRepository) Create ¶
func (r NamespaceRepository) Create(namespace *models.Namespace) error
Create creates counter.
func (NamespaceRepository) GetByName ¶
func (r NamespaceRepository) GetByName(name string) (models.Namespace, error)
GetByName get counter by name.
func (NamespaceRepository) GetOrCreateByName ¶
func (r NamespaceRepository) GetOrCreateByName(name string) (models.Namespace, error)
GetOrCreateByName get counter or create by name.
Click to show internal directories.
Click to hide internal directories.