Documentation ¶
Index ¶
- func DBCriteria2Model(dbCriteria *SearchCriteria, criteria *models.SearchCriteria)
- func DBProfile2Profile(profile *Profile) *models.Profile
- type Profile
- type Relation
- type SearchCriteria
- type Storage
- func (s *Storage) Exec(ctx context.Context, query string) error
- func (s *Storage) GetConfig(ctx context.Context, uuid string) (*models.Config, error)
- func (s *Storage) GetProfiles(ctx context.Context, uuids []string) ([]*models.Profile, error)
- func (s *Storage) GetRegions(ctx context.Context) ([]*models.Region, error)
- func (s *Storage) ListMatches(ctx context.Context, uuid string, count int64) ([]*models.Profile, error)
- func (s *Storage) ListRelated(ctx context.Context, uuid string, relation Relation, limit, offset int64) ([]*models.Profile, error)
- func (s *Storage) Migrate() error
- func (s *Storage) SaveConfig(ctx context.Context, config *models.Config) error
- func (s *Storage) Truncate(ctx context.Context, tables ...string) error
- func (s *Storage) UpsertRelation(ctx context.Context, relation *models.Relation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBCriteria2Model ¶
func DBCriteria2Model(dbCriteria *SearchCriteria, criteria *models.SearchCriteria)
func DBProfile2Profile ¶
Types ¶
type Profile ¶
type Profile struct { UUID string `db:"uuid"` Regions []int64 `db:"regions"` PriceFrom *float64 `db:"price_from"` PriceTo *float64 `db:"price_to"` CriteriaGender int8 `db:"criteria_gender"` AgeFrom *float64 `db:"age_from"` AgeTo *float64 `db:"age_to"` Username string `db:"username"` AvatarLink string `db:"avatar_link"` PersonalGender int8 `db:"personal_gender"` Age int8 `db:"age"` }
type SearchCriteria ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) GetProfiles ¶
func (*Storage) GetRegions ¶
func (*Storage) ListMatches ¶
func (*Storage) ListRelated ¶
func (*Storage) SaveConfig ¶
Click to show internal directories.
Click to hide internal directories.