counter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package counter handles the logic of a counter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Inc(ctx context.Context, userID string) (new int64, err error)
	Get(ctx context.Context, userID string) (int64, error)
}

Repository defines the counter methods.

func NewRepository

func NewRepository(db *sql.DB) Repository

NewRepository wraps around a SQL database to execute the counter methods.

Jump to

Keyboard shortcuts

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