db

package
v0.0.0-...-7f91886 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StmtSelectTeaRatings       = "select_tea_ratings"
	StmtSelectAllTeaRatings    = "select_all_tea_ratings"
	StmtSelectReviews          = "select_reviews"
	StmtSelectReviewsPaginated = "select_reviews_paginated"
	StmtSelectTeas             = "select_teas"
	StmtSelectFAQEntries       = "select_faq_entries"

	StmtInsertReview = "insert_review"
)

Variables

This section is empty.

Functions

func SetupConnectionPool

func SetupConnectionPool(ctx context.Context, connString string) (*pgxpool.Pool, error)

Types

type FAQEntry

type FAQEntry struct {
	Question template.HTML
	Answer   template.HTML
}

type Review

type Review struct {
	Reviewer       string
	Rating         int
	TeaName        string
	TeaCaffeinated bool
	Comment        string
}

type Tea

type Tea struct {
	ID          int
	Name        string
	Caffeinated bool
}

type TeaRating

type TeaRating struct {
	Name        string
	Caffeinated bool
	Rating      float64
	ReviewCount int
}

Jump to

Keyboard shortcuts

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