Skip to content

Commit 29e8264

Browse files
committed
Rename CassandraWriter to Writer
1 parent 2ecc5b9 commit 29e8264

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ import (
88
"github.com/gocql/gocql"
99
)
1010

11-
type CassandraWriter struct {
11+
type Writer struct {
1212
db *gocql.ClusterConfig
1313
tableName string
1414
Map func(ctx context.Context, model interface{}) (interface{}, error)
1515
schema *c.Schema
1616
VersionIndex int
1717
}
1818

19-
func NewCassandraWriter(session *gocql.ClusterConfig, tableName string, modelType reflect.Type, options ...func(context.Context, interface{}) (interface{}, error)) *CassandraWriter {
19+
func NewWriter(session *gocql.ClusterConfig, tableName string, modelType reflect.Type, options ...func(context.Context, interface{}) (interface{}, error)) *Writer {
2020
var mp func(context.Context, interface{}) (interface{}, error)
2121
if len(options) >= 1 {
2222
mp = options[0]
2323
}
2424
schema := c.CreateSchema(modelType)
25-
return &CassandraWriter{db: session, tableName: tableName, Map: mp, schema: schema}
25+
return &Writer{db: session, tableName: tableName, Map: mp, schema: schema}
2626
}
27-
func (w *CassandraWriter) Write(ctx context.Context, model interface{}) error {
27+
func (w *Writer) Write(ctx context.Context, model interface{}) error {
2828
if w.Map != nil {
2929
m2, er0 := w.Map(ctx, model)
3030
if er0 != nil {

0 commit comments

Comments
 (0)