update responses and add query search endpoint
This commit is contained in:
4 files changed
+59
-19
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package models
|
||||
|
||||
// This is io.go (input/output) for json queries and responses
|
||||
|
||||
// HealthCheckResponse returns the health check response duh
|
||||
type HealthCheckResponse struct {
|
||||
Alive bool `json:"alive"`
|
||||
}
|
||||
|
||||
// UserResponse is a general response structure with a status, message and optional json data
|
||||
type UserResponse struct {
|
||||
Status int `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
// ErrorMessageResponse returns the error message response struct
|
||||
type ErrorMessageResponse struct {
|
||||
Response MessageError `json:"response"`
|
||||
}
|
||||
|
||||
// MessageError contains the inner details for the error message response
|
||||
type MessageError struct {
|
||||
Message string `json:"message"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
// Query for search queries by name
|
||||
type Query struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
Reference in new issue
Block a user