Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema = &memdb.DBSchema{ Tables: map[string]*memdb.TableSchema{ "product": &memdb.TableSchema{ Name: "product", Indexes: map[string]*memdb.IndexSchema{ "id": &memdb.IndexSchema{ Name: "id", Unique: true, Indexer: &memdb.StringFieldIndex{Field: "SKU"}, }, }, }, }, }
Schema is the schema for the read model
Functions ¶
func MakeProductMessageCallBack ¶
func MakeProductMessageCallBack(db *memdb.MemDB) nats.MsgHandler
MakeProductMessageCallBack is a factory function that creates the product message callback that is used as the asynchronous subscriber by NATS
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler represents the read http handler
func (*Handler) GetProducts ¶
func (h *Handler) GetProducts(rw http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.