first commit
This commit is contained in:
15 files changed
+725
No files matched your search
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
// Cow holds the structure for the cow collection in mongo
|
||||
type Cow struct {
|
||||
ID string `json:"_id" bson:"_id"`
|
||||
Details CowDetails `json:"cow" bson:"cow"`
|
||||
}
|
||||
|
||||
// CowDetails holds teh structure for the inner cow structure as
|
||||
// defined in the cow collection in mongo
|
||||
type CowDetails struct {
|
||||
CowCode string `json:"CowCode" bson:"CowCode"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
// ErrorMessageResponse returns the error message response struct
|
||||
type ErrorMessageResponse struct {
|
||||
Response MessageError
|
||||
}
|
||||
|
||||
// MessageError contains the inner details for the error message response
|
||||
type MessageError struct {
|
||||
Message string
|
||||
Error string
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
// 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"`
|
||||
}
|
||||
Reference in new issue
Block a user