db

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

A DB struct holds the connection to sqlite and provides methods for interacting with persistent storage

func New

func New(db *sqlx.DB) DB

New creates an instance of our repository using the provided connection

func (DB) GetKarmaCount

func (db DB) GetKarmaCount(ctx context.Context, userID string) (models.KarmaCount, error)

func (DB) IncrementCount

func (db DB) IncrementCount(ctx context.Context, userID string) error

Jump to

Keyboard shortcuts

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