Documentation ¶
Index ¶
- Constants
- func GetFieldTagMap(d interface{}, tagIdentifier string) map[string]string
- func GetFieldValue(d interface{}, field string) interface{}
- func GetTagValueMap(d interface{}, tagIdentifier string) map[string]string
- type Migrator
- type RDBMS
- func (d *RDBMS) Close() error
- func (d *RDBMS) Connect() error
- func (d *RDBMS) ConnectM2() error
- func (d *RDBMS) DropTable(tableName string) error
- func (d *RDBMS) SelectRows(tableName, columns, condition, limit, offset, orderBy string) *sql.Rows
- func (d *RDBMS) UpdateRows(table string, updateDataArray map[string]string, ...) *sql.Rows
- func (d *RDBMS) UpdateTable(table string, updateDataArray map[string]string, ...) (sql.Result, error)
- type RDBMSConfig
- type Utils
- func (u *Utils) CPUCores() int32
- func (u *Utils) CPUInfo() ([]cpu.InfoStat, error)
- func (u *Utils) DeleteFileByAge(path string, minAgeForDeletion time.Duration) (bool, error)
- func (u *Utils) DeleteFileList(fileExtToClean, directoryPath string) int
- func (u *Utils) DeleteFileListE(fileExtToClean, directoryPath string) int
- func (u *Utils) FileExists(path string) bool
- func (u *Utils) GetFileList(directoryPath string) map[int]string
- func (u *Utils) ImplodeMapIntString(glue string, pieces map[int]string) string
- func (u *Utils) ImplodeStringArr(glue string, pieces []string) string
- func (u *Utils) LoadAvg() (*load.AvgStat, error)
- func (u *Utils) LoadAvgCheck() int
- func (u *Utils) MicroTime() float64
- func (u *Utils) PrintAWSIPs(ipVersion int, region, service, networkBorderGroup string)
- func (u *Utils) PrintCloudflareIPV4IPs(appendDeny bool)
- func (u *Utils) PrintCloudflareIPV6IPs(appendDeny bool)
- func (u *Utils) PrintGithubIPs(appendDeny bool)
- func (u *Utils) RenderTemplate(res http.ResponseWriter, templateType string, templateName string, ...)
Constants ¶
View Source
const ( CPU_CORES_CPUINFO_ERROR = -2 LAVG_TREND_CPUINFO_ERROR = -1 LAVG_TREND_ERROR = 0 LAVG_TREND_INCREASING = 1 LAVG_TREND_NORMAL = 2 LAVG_LOAD_LEVEL_YELLOW = 70 DEL_FILE_LIST_E_SLEEP = 60 )
Variables ¶
This section is empty.
Functions ¶
func GetFieldTagMap ¶
func GetFieldValue ¶
func GetFieldValue(d interface{}, field string) interface{}
func GetTagValueMap ¶
Types ¶
type RDBMS ¶
type RDBMS struct { Conn *sql.DB ConnErr error Conf *RDBMSConfig }
func (*RDBMS) SelectRows ¶
*
- @param type string $dbObj
- @param type string $tablename
- @param type string $columns
- @param type string $condition
- @param type integer $limit
- @param type integer $offset
- @param type string $order_by
- @return array
type RDBMSConfig ¶
type RDBMSConfig struct { DriverName string // Name of the SQL driver viz., mysql, postgres, sqlite etc HostName string // Hostname of the SQL server Port int64 // Port number of the SQL server Database string // Name of the database to connect to on the SQL server UserName string // Username part of the SQL server credentials Password string // Password for the afore-defined UserName MaxOpenConns int // Maximum number of connections to be opened MaxIdleConns int // Maximum number of idle connections to be kept MaxLifeTimeConn int // Maximum life of connection (in seconds) }
func (*RDBMSConfig) DSN ¶
func (c *RDBMSConfig) DSN() string
func (*RDBMSConfig) String ¶
func (c *RDBMSConfig) String() string
type Utils ¶
func (*Utils) DeleteFileByAge ¶
func (*Utils) DeleteFileList ¶
func (*Utils) DeleteFileListE ¶
DeleteFileListE( fileExtToClean, directoryPath string) int Empathetic version of the DeleteFileList() function. Checks system load average for overages and depending upon the result pauses or keeps deletion going
func (*Utils) FileExists ¶
func (*Utils) ImplodeMapIntString ¶
func (*Utils) ImplodeStringArr ¶
func (*Utils) LoadAvgCheck ¶
func (*Utils) PrintAWSIPs ¶
See: https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html
func (*Utils) PrintCloudflareIPV4IPs ¶
func (*Utils) PrintCloudflareIPV6IPs ¶
func (*Utils) PrintGithubIPs ¶
func (*Utils) RenderTemplate ¶
func (u *Utils) RenderTemplate(res http.ResponseWriter, templateType string, templateName string, data interface{})
RenderTemplate serves HTML template
Click to show internal directories.
Click to hide internal directories.