database

package
v0.0.0-...-ed4837c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(db *sql.DB) (*Storage, error)

func (*Storage) Close

func (strg *Storage) Close() error

Close закрывает базу данных

func (*Storage) Delete

func (strg *Storage) Delete(_ context.Context, user *uuid.UUID, ids []string)

func (*Storage) GetUserStorage

func (strg *Storage) GetUserStorage(ctx context.Context, user *uuid.UUID, _ string) (map[string]string, error)

func (*Storage) Ping

func (strg *Storage) Ping(ctx context.Context) error

func (*Storage) Restore

func (strg *Storage) Restore(ctx context.Context, shortURL string) (link string, err error)

func (*Storage) Statistics

func (strg *Storage) Statistics(ctx context.Context) (*models.Statistic, error)

func (*Storage) Store

func (strg *Storage) Store(ctx context.Context, user *uuid.UUID, longURL string) (id string, err error)

func (*Storage) StoreBatch

func (strg *Storage) StoreBatch(ctx context.Context, user *uuid.UUID, batchIn models.BatchList, defURL string) (models.BatchList, error)

Jump to

Keyboard shortcuts

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