Documentation ¶
Index ¶
- func HaveSeen(community string, hash string, db Database) (bool, error)
- func ImageToHash(img image.Image) (string, error)
- func RecordHash(community string, hash string, db Database) error
- func RenderLanding(communities []Community, w io.Writer) error
- func RenderSeen(w io.Writer) error
- func RenderUnseen(w io.Writer) error
- func RenderUpload(community string, w io.Writer) error
- func ServeLanding(w http.ResponseWriter, r *http.Request)
- func ServeResult(db Database, w http.ResponseWriter, r *http.Request)
- func ServeUpload(w http.ResponseWriter, r *http.Request)
- type BoltBucket
- type BoltDatabase
- type BoundHandler
- type Bucket
- type Community
- type Database
- type Handler
- type MockBucket
- type MockDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderSeen ¶
func RenderUnseen ¶
func ServeLanding ¶
func ServeLanding(w http.ResponseWriter, r *http.Request)
func ServeResult ¶
func ServeResult(db Database, w http.ResponseWriter, r *http.Request)
func ServeUpload ¶
func ServeUpload(w http.ResponseWriter, r *http.Request)
Types ¶
type BoltBucket ¶
type BoltBucket struct {
// contains filtered or unexported fields
}
type BoltDatabase ¶
type BoltDatabase struct {
// contains filtered or unexported fields
}
func NewBoltDatabase ¶
func NewBoltDatabase(filename string) (*BoltDatabase, error)
func (*BoltDatabase) Close ¶
func (d *BoltDatabase) Close() error
type BoundHandler ¶
type BoundHandler func(w http.ResponseWriter, r *http.Request)
func BindHandler ¶
func BindHandler(h Handler, db Database) BoundHandler
type MockBucket ¶
type MockDatabase ¶
type MockDatabase struct {
Buckets map[string]MockBucket
}
Click to show internal directories.
Click to hide internal directories.