Documentation ¶
Index ¶
- Constants
- Variables
- func ContributeData(r *http.Request, db DBConnection) string
- func EmailSelectedItems(r *http.Request, db DBConnection) string
- func GetAccountStatus(r *http.Request, db DBConnection) string
- func LookupBarcode(r *http.Request, db DBConnection) string
- func NewAPIServer(host, transport string, port, timeout int, ...)
- func RegisterAccount(r *http.Request, db DBConnection, serverLink string) string
- func Respond(mediaType string, charset string, ...) http.HandlerFunc
- func SendEmailedItems(context EmailedItems) error
- func SendVerificationEmail(serverLink, email, code string) error
- func VerifyAccount(r *http.Request, db DBConnection) string
- func WithServerDatabase(dbCoords DBConnection, fn func(map[string]*sql.Stmt))
- type DBConnection
- type EmailedItems
- type RegistrationLink
- type Server
- type SimpleMessage
Constants ¶
View Source
const ( SHOPPING_LIST_SUBJECT = "My Items" SHOPPING_LIST_MESSAGE = `` /* 141-byte string literal not displayed */ )
View Source
const ( SERVER_SENDER = "openproductdata@saruzai.com" // used by other email notifications VERIFY_SUBJECT = "Please verify your email address" VERIFY_MESSAGE = `` /* 290-byte string literal not displayed */ )
Variables ¶
View Source
var ( Srv *Server DefaultServerReadTimeout = 30 // in seconds DefaultServerTransport = "tcp" )
View Source
var TEMPLATE_FUNCTIONS = template.FuncMap{ "plus1": func(x int) int { return x + 1 }, }
Functions ¶
func ContributeData ¶
func ContributeData(r *http.Request, db DBConnection) string
func EmailSelectedItems ¶
func EmailSelectedItems(r *http.Request, db DBConnection) string
func GetAccountStatus ¶
func GetAccountStatus(r *http.Request, db DBConnection) string
func LookupBarcode ¶
func LookupBarcode(r *http.Request, db DBConnection) string
Lookup the barcode, using both the barcodes database, and the Amazon API
func NewAPIServer ¶
func NewAPIServer(host, transport string, port, timeout int, handlers map[string]func(http.ResponseWriter, *http.Request))
NewAPIServer uses the map of handlers to respond to incoming FastCGI requests on the specific host, port, and transport
func RegisterAccount ¶
func RegisterAccount(r *http.Request, db DBConnection, serverLink string) string
func Respond ¶
func Respond(mediaType string, charset string, fn func(w http.ResponseWriter, r *http.Request) string) http.HandlerFunc
func SendEmailedItems ¶
func SendEmailedItems(context EmailedItems) error
func SendVerificationEmail ¶
func VerifyAccount ¶
func VerifyAccount(r *http.Request, db DBConnection) string
func WithServerDatabase ¶
func WithServerDatabase(dbCoords DBConnection, fn func(map[string]*sql.Stmt))
Types ¶
type EmailedItems ¶
type RegistrationLink ¶
type SimpleMessage ¶
Click to show internal directories.
Click to hide internal directories.