Documentation
¶
Index ¶
- func FormatUptime(dur time.Duration) string
- func GetMemory() string
- func GetRandomInt(min int, max int) int
- func LoadEnv()
- func NewDB(host, port, user, pass, dbName string) (*sql.DB, error)
- func StartHTTPServer(ctx context.Context, port string, r http.Handler)
- func UploadFile(ctx context.Context, url string, fpath string, formfield string) error
- type Credentials
- type ServerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomInt ¶
Get Random Int (Min Inclusive->Max Exclusive)
func StartHTTPServer ¶
HTTP Server
Types ¶
type Credentials ¶
type Credentials struct {
User string `json:"user"` //Database Username
Pass string `json:"pass"` //Database Pass
Host string `json:"host"` //Database Host
Port string `json:"port"` //Database Port
Database string `json:"database"` //Database Table
}
Database credentials
func LoadCredentials ¶
func LoadCredentials(path string) *Credentials
type ServerData ¶
type ServerData struct {
Name string `json:"Name"`
Memory string `json:"Memory"`
Uptime string `json:"Uptime"`
}
Basic Server Data
Click to show internal directories.
Click to hide internal directories.