internal

package
v0.0.0-...-39a0b88 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func NewApp

func NewApp(log *logrus.Logger, store Storage, chatServer Chat) *App

func (*App) Dislike

func (a *App) Dislike(ctx context.Context, uuid, targetUUID string) error

func (*App) GetAllChats

func (a *App) GetAllChats(ctx context.Context, uuid string) ([]*models.Profile, error)

func (*App) GetConfig

func (a *App) GetConfig(ctx context.Context, uuid string) (*models.Config, error)

func (*App) GetDialog

func (a *App) GetDialog(ctx context.Context, client, target string) *chat.Hub

func (*App) GetMatches

func (a *App) GetMatches(ctx context.Context, uuid string, count int64) ([]*models.Profile, error)

func (*App) GetProfiles

func (a *App) GetProfiles(ctx context.Context, uuids []string) ([]*models.Profile, error)

func (*App) GetRegions

func (a *App) GetRegions(ctx context.Context) ([]*models.Region, error)

func (*App) Like

func (a *App) Like(ctx context.Context, uuid, targetUUID string, super bool) error

func (*App) ListDislikedProfiles

func (a *App) ListDislikedProfiles(ctx context.Context, uuid string, limit, offset int64) ([]*models.Profile, error)

func (*App) ListLikedProfiles

func (a *App) ListLikedProfiles(ctx context.Context, uuid string, limit, offset int64) ([]*models.Profile, error)

func (*App) SaveConfig

func (a *App) SaveConfig(ctx context.Context, config *models.Config) error

type Chat

type Chat interface {
	GetDialog(ctx context.Context, client, target string) *chat.Hub
	GetAllChats(ctx context.Context, uuid string) ([]string, error)
}

type Storage

type Storage interface {
	SaveConfig(ctx context.Context, config *models.Config) error
	GetConfig(ctx context.Context, uuid string) (*models.Config, error)
	GetRegions(ctx context.Context) ([]*models.Region, error)
	UpsertRelation(ctx context.Context, relation *models.Relation) error
	ListRelated(ctx context.Context, uuid string, relation storage.Relation, limit, offset int64) ([]*models.Profile, error)
	ListMatches(ctx context.Context, uuid string, count int64) ([]*models.Profile, error)
	GetProfiles(ctx context.Context, uuids []string) ([]*models.Profile, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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