v1

package
v0.0.0-...-d41ed40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(fileUC fileUC, placeUC placeUC, eventUC eventUC) *controller

Types

type Error

type Error struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type GetDistanceResponse

type GetDistanceResponse struct {
	Km float64 `json:"km"`
	Mi float64 `json:"mi"`
}

type GetFileResponse

type GetFileResponse struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
	Size int64  `json:"size"`
}

type GetPlaceResponse

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

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

type PostEventResponse struct {
	ID string `json:"id"`
}

type PostFileResponse

type PostFileResponse struct {
	IDs []string `json:"ids"`
}

type PostPlaceRequest

type PostPlaceRequest struct {
	Name string  `json:"name" binding:"required"`
	Lat  float64 `json:"lat" binding:"required"`
	Lng  float64 `json:"lng" binding:"required"`
}

type PostPlaceResponse

type PostPlaceResponse struct {
	ID int64 `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL