Documentation ¶
Index ¶
- Variables
- func BindFormOrJSON(c *gin.Context, bindTo interface{}) (err error)
- func BindFormOrJSONOptional(c *gin.Context, bindTo interface{}) (err error)
- func CallDatabaseJSONFunction(fCall string, encPat string, data ...interface{}) (rv string, err error)
- func ConnectToDb()
- func DisConnectToDb()
- func EmptyDflt(s, d string) string
- func GenUUID() string
- func GetMapKeys[K comparable, V any](m map[K]V) []K
- func HandlerReportIAmAlive(c *gin.Context)
- func HandlerReportStatus(c *gin.Context)
- func ListNotAlive()
- func LogJsonReturned(x interface{}) interface{}
- func MonitorRemoteSetups(router *gin.Engine)
- func MonitorSetup(xctx context.Context, xconn *pgxpool.Pool, gcfg *data.GlobalConfigData, ...)
- func MonitorSetupRemote(xserver_url string, gcfg *data.GlobalConfigData, log *os.File, ...)
- func ReadJson(fn string, x interface{}) (err error)
- func RemoveMonitorItem(name string)
- func ReportIAmAlive(name, status string) (err error)
- func RmExt(filename string) string
- func SVar(v interface{}) string
- func SVarI(v interface{}) string
- func SetJsonHdr(c *gin.Context)
- func SortSlice[T constraints.Ordered](s []T)
- func SortedMapKeys[K constraints.Ordered, V any](m map[K]V) []K
- func StatusSuccess(s string, c *gin.Context) string
- type ApiIAmAliveData
- type ReportStatusData
- type ReportStatusSuccess
- type ReportSuccess
- type SQLIntType
- type SQLStringType
Constants ¶
This section is empty.
Variables ¶
var XDbOn = make(map[string]bool)
var XDbOnLock = sync.RWMutex{}
Functions ¶
func BindFormOrJSON ¶
-------------------------------------------------------------------------------------------------------------------------
func BindFormOrJSONOptional ¶
func ConnectToDb ¶
func ConnectToDb()
func GetMapKeys ¶
func GetMapKeys[K comparable, V any](m map[K]V) []K
GetMapKeys Get all the keys from any typed map. (generic)
func HandlerReportIAmAlive ¶
func HandlerReportStatus ¶
func ListNotAlive ¶
func ListNotAlive()
------------------------------------------------------------------------------------------------------------------------- create or replace function q_qr_not_alive ()
func LogJsonReturned ¶
func LogJsonReturned(x interface{}) interface{}
-------------------------------------------------------------------------------------------------------------------------
func MonitorRemoteSetups ¶
------------------------------------------------------------------------------------------------------------------------- xyzzy - TODO - add in API for GIN to call ReportIAmAlive...
func MonitorSetup ¶
func MonitorSetup(xctx context.Context, xconn *pgxpool.Pool, gcfg *data.GlobalConfigData, log *os.File, xem email.EmailSender)
-------------------------------------------------------------------------------------------------------------------------
func MonitorSetupRemote ¶
func MonitorSetupRemote(xserver_url string, gcfg *data.GlobalConfigData, log *os.File, xem email.EmailSender)
-------------------------------------------------------------------------------------------------------------------------
func RemoveMonitorItem ¶
func RemoveMonitorItem(name string)
------------------------------------------------------------------------------------------------------------------------- create or replace function q_qr_live_monitor_remove ( p_name text )
func ReportIAmAlive ¶
------------------------------------------------------------------------------------------------------------------------- create or replace function q_qr_i_am_alive ( p_name varchar, p_status varchar )
func RmExt ¶
RmExt removes the extenstion from a file name if it exits. if filename is "bc.js", then "bc" will be retuend.
func SVarI ¶
func SVarI(v interface{}) string
SVarI return the JSON encoded version of the data with tab indentation.
func SetJsonHdr ¶
SetJsonHdr will set a content-type header to "application/json; charset=utf-8"
func SortSlice ¶
func SortSlice[T constraints.Ordered](s []T)
SortSlice will Sort a slice of any type. (generic)
func SortedMapKeys ¶
func SortedMapKeys[K constraints.Ordered, V any](m map[K]V) []K
SortMapKeys will sort the keys on a map and return a slice of sorted keys (generic)
Types ¶
type ApiIAmAliveData ¶
type ApiIAmAliveData struct { Name string `json:"name" form:"name" binding:"required"` Status string `json:"status" form:"status"` }
-------------------------------------------------------------------------------------------------------------------------
type ReportStatusData ¶
type ReportStatusData struct {
Name string `json:"name" form:"name"`
}
-------------------------------------------------------------------------------------------------------------------------
type ReportStatusSuccess ¶
type ReportSuccess ¶
type ReportSuccess struct {
Status string `json:"status"`
}
type SQLIntType ¶
type SQLIntType struct {
X *int
}
type SQLStringType ¶
type SQLStringType struct {
X string
}
------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------