Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoCollection ¶
type MongoCollection interface {
Insert(...interface{}) error
Create(info *mgo.CollectionInfo) error
EnsureIndex(index mgo.Index) error
Find(query interface{}) MongoQuery
}
MongoCollection is the subset of mgo that we use, allowing stubbing
type MongoDatabase ¶
type MongoDatabase interface {
Connect(url string, timeout time.Duration) error
GetCollection(database string, collection string) MongoCollection
}
MongoDatabase is a subset of mgo that we use, allowing stubbing.
type MongoQuery ¶
type MongoQuery interface {
Limit(n int) *mgo.Query
Skip(n int) *mgo.Query
Sort(fields ...string) *mgo.Query
All(result interface{}) error
One(result interface{}) error
}
MongoQuery is the subset of mgo that we use, allowing stubbing
type Store ¶
type Store interface {
Init(ws.WebSocketChannels, ...api.ReceiptStorePersistence) error
ValidateConf() error
ProcessReceipt(msgBytes []byte)
GetReceipts(res http.ResponseWriter, req *http.Request, params httprouter.Params)
GetReceipt(res http.ResponseWriter, req *http.Request, params httprouter.Params)
Close()
}
func NewReceiptStore ¶
func NewReceiptStore(config *conf.RESTGatewayConf) Store
Click to show internal directories.
Click to hide internal directories.