Skip to content

Commit

Permalink
converted filter from string to interface{}
Browse files Browse the repository at this point in the history
Signed-off-by: jay-dee7 <[email protected]>
  • Loading branch information
jay-dee7 committed Jan 17, 2021
1 parent 1f3d90b commit 7fbf82b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/jay-dee7/storage
go 1.15

require (
github.com/mailhog/data v1.0.1 // indirect
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
github.com/mailhog/data v1.0.1
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
)
2 changes: 1 addition & 1 deletion mongodb_multi_tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m *MultiTenantMongoDB) Store(msg *data.Message, tenant string) (string, er
log.Printf("Error inserting message: %s", err)
return "", err
}

return string(msg.ID), nil
}

Expand Down
2 changes: 1 addition & 1 deletion storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Storage interface {
type MultiTenantStorage interface {
Store(m *data.Message, tenant string) (string, error)
List(start, limit int, tenant string) (*data.Messages, error)
Search(kind, query string, start, limit int, tenant string) (*data.Messages, int, error)
Search(filter interface{}, start, limit int, tenant string) (*data.Messages, int, error)
Count(tenant string) int
DeleteOne(id, tenant string) error
DeleteAll(tenant string) error
Expand Down

0 comments on commit 7fbf82b

Please sign in to comment.