cache

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(context.Context, string) (int, error)
	Set(context.Context, string, int) error
	Update(context.Context, string, int) error
}

func NewPgCache

func NewPgCache(o PgCacheOpts) (Cache, error)

type PgCache

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

func (*PgCache) Get

func (c *PgCache) Get(ctx context.Context, phoneNumber string) (int, error)

func (*PgCache) Set

func (c *PgCache) Set(ctx context.Context, phoneNumber string, version int) error

func (*PgCache) Update

func (c *PgCache) Update(ctx context.Context, phoneNumber string, version int) error

type PgCacheOpts

type PgCacheOpts struct {
	DSN                  string
	MigrationsFolderPath string
	QueriesFolderPath    string
}

Jump to

Keyboard shortcuts

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