Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorCode(err error) string
- type AddFavoritePropertyParams
- type BulkInsertPropertyImagesParams
- type BulkUpsertPropertyListingsParams
- type BulkUpsertPropertyListingsRow
- type CreatePropertyImageParams
- type CreateSessionParams
- type CreateUserParams
- type DBTX
- type DeleteFavoritePropertyParams
- type FavoriteProperty
- type GetNewPropertiesParams
- type GetPropertyByExternalIdRow
- type GetPropertyListingRow
- type ListPropertyListingsParams
- type ListPropertyListingsRow
- type LocationCache
- type PropertyImage
- type PropertyListing
- type Querier
- type Queries
- func (q *Queries) AddFavoriteProperty(ctx context.Context, arg AddFavoritePropertyParams) (FavoriteProperty, error)
- func (q *Queries) BulkInsertPropertyImages(ctx context.Context, arg BulkInsertPropertyImagesParams) error
- func (q *Queries) BulkUpsertPropertyListings(ctx context.Context, arg BulkUpsertPropertyListingsParams) ([]BulkUpsertPropertyListingsRow, error)
- func (q *Queries) CreatePropertyImage(ctx context.Context, arg CreatePropertyImageParams) error
- func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteFavoriteProperty(ctx context.Context, arg DeleteFavoritePropertyParams) error
- func (q *Queries) DeletePropertyImages(ctx context.Context, propertyID pgtype.Int8) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) GetNewProperties(ctx context.Context, arg GetNewPropertiesParams) ([]PropertyListing, error)
- func (q *Queries) GetPropertyByExternalId(ctx context.Context, externalID pgtype.Text) (GetPropertyByExternalIdRow, error)
- func (q *Queries) GetPropertyListing(ctx context.Context, id int64) (GetPropertyListingRow, error)
- func (q *Queries) GetPropertyListings(ctx context.Context, dollar_1 []int64) ([]PropertyListing, error)
- func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error)
- func (q *Queries) GetTotalPropertyCount(ctx context.Context) (int64, error)
- func (q *Queries) GetUser(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) ListFavoriteProperties(ctx context.Context, email string) ([]PropertyListing, error)
- func (q *Queries) ListPropertyListings(ctx context.Context, arg ListPropertyListingsParams) ([]ListPropertyListingsRow, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SQLStore
- type Session
- type Store
- type UpdateUserParams
- type User
Constants ¶
View Source
const ( ForeignKeyViolation = "23503" UniqueViolation = "23505" )
Variables ¶
View Source
var ErrRecordNotFound = pgx.ErrNoRows
View Source
var ErrUniqueViolation = &pgconn.PgError{ Code: UniqueViolation, }
Functions ¶
Types ¶
type BulkUpsertPropertyListingsParams ¶
type BulkUpsertPropertyListingsParams struct { ExternalIds []string `json:"external_ids"` Addresses []string `json:"addresses"` Bedrooms []int32 `json:"bedrooms"` Bathrooms []int32 `json:"bathrooms"` PropertyTypes []string `json:"property_types"` Latitudes []float64 `json:"latitudes"` Longitudes []float64 `json:"longitudes"` Prices []int32 `json:"prices"` AddedDates []pgtype.Timestamp `json:"added_dates"` Reduced []bool `json:"reduced"` ReducedDates []pgtype.Timestamp `json:"reduced_dates"` AgentNames []string `json:"agent_names"` AgentBranchNames []string `json:"agent_branch_names"` AgentContactPhones []string `json:"agent_contact_phones"` NumberOfImages []int32 `json:"number_of_images"` NumberOfFloorplans []int32 `json:"number_of_floorplans"` NumberOfVirtualTours []int32 `json:"number_of_virtual_tours"` MainImageUrls []string `json:"main_image_urls"` PropertyUrls []string `json:"property_urls"` SummaryDescriptions []string `json:"summary_descriptions"` Titles []string `json:"titles"` }
type CreateSessionParams ¶
type CreateUserParams ¶
type FavoriteProperty ¶
type GetNewPropertiesParams ¶
type GetPropertyByExternalIdRow ¶
type GetPropertyByExternalIdRow struct { ID int64 `json:"id"` ExternalID pgtype.Text `json:"external_id"` Address pgtype.Text `json:"address"` Bedrooms pgtype.Int4 `json:"bedrooms"` Bathrooms pgtype.Int4 `json:"bathrooms"` PropertyType pgtype.Text `json:"property_type"` Latitude pgtype.Numeric `json:"latitude"` Longitude pgtype.Numeric `json:"longitude"` City pgtype.Text `json:"city"` State pgtype.Text `json:"state"` Country pgtype.Text `json:"country"` Price pgtype.Numeric `json:"price"` Added pgtype.Timestamp `json:"added"` Reduced pgtype.Bool `json:"reduced"` ReducedDate pgtype.Timestamp `json:"reduced_date"` AgentName pgtype.Text `json:"agent_name"` AgentBranchName pgtype.Text `json:"agent_branch_name"` AgentContactPhone pgtype.Text `json:"agent_contact_phone"` NumberOfImages pgtype.Int4 `json:"number_of_images"` NumberOfFloorplans pgtype.Int4 `json:"number_of_floorplans"` NumberOfVirtualTours pgtype.Int4 `json:"number_of_virtual_tours"` MainImageUrl pgtype.Text `json:"main_image_url"` PropertyUrl pgtype.Text `json:"property_url"` SummaryDescription pgtype.Text `json:"summary_description"` Title pgtype.Text `json:"title"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` Images interface{} `json:"images"` }
type GetPropertyListingRow ¶
type GetPropertyListingRow struct { ID int64 `json:"id"` ExternalID pgtype.Text `json:"external_id"` Address pgtype.Text `json:"address"` Bedrooms pgtype.Int4 `json:"bedrooms"` Bathrooms pgtype.Int4 `json:"bathrooms"` PropertyType pgtype.Text `json:"property_type"` Latitude pgtype.Numeric `json:"latitude"` Longitude pgtype.Numeric `json:"longitude"` City pgtype.Text `json:"city"` State pgtype.Text `json:"state"` Country pgtype.Text `json:"country"` Price pgtype.Numeric `json:"price"` Added pgtype.Timestamp `json:"added"` Reduced pgtype.Bool `json:"reduced"` ReducedDate pgtype.Timestamp `json:"reduced_date"` AgentName pgtype.Text `json:"agent_name"` AgentBranchName pgtype.Text `json:"agent_branch_name"` AgentContactPhone pgtype.Text `json:"agent_contact_phone"` NumberOfImages pgtype.Int4 `json:"number_of_images"` NumberOfFloorplans pgtype.Int4 `json:"number_of_floorplans"` NumberOfVirtualTours pgtype.Int4 `json:"number_of_virtual_tours"` MainImageUrl pgtype.Text `json:"main_image_url"` PropertyUrl pgtype.Text `json:"property_url"` SummaryDescription pgtype.Text `json:"summary_description"` Title pgtype.Text `json:"title"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` Images interface{} `json:"images"` }
type ListPropertyListingsRow ¶
type ListPropertyListingsRow struct { ID int64 `json:"id"` ExternalID pgtype.Text `json:"external_id"` Address pgtype.Text `json:"address"` Bedrooms pgtype.Int4 `json:"bedrooms"` Bathrooms pgtype.Int4 `json:"bathrooms"` PropertyType pgtype.Text `json:"property_type"` Latitude pgtype.Numeric `json:"latitude"` Longitude pgtype.Numeric `json:"longitude"` City pgtype.Text `json:"city"` State pgtype.Text `json:"state"` Country pgtype.Text `json:"country"` Price pgtype.Numeric `json:"price"` Added pgtype.Timestamp `json:"added"` Reduced pgtype.Bool `json:"reduced"` ReducedDate pgtype.Timestamp `json:"reduced_date"` AgentName pgtype.Text `json:"agent_name"` AgentBranchName pgtype.Text `json:"agent_branch_name"` AgentContactPhone pgtype.Text `json:"agent_contact_phone"` NumberOfImages pgtype.Int4 `json:"number_of_images"` NumberOfFloorplans pgtype.Int4 `json:"number_of_floorplans"` NumberOfVirtualTours pgtype.Int4 `json:"number_of_virtual_tours"` MainImageUrl pgtype.Text `json:"main_image_url"` PropertyUrl pgtype.Text `json:"property_url"` SummaryDescription pgtype.Text `json:"summary_description"` Title pgtype.Text `json:"title"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` Images interface{} `json:"images"` }
type LocationCache ¶
type PropertyImage ¶
type PropertyListing ¶
type PropertyListing struct { ID int64 `json:"id"` ExternalID pgtype.Text `json:"external_id"` Address pgtype.Text `json:"address"` Bedrooms pgtype.Int4 `json:"bedrooms"` Bathrooms pgtype.Int4 `json:"bathrooms"` PropertyType pgtype.Text `json:"property_type"` Latitude pgtype.Numeric `json:"latitude"` Longitude pgtype.Numeric `json:"longitude"` City pgtype.Text `json:"city"` State pgtype.Text `json:"state"` Country pgtype.Text `json:"country"` Price pgtype.Numeric `json:"price"` Added pgtype.Timestamp `json:"added"` Reduced pgtype.Bool `json:"reduced"` ReducedDate pgtype.Timestamp `json:"reduced_date"` AgentName pgtype.Text `json:"agent_name"` AgentBranchName pgtype.Text `json:"agent_branch_name"` AgentContactPhone pgtype.Text `json:"agent_contact_phone"` NumberOfImages pgtype.Int4 `json:"number_of_images"` NumberOfFloorplans pgtype.Int4 `json:"number_of_floorplans"` NumberOfVirtualTours pgtype.Int4 `json:"number_of_virtual_tours"` MainImageUrl pgtype.Text `json:"main_image_url"` PropertyUrl pgtype.Text `json:"property_url"` SummaryDescription pgtype.Text `json:"summary_description"` Title pgtype.Text `json:"title"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type Querier ¶
type Querier interface { AddFavoriteProperty(ctx context.Context, arg AddFavoritePropertyParams) (FavoriteProperty, error) BulkInsertPropertyImages(ctx context.Context, arg BulkInsertPropertyImagesParams) error BulkUpsertPropertyListings(ctx context.Context, arg BulkUpsertPropertyListingsParams) ([]BulkUpsertPropertyListingsRow, error) CreatePropertyImage(ctx context.Context, arg CreatePropertyImageParams) error CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteFavoriteProperty(ctx context.Context, arg DeleteFavoritePropertyParams) error DeletePropertyImages(ctx context.Context, propertyID pgtype.Int8) error DeleteUser(ctx context.Context, id int64) error GetNewProperties(ctx context.Context, arg GetNewPropertiesParams) ([]PropertyListing, error) GetPropertyByExternalId(ctx context.Context, externalID pgtype.Text) (GetPropertyByExternalIdRow, error) GetPropertyListing(ctx context.Context, id int64) (GetPropertyListingRow, error) GetPropertyListings(ctx context.Context, dollar_1 []int64) ([]PropertyListing, error) GetSession(ctx context.Context, id uuid.UUID) (Session, error) GetTotalPropertyCount(ctx context.Context) (int64, error) GetUser(ctx context.Context, id int64) (User, error) GetUserByEmail(ctx context.Context, email string) (User, error) GetUserByUsername(ctx context.Context, username string) (User, error) ListFavoriteProperties(ctx context.Context, email string) ([]PropertyListing, error) ListPropertyListings(ctx context.Context, arg ListPropertyListingsParams) ([]ListPropertyListingsRow, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddFavoriteProperty ¶
func (q *Queries) AddFavoriteProperty(ctx context.Context, arg AddFavoritePropertyParams) (FavoriteProperty, error)
func (*Queries) BulkInsertPropertyImages ¶
func (q *Queries) BulkInsertPropertyImages(ctx context.Context, arg BulkInsertPropertyImagesParams) error
func (*Queries) BulkUpsertPropertyListings ¶
func (q *Queries) BulkUpsertPropertyListings(ctx context.Context, arg BulkUpsertPropertyListingsParams) ([]BulkUpsertPropertyListingsRow, error)
func (*Queries) CreatePropertyImage ¶
func (q *Queries) CreatePropertyImage(ctx context.Context, arg CreatePropertyImageParams) error
func (*Queries) CreateSession ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteFavoriteProperty ¶
func (q *Queries) DeleteFavoriteProperty(ctx context.Context, arg DeleteFavoritePropertyParams) error
func (*Queries) DeletePropertyImages ¶
func (*Queries) GetNewProperties ¶
func (q *Queries) GetNewProperties(ctx context.Context, arg GetNewPropertiesParams) ([]PropertyListing, error)
func (*Queries) GetPropertyByExternalId ¶
func (*Queries) GetPropertyListing ¶
func (*Queries) GetPropertyListings ¶
func (*Queries) GetSession ¶
func (*Queries) GetTotalPropertyCount ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) ListFavoriteProperties ¶
func (*Queries) ListPropertyListings ¶
func (q *Queries) ListPropertyListings(ctx context.Context, arg ListPropertyListingsParams) ([]ListPropertyListingsRow, error)
func (*Queries) UpdateUser ¶
type UpdateUserParams ¶
type User ¶
type User struct { ID int64 `json:"id"` Username string `json:"username"` Email string `json:"email"` PasswordHash string `json:"password_hash"` FirstName pgtype.Text `json:"first_name"` LastName pgtype.Text `json:"last_name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.