I am looking for a golang client for Cassandra with unit testing support. I have found some libraries like
Can someone suggest me any client lib that has what I am looking for ?
This is a very simple example of what I was referring to in the comments:
type CassAPI interface {
GetFoo(rowKey string) (someType, error)
}
type CassWrapper struct {
cass *gocql.Session
}
func (cw *CassWrapper) GetFoo(rowKey string) (someType, error) {
// do things with cw.cass
return someType
}
In the application code, an instance of CassWrapper would be used, and in tests an instance of some mock or stub would be used which adhered to the same interface of CassAPI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With