pages

package
v0.0.0-...-670d40f Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CategoryStyles = map[string]Style{
	"Vent": {
		Color:    "blue",
		IconSize: 0,
		Icon:     "air",
	},
	"Vent violent": {
		Color:    "blue",
		IconSize: 0,
		Icon:     "air",
	},
	"Pluie": {
		Color:    "blue",
		IconSize: 0,
		Icon:     "rainy",
	},
	"Neige": {
		Color:    "blue",
		IconSize: 0,
		Icon:     "ac_unit",
	},
	"Tempête hivernale": {
		Color:    "red",
		IconSize: 2,
		Icon:     "severe_cold",
	},
	"Onde de tempête": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "weather_mix",
	},
	"Inondation": {
		Color:    "red",
		IconSize: 2,
		Icon:     "flood",
	},
	"Panne d'électricité": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "electric_bolt",
	},
	"Mouvement de terrain": {
		Color:    "red",
		IconSize: 2,
		Icon:     "landslide",
	},
	"Autre": {
		Color:    "red",
		IconSize: 1,
		Icon:     "warning",
	},
	"Orage violent": {
		Color:    "red",
		IconSize: 2,
		Icon:     "thunderstorm",
	},
	"Fermeture de route": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "traffic",
	},
	"Matières dangereuses": {
		Color:    "red",
		IconSize: 2,
		Icon:     "skull",
	},
	"Panne de télécommunication": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "wifi",
	},
	"Feu de forêt": {
		Color:    "red",
		IconSize: 2,
		Icon:     "local_fire_department",
	},
	"Érosion": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "landslide",
	},
	"Tremblement de terre": {
		Color:    "red",
		IconSize: 2,
		Icon:     "earthquake",
	},
	"Alimentation publique en eau potable": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "water",
	},
	"Incendie industriel": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "local_fire_department",
	},
	"Pluie verglaçante": {
		Color:    "blue",
		IconSize: 0,
		Icon:     "weather_mix",
	},
	"Fermeture de pont": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "traffic",
	},
	"Accident de voiture": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "traffic",
	},
	"Écrasement d'avion": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "flight_land",
	},
	"Risque d'explosion": {
		Color:    "red",
		IconSize: 2,
		Icon:     "destruction",
	},
	"Débordement de barrage": {
		Color:    "red",
		IconSize: 2,
		Icon:     "flood",
	},
	"Feu urbain": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "local_fire_department",
	},
	"Accident maritime": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "traffic",
	},
	"Effondrement de structure": {
		Color:    "red",
		IconSize: 2,
		Icon:     "traffic",
	},
	"Tornade": {
		Color:    "red",
		IconSize: 2,
		Icon:     "tornado",
	},
	"Crise civile": {
		Color:    "red",
		IconSize: 2,
		Icon:     "emergency_home",
	},
	"Risque de gaz toxiques": {
		Color:    "red",
		IconSize: 2,
		Icon:     "emergency_home",
	},
	"Accident ferroviaire": {
		Color:    "yellow",
		IconSize: 0,
		Icon:     "traffic",
	},
	"Ouragan": {
		Color:    "red",
		IconSize: 2,
		Icon:     "cyclone",
	},
	"Qualité de l'air": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "airwave",
	},
	"Santé": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "medical_services",
	},
	"Vague de chaleur": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "sunny",
	},
	"Vague de froid": {
		Color:    "yellow",
		IconSize: 1,
		Icon:     "ac_unit",
	},
	"Avalanche": {
		Color:    "red",
		IconSize: 2,
		Icon:     "landslide",
	},
	"Maladie infectieuse": {
		Color:    "red",
		IconSize: 2,
		Icon:     "coronavirus",
	},
}

Styling with google material icons using list at all_material_icons.txt

View Source
var HelpCategoryStyles = map[string]Style{
	"Hébergement": {
		Color:    "green",
		IconSize: 2,
		Icon:     "home",
	},
	"Nourriture": {
		Color:    "green",
		IconSize: 2,
		Icon:     "food_bank",
	},
	"Transport": {
		Color:    "green",
		IconSize: 2,
		Icon:     "directions",
	},
	"Coup de main": {
		Color:    "green",
		IconSize: 2,
		Icon:     "diversity_3",
	},
	"Renforcement": {
		Color:    "green",
		IconSize: 2,
		Icon:     "healing",
	},
}

Functions

func CreateAccount

