summaryrefslogtreecommitdiff
path: root/definitions.go
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2022-10-17 17:21:54 -0600
committernavanchauhan <navanchauhan@gmail.com>2022-10-17 17:21:54 -0600
commit2e2943c27176d8ddbfbc551632e4f9d0e86cb41e (patch)
tree8ae108d2571ce9696735980ee59fda5e934ec644 /definitions.go
parentfd084a6b6a0fd586c5aa8b8895919ab19c5ec32b (diff)
reorganised code
Diffstat (limited to 'definitions.go')
-rw-r--r--definitions.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/definitions.go b/definitions.go
new file mode 100644
index 0000000..2289865
--- /dev/null
+++ b/definitions.go
@@ -0,0 +1,34 @@
+package main
+
+type SearchQuery struct {
+ Query string
+ MaxResults int64
+ Offset int64
+}
+
+type BaseResponse struct {
+ GlobalVars GlobalVars
+}
+
+type SearchResponse struct {
+ GlobalVars GlobalVars
+ Success bool
+ SearchResults []interface{}
+ NumResults int
+ TotalResults int64
+ MoreResults bool
+ OriginalQuery SearchQuery
+ Offset int64
+ LastOffset int64
+ NumPages int
+}
+
+type DocumentResponse struct {
+ GlobalVars GlobalVars
+ SearchResults interface{}
+ SummaryPDF string
+}
+
+type GlobalVars struct {
+ Name string
+}