db

package
v0.0.0-...-c68f626 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddress

func AddAddress(ctx context.Context, tg, address string) error

func AddInstagram

func AddInstagram(ctx context.Context, tg, instagram string) error

func AddPersonName

func AddPersonName(ctx context.Context, tg, name string) error

func AddWishes

func AddWishes(ctx context.Context, tg, wishes string) error

func FindByTg

func FindByTg(ctx context.Context, tg string) (*model.Address, error)

func Random

func Random() *model.Address
func Search(req string) ([]string, error)

Types

type Repo

type Repo struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func InitDataUpdater

func InitDataUpdater(
	ctx context.Context,
	postgresURL string,
	spID string,
) (*Repo, error)

func (*Repo) RunDataUpdater

func (r *Repo) RunDataUpdater(
	ctx context.Context,
	dataReloadTimeout time.Duration,
)

Jump to

Keyboard shortcuts

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