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.
Click to show internal directories.
Click to hide internal directories.