temps

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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