db

package
v0.0.0-...-2e5c2e0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

type InMemory map[string]string

func NewInMemory

func NewInMemory() InMemory

func (InMemory) Get

func (d InMemory) Get(ctx context.Context, key string) (string, error)

func (InMemory) Set

func (d InMemory) Set(ctx context.Context, key, value string) error

type Postgres

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

func NewPostgres

func NewPostgres(conn *sql.DB) Postgres

func (Postgres) Get

func (p Postgres) Get(ctx context.Context, key string) (string, error)

func (Postgres) Set

func (p Postgres) Set(ctx context.Context, key, value string) error

Jump to

Keyboard shortcuts

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