Documentation
¶
Index ¶
- Variables
- type DiscoverFilters
- type DiscoverProfile
- type Location
- type Match
- type PostgresStore
- func (ps *PostgresStore) CreateProfile(ctx context.Context, age int, name string, gender string, email string, ...) (*Profile, error)
- func (ps *PostgresStore) GetDiscoverProfiles(ctx context.Context, id int32, filters DiscoverFilters) ([]*DiscoverProfile, error)
- func (ps *PostgresStore) GetSession(ctx context.Context, token string) (int32, error)
- func (ps *PostgresStore) Login(ctx context.Context, email string, password string) (string, error)
- func (ps *PostgresStore) Swipe(ctx context.Context, userId int32, swipedUserId int32, liked bool) (bool, int, error)
- func (s *PostgresStore) TestConnection(ctx context.Context) error
- type Profile
- type ProfileStore
- type Session
- type SwipeDetails
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DiscoverFilters ¶
type DiscoverProfile ¶
type PostgresStore ¶
Store provides access to the database.
func NewPostgresStore ¶
func NewPostgresStore(connStr string) (*PostgresStore, error)
NewStore sets up a new database store.
func (*PostgresStore) CreateProfile ¶
func (*PostgresStore) GetDiscoverProfiles ¶
func (ps *PostgresStore) GetDiscoverProfiles(ctx context.Context, id int32, filters DiscoverFilters) ([]*DiscoverProfile, error)
func (*PostgresStore) GetSession ¶
func (*PostgresStore) TestConnection ¶
func (s *PostgresStore) TestConnection(ctx context.Context) error
TestConnection tests that the Store can properly connect to the Postgres Server.
type Profile ¶
type Profile struct { Id int32 Age int Name string Gender string Email string Password string Location Location }
Checkout describes a checkout as stored in the db.
type ProfileStore ¶
type ProfileStore interface { CreateProfile(context.Context, int, string, string, string, string, Location) (*Profile, error) GetDiscoverProfiles(context.Context, int32, DiscoverFilters) ([]*DiscoverProfile, error) GetSession(context.Context, string) (int32, error) Login(context.Context, string, string) (string, error) Swipe(context.Context, int32, int32, bool) (bool, int, error) }
ProfileStore describes an interface which any data store must implement to achieve required functionality
type SwipeDetails ¶
Click to show internal directories.
Click to hide internal directories.