Documentation
¶
Index ¶
- Constants
- func B64D(d string) (data []byte, err error)
- func B64E(d []byte) string
- func Base32Decoder(text string) (string, error)
- func Check(err error)
- func CheckIPLocalCIDR(ipAddress string) (bool, error)
- func CheckN(err error, d string)
- func CheckR(err error) error
- func CompressStream(p []byte) ([]byte, error)
- func CopyFile(source string, destination string) error
- func CreateSqlDatetime() string
- func DeSerialize(data []byte, s interface{}) error
- func DebugOut(debug string)
- func DebugOutHex(debug []byte)
- func DecompressStream(p []byte) ([]byte, error)
- func GetCompressedSize(p []byte) int
- func GetLocalIP() (localIP *string, err error)
- func GetStdin() *string
- func IntToString(n int) string
- func IsAsciiPrintable(s string) bool
- func RandInt(min int, max int) int
- func RandIntRange(min, max int) int
- func RandomString(l int) string
- func RetErrStr(text string) (err error)
- func Serialize(d interface{}) ([]byte, error)
- func SimpleDateTime() string
- func Sleep(val time.Duration)
- func SleepHours(val time.Duration)
- func SleepSeconds(val time.Duration)
- func SynchronizeGlobalMutex(mutexName string) (*filemutex.FileMutex, error)
- func ThrowN(d string)
- func WaitForever()
- type GeoIP
- type QueueObject
- type StackObject
- type SystemInfo
Constants ¶
View Source
const GEOIP_URI = "https://ipinfo.io/json"
View Source
const ROOT_MUTEX_DIRECTORY = "/tmp/"
Variables ¶
This section is empty.
Functions ¶
func Base32Decoder ¶
func CheckIPLocalCIDR ¶
func CompressStream ¶
Use gzip compression to generate a compressed stream
func CreateSqlDatetime ¶
func CreateSqlDatetime() string
* Generate a SQL DATETIME compliant string * https://stackoverflow.com/questions/21648842/output-go-time-in-rfc3339-like-mysql-format
func DeSerialize ¶
func GetCompressedSize ¶
func GetLocalIP ¶
func IntToString ¶
func IsAsciiPrintable ¶
func RandIntRange ¶
func RandomString ¶
func SimpleDateTime ¶
func SimpleDateTime() string
func SleepHours ¶
func SleepSeconds ¶
func SynchronizeGlobalMutex ¶
* This method creates a global object which attempts to synchronize instances of * applications that run concurrently. This application WILL terminate the application * if a lock cannot be acquired, otherwise it will return the appropriate *Filemutex * object and a nil error code
func WaitForever ¶
func WaitForever()
Types ¶
type GeoIP ¶
type QueueObject ¶
type QueueObject struct {
// contains filtered or unexported fields
}
func NewQueue ¶
func NewQueue(load ...interface{}) (Queue *QueueObject)
func (*QueueObject) Array ¶
func (f *QueueObject) Array() []interface{}
* Return a read-only array of the queue
func (*QueueObject) CloseQueue ¶
func (f *QueueObject) CloseQueue()
func (*QueueObject) Index ¶
func (f *QueueObject) Index(c int) interface{}
* References a certain element in the array
func (*QueueObject) Pop ¶
func (f *QueueObject) Pop() interface{}
func (*QueueObject) Push ¶
func (f *QueueObject) Push(p interface{}) int
* Input: Object that needs to be pushed to the Queue * Output: Number of objects in the array
type StackObject ¶
type StackObject struct {
// contains filtered or unexported fields
}
func NewStack ¶
func NewStack(load ...interface{}) *StackObject
func (*StackObject) Push ¶
func (f *StackObject) Push(val interface{}) int
type SystemInfo ¶
type SystemInfo struct { /* * Interface MAC/IP addresses, GeoIP Location in a juicy serialized structure, * and global IP address as reported by "ipinfo.io" */ GlobalIP *GeoIP LocalIP string /* Operating system version/build */ OSName string /* Local host information -- should be universal */ Hostname string Username string /* GoInfoObject -- kernel and detailed system info */ GoInfo *goInfo.GoInfoObject /* Windows specific output of "systeminfo" command */ SystemInfoCommand *string }
func GetSystemInfo ¶
func GetSystemInfo() (sysinfo *SystemInfo, err error)
Click to show internal directories.
Click to hide internal directories.