func CreateAccount(c *gin.Context, db *clover.DB)

func CreateEvent

func CreateEvent(c *gin.Context, db *clover.DB)

func CreateHelp

func CreateHelp(c *gin.Context, db *clover.DB)

func DeleteEvent

func DeleteEvent(c *gin.Context, db *clover.DB)

func DeleteHelp

func DeleteHelp(c *gin.Context, db *clover.DB)

func EventDetails

func EventDetails(c *gin.Context, db *clover.DB)

func EventSubscribe

func EventSubscribe(c *gin.Context, db *clover.DB)

func EventTablePage

func EventTablePage(c *gin.Context, db *clover.DB)

func EventsPage

func EventsPage(c *gin.Context, db *clover.DB)

func ExportHelps

func ExportHelps(c *gin.Context, db *clover.DB)

func GetCreateAccount

func GetCreateAccount(c *gin.Context)

func GetEventCategoryKeys

func GetEventCategoryKeys(c *gin.Context) []string

func GetEventDataFromContext

func GetEventDataFromContext(c *gin.Context, db *clover.DB) event.Event

func GetEventDetailAboutToBeModified

func GetEventDetailAboutToBeModified(c *gin.Context, db *clover.DB)

func GetEventDetailsAboutToBeDelete

func GetEventDetailsAboutToBeDelete(c *gin.Context, db *clover.DB)

func GetHelpCategoryKeys

func GetHelpCategoryKeys(c *gin.Context) []string

func GetHelpDetailAboutToBeModified

func GetHelpDetailAboutToBeModified(c *gin.Context, db *clover.DB)

func GetHelpDetailsAboutToBeDelete

func GetHelpDetailsAboutToBeDelete(c *gin.Context, db *clover.DB)

func GetHelpFromContext

func GetHelpFromContext(c *gin.Context, db *clover.DB) help.Help

func GetLogin

func GetLogin(c *gin.Context)

func GetManagedPost

func GetManagedPost(c *gin.Context, db *clover.DB)

func GetPannesOverlay

func GetPannesOverlay(c *gin.Context, db *clover.DB)

func GridPage

func GridPage(c *gin.Context, db *clover.DB)

func GridSearch

func GridSearch(c *gin.Context, db *clover.DB)

func HelpDetails

func HelpDetails(c *gin.Context, db *clover.DB)

func HelpPage

func HelpPage(c *gin.Context, db *clover.DB)

func HelpTablePage

func HelpTablePage(c *gin.Context, db *clover.DB)

func Login

func Login(c *gin.Context, db *clover.DB)

func Logout

func Logout(c *gin.Context)

func MapJson

func MapJson(c *gin.Context, db *clover.DB)

func MapPage

func MapPage(c *gin.Context, db *clover.DB)

func PostCreateEventComment

func PostCreateEventComment(c *gin.Context, db *clover.DB)

func PostCreateHelpComment

func PostCreateHelpComment(c *gin.Context, db *clover.DB)

func SearchEventTable

func SearchEventTable(c *gin.Context, db *clover.DB)

func SubmitHelpsToDC

func SubmitHelpsToDC(c *gin.Context, db *clover.DB, helpIds []string)

func UpdateAccount

func UpdateAccount(c *gin.Context, db *clover.DB)

func UpdateEvent

func UpdateEvent(c *gin.Context, db *clover.DB)

func UpdateHelp

func UpdateHelp(c *gin.Context, db *clover.DB)

Types

type GeoJSON

type GeoJSON struct {
	Type       string             `json:"type"`
	Geometry   mapobject.Geometry `json:"geometry"`
	Properties GeoJSONProperties  `json:"properties"`
}

type GeoJSONPair

type GeoJSONPair struct {
	GeoJson GeoJSON `json:"geoJson"`
	Style   Style   `json:"style"`
}

type GeoJSONProperties

type GeoJSONProperties struct {
	MapObject        mapobject.MapObject `json:"map_object"`
	DateReadable     string              `json:"date_readable"`
	ModificationDate string              `json:"modification_date"`
	Event            event.Event         `json:"event"`
	Help             help.Help           `json:"help"`
}

type NameValue

type NameValue struct {
	Name  string
	Value string
}

type Style

type Style struct {
	Color    string `json:"color"`
	Icon     string `json:"icon"`
	IconSize int    `json:"iconSize"` //0-3
}

Jump to

Keyboard shortcuts

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