repo

package
v0.0.0-...-89684ad Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func OpenDBAndMigrate

func OpenDBAndMigrate(filePath, migrationsPath string, mode Mode) (*sqlx.DB, error)

Types

type MediaRepository

type MediaRepository interface {
	Create(ctx context.Context, userID int64, tgMessageID int, uri string, typ internal_plugin.MediaType) (*types.Media, error)
	GetInProgress(ctx context.Context, userID int64) ([]*types.Media, error)
	UpdateTitle(ctx context.Context, id int64, title string) error
	UpdateState(ctx context.Context, id int64, state types.MediaState) error
	DeleteInProgress(ctx context.Context) error
}

type Mode

type Mode string
const (
	ModeMemory Mode = "memory"
	ModeRWC    Mode = "rwc"
)

type UsersRepository

type UsersRepository interface {
	Create(ctx context.Context, tgUserID int64) (*types.User, error)
	Get(ctx context.Context, tgUserID int64) (*types.User, error)
}

Jump to

Keyboard shortcuts

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