https://github.com/raralabs/tsv-search-interface
https://github.com/raralabs/tsv-search-interface
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raralabs/tsv-search-interface
- Owner: raralabs
- Created: 2022-12-19T07:06:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T09:33:05.000Z (over 1 year ago)
- Last Synced: 2025-04-15T01:12:38.518Z (about 2 months ago)
- Language: Go
- Size: 90.8 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO CLIENT SEARCH TOOL
## Initialize the client
``` go
client := client.NewClient()
defer client.CloseConnection()
```## Exposed Interface Methods
``` go
Search(slug, search string) ([]models.ResponseSearchIndex, error)
SearchByField(slug string, fieldSearch map[string]interface{}) ([]models.ResponseSearchIndex, error)
Index(slug string, uid string, table_info string, action map[string]interface{}, search_value map[string]interface{}) (string, error)
Delete(slug, uid, table_info string) (string, error)
CloseConnection()
```### Example Index
``` go
id, err := client.Index("slug", "uid", "table_name", map[string]interface{}{"id": 1}, map[string]interface{}{"first_name": "Ram", "last_name": "Sharma"})
```### Example Global Search
``` go
data, err := client.Search("slug_name", "search_text")
```### Example Delete Record
``` go
data, err := client.Delete("slug_name", "uid", "table_name")
```