Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(component types.IAppComponent) types.IAppController
Types ¶
type Controller ¶
type Controller struct {
bases.BaseAppController
}
func (*Controller) GetCurrentTime ¶
func (c *Controller) GetCurrentTime() TimeResponse
GetCurrentTime retourne l'heure actuelle du serveur formatée
func (*Controller) Register ¶
func (c *Controller) Register(r *gin.RouterGroup) error
type TimeResponse ¶
type TimeResponse struct {
// Timestamp Unix en secondes
Timestamp int64 `json:"timestamp"`
// Date formatée en français
DateFr string `json:"date_fr"`
// Heure formatée en français
HeureFr string `json:"heure_fr"`
// Date et heure complète en français
DateHeureFr string `json:"date_heure_fr"`
// Année
Annee int `json:"year"`
// Mois (1-12)
Mois int `json:"month"`
// Jour du mois
Jour int `json:"day"`
// Heure (0-23)
Heure int `json:"hours"`
// Minutes (0-59)
Minutes int `json:"minutes"`
// Secondes (0-59)
Secondes int `json:"seconds"`
// Jour de la semaine en français
JourSemaine string `json:"day_of_week"`
// Nom du mois en français
NomMois string `json:"month_name"`
}
TimeResponse représente la réponse de l'API horloge
Click to show internal directories.
Click to hide internal directories.