database

package
v0.0.0-...-059eb94 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 8 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
}

func NewDatabaseStore

func NewDatabaseStore(connString string) (*DB, error)

func (*DB) BatchWrite

func (d *DB) BatchWrite(ctx context.Context, uid string, originals []models.BatchOriginal) ([]string, error)

func (*DB) Delete

func (d *DB) Delete(ctx context.Context, uid string, link string) error

func (*DB) Get

func (d *DB) Get(ctx context.Context, short string) (string, error)

func (*DB) GetByUserID

func (d *DB) GetByUserID(ctx context.Context, id string) ([]models.LinkJSON, error)

func (*DB) Ping

func (d *DB) Ping(ctx context.Context) bool

func (*DB) Write

func (d *DB) Write(ctx context.Context, uuid, long string) (string, error)

Jump to

Keyboard shortcuts

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