add readme, now the driver is ok!

This commit is contained in:
alexisvisco 2019-03-25 20:34:14 +01:00
parent 7dd0faf24b
commit 95120c77b1
6 changed files with 145 additions and 29 deletions

View file

@ -18,7 +18,23 @@ const (
)
type SearchChannel struct {
*Connection
*Driver
}
func NewSearch(host string, port int, password string) (Searchable, error) {
driver := &Driver{
Host: host,
Port: port,
Password: password,
Channel: Search,
}
err := driver.connect()
if err != nil {
return nil, err
}
return SearchChannel{
Driver: driver,
}, nil
}
func (s SearchChannel) Query(collection, bucket, term string, limit, offset int) (results []string, err error) {