cache

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(l log.Logger, db *sqlx.DB) (*repository, error)

NewRepository initializes a new cache repository

Types

type Entry

type Entry struct {
	Key                 string `db:"key"`
	NotificationService string `db:"notification_service"`
	Date                string `db:"date"`
}

Entry is a struct for a cache entry

type Repository

type Repository interface {
	Get(key string, notificationService string) (*Entry, bool, error)
	Set(entry Entry) error
	EntryExists(date time.Time, notificationService string) (bool, error)
}

Repository is an interface for the cache

Jump to

Keyboard shortcuts

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