Discover Packages
github.com/Maxson-dev/place-api
internal
controller
v1
package
Version:
v0.0.0-...-d41ed40
Opens a new window with list of versions in this module.
Published: Oct 2, 2023
License: MIT
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func New(fileUC fileUC, placeUC placeUC, eventUC eventUC) *controller
type Error struct {
Status string `json:"status"`
Message string `json:"message"`
}
type GetDistanceResponse struct {
Km float64 `json:"km"`
Mi float64 `json:"mi"`
}
type GetFileResponse struct {
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Size int64 `json:"size"`
}
type GetPlaceResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
Lat float64 `json:"lat"`
Lng float64 `json:"lng"`
CreatedAt time .Time `json:"created_at"`
}
type PostEventRequest struct {
EventType string `json:"event_type" binding:"required"`
Datetime time .Time `json:"datetime" binding:"required"`
Payload string `json:"payload" binding:"required"`
}
type PostEventResponse struct {
ID string `json:"id"`
}
type PostFileResponse struct {
IDs []string `json:"ids"`
}
type PostPlaceRequest struct {
Name string `json:"name" binding:"required"`
Lat float64 `json:"lat" binding:"required"`
Lng float64 `json:"lng" binding:"required"`
}
type PostPlaceResponse struct {
ID int64 `json:"id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.