Documentation ¶
Index ¶
- func Config(file ...string) *gcfg.Config
- func DB(name ...string) gdb.DB
- func Database(name ...string) gdb.DB
- func Dump(i ...interface{})
- func Export(i ...interface{}) string
- func GetLogLevel() int
- func IsEmpty(value interface{}) bool
- func Redis(name ...string) *gredis.Redis
- func Server(name ...interface{}) *ghttp.Server
- func SetDebug(debug bool)
- func SetLogLevel(level int)
- func SetServerGraceful(enabled bool)
- func TCPServer(name ...interface{}) *gtcp.Server
- func Throw(exception interface{})
- func TryCatch(try func(), catch ...func(exception interface{}))
- func UDPServer(name ...interface{}) *gudp.Server
- func View(name ...string) *gview.View
- func Wait()
- type Array
- type ArrayAny
- type ArrayInt
- type ArrayStr
- type List
- type ListAnyInt
- type ListAnyStr
- type ListIntAny
- type ListIntInt
- type ListIntStr
- type ListStrAny
- type ListStrInt
- type ListStrStr
- type Map
- type MapAnyAny
- type MapAnyInt
- type MapAnyStr
- type MapIntAny
- type MapIntInt
- type MapIntStr
- type MapStrAny
- type MapStrInt
- type MapStrStr
- type Slice
- type SliceAny
- type SliceInt
- type SliceStr
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Database ¶
Database returns an instance of database ORM object with specified configuration group name.
func Dump ¶
func Dump(i ...interface{})
Dump dumps a variable to stdout with more manually readable.
func Export ¶
func Export(i ...interface{}) string
Export exports a variable to string with more manually readable.
func IsEmpty ¶
func IsEmpty(value interface{}) bool
IsEmpty checks given value empty or not. It returns false if value is: integer(0), bool(false), slice/map(len=0), nil; or else true.
func SetDebug ¶
func SetDebug(debug bool)
SetDebug disables/enables debug level for logging globally.
func SetServerGraceful ¶
func SetServerGraceful(enabled bool)
SetServerGraceful enables/disables graceful/hot reload feature of http Web Server. This feature is disabled in default.
func Throw ¶
func Throw(exception interface{})
Throw throws a exception, which can be caught by TryCatch function. It always be used in TryCatch function.
func TryCatch ¶
func TryCatch(try func(), catch ...func(exception interface{}))
TryCatch does the try...catch... logic.
Types ¶
type ListAnyInt ¶
type ListAnyInt = []map[interface{}]int
type ListAnyStr ¶
type ListAnyStr = []map[interface{}]string
type ListIntAny ¶
type ListIntAny = []map[int]interface{}
type ListIntInt ¶
type ListIntStr ¶
type ListStrAny ¶
type ListStrAny = []map[string]interface{}
type ListStrInt ¶
type ListStrStr ¶
Directories ¶
Path | Synopsis |
---|---|
container
|
|
garray
Package garray provides concurrent-safe/unsafe arrays.
|
Package garray provides concurrent-safe/unsafe arrays. |
gchan
Package gchan provides graceful channel for safe operations.
|
Package gchan provides graceful channel for safe operations. |
glist
Package glist provides a concurrent-safe/unsafe doubly linked list.
|
Package glist provides a concurrent-safe/unsafe doubly linked list. |
gmap
Package gmap provides concurrent-safe/unsafe maps.
|
Package gmap provides concurrent-safe/unsafe maps. |
gpool
Package gpool provides a object-reusable concurrent-safe pool.
|
Package gpool provides a object-reusable concurrent-safe pool. |
gqueue
Package gqueue provides a dynamic/static concurrent-safe(alternative) queue.
|
Package gqueue provides a dynamic/static concurrent-safe(alternative) queue. |
gring
Package gring provides a concurrent-safe/unsafe ring(circular lists).
|
Package gring provides a concurrent-safe/unsafe ring(circular lists). |
gset
Package gset provides kinds of concurrent-safe/unsafe sets.
|
Package gset provides kinds of concurrent-safe/unsafe sets. |
gtype
Package gtype provides kinds of high performance, concurrent-safe/unsafe basic variable types.
|
Package gtype provides kinds of high performance, concurrent-safe/unsafe basic variable types. |
gvar
Package gvar provides an universal variable type, like generics.
|
Package gvar provides an universal variable type, like generics. |
crypto
|
|
gaes
Package gaes provides useful API for AES encryption/decryption algorithms.
|
Package gaes provides useful API for AES encryption/decryption algorithms. |
gcrc32
Package gcrc32 provides useful API for CRC32 encryption/decryption algorithms.
|
Package gcrc32 provides useful API for CRC32 encryption/decryption algorithms. |
gdes
Package gdes provides useful API for DES encryption/decryption algorithms.
|
Package gdes provides useful API for DES encryption/decryption algorithms. |
gmd5
Package gmd5 provides useful API for MD5 encryption/decryption algorithms.
|
Package gmd5 provides useful API for MD5 encryption/decryption algorithms. |
gsha1
Package gsha1 provides useful API for SHA1 encryption/decryption algorithms.
|
Package gsha1 provides useful API for SHA1 encryption/decryption algorithms. |
database
|
|
gdb
Package gdb provides ORM features for popular relationship databases.
|
Package gdb provides ORM features for popular relationship databases. |
gredis
Package gredis provides convenient client for redis server.
|
Package gredis provides convenient client for redis server. |
encoding
|
|
gbase64
Package gbase64 provides useful API for BASE64 encoding/decoding algorithms.
|
Package gbase64 provides useful API for BASE64 encoding/decoding algorithms. |
gbinary
Package gbinary provides useful API for handling binary/bytes data.
|
Package gbinary provides useful API for handling binary/bytes data. |
gcharset
Package gcharset provides converting string to requested character encoding.
|
Package gcharset provides converting string to requested character encoding. |
gcompress
Package gcompress provides kinds of compression algorithms for binary/bytes data.
|
Package gcompress provides kinds of compression algorithms for binary/bytes data. |
ghash
Package ghash provides some popular hash functions(uint32/uint64) in go.
|
Package ghash provides some popular hash functions(uint32/uint64) in go. |
ghtml
Package ghtml provides useful API for HTML content handling.
|
Package ghtml provides useful API for HTML content handling. |
gjson
Package gjson provides convenient API for JSON/XML/YAML/TOML data handling.
|
Package gjson provides convenient API for JSON/XML/YAML/TOML data handling. |
gparser
Package gparser provides convenient API for accessing/converting variable and JSON/XML/YAML/TOML.
|
Package gparser provides convenient API for accessing/converting variable and JSON/XML/YAML/TOML. |
gtoml
Package gtoml provides accessing and converting for TOML content.
|
Package gtoml provides accessing and converting for TOML content. |
gurl
Package gurl provides useful API for URL handling.
|
Package gurl provides useful API for URL handling. |
gxml
Package gxml provides accessing and converting for XML content.
|
Package gxml provides accessing and converting for XML content. |
gyaml
Package gyaml provides accessing and converting for YAML content.
|
Package gyaml provides accessing and converting for YAML content. |
frame
|
|
gins
Package gins provides instances management and core components management.
|
Package gins provides instances management and core components management. |
gmvc
Package gmvc provides basic object classes for MVC.
|
Package gmvc provides basic object classes for MVC. |
internal
|
|
net
|
|
ghttp
Package ghttp provides a powerful http server and a simple client.
|
Package ghttp provides a powerful http server and a simple client. |
gipv4
Package gipv4 provides useful API for IPv4 address handling.
|
Package gipv4 provides useful API for IPv4 address handling. |
gipv6
Package gipv4 provides useful API for IPv6 address handling.
|
Package gipv4 provides useful API for IPv6 address handling. |
gscanner
Package gscanner provides a port scanner for local intranet.
|
Package gscanner provides a port scanner for local intranet. |
gsmtp
Package gsmtp provides a SMTP client to access remote mail server.
|
Package gsmtp provides a SMTP client to access remote mail server. |
gtcp
Package gtcp provides TCP server and client implementations.
|
Package gtcp provides TCP server and client implementations. |
gudp
Package gtcp provides UDP server and client implementations.
|
Package gtcp provides UDP server and client implementations. |
os
|
|
gcache
Package gcache provides high performance and concurrent-safe in-memory cache for process.
|
Package gcache provides high performance and concurrent-safe in-memory cache for process. |
gcfg
Package gcfg provides reading, caching and managing for configuration files/contents.
|
Package gcfg provides reading, caching and managing for configuration files/contents. |
gcmd
Package gcmd provides console operations, like options/values reading and command running.
|
Package gcmd provides console operations, like options/values reading and command running. |
gcron
Package gcron implements a cron pattern parser and job runner.
|
Package gcron implements a cron pattern parser and job runner. |
genv
Package genv provides operations for environment variables of system.
|
Package genv provides operations for environment variables of system. |
gfcache
Package gfcache provides reading and caching for file contents.
|
Package gfcache provides reading and caching for file contents. |
gfile
Package gfile provides easy-to-use operations for file system.
|
Package gfile provides easy-to-use operations for file system. |
gflock
Package gflock implements a thread-safe sync.Locker interface for file locking.
|
Package gflock implements a thread-safe sync.Locker interface for file locking. |
gfpool
Package gfpool provides io-reusable pool for file pointer.
|
Package gfpool provides io-reusable pool for file pointer. |
gfsnotify
Package gfsnotify provides a platform-independent interface for file system notifications.
|
Package gfsnotify provides a platform-independent interface for file system notifications. |
glog
Package glog implements powerful and easy-to-use levelled logging functionality.
|
Package glog implements powerful and easy-to-use levelled logging functionality. |
gmlock
Package gmlock implements a thread-safe memory locker.
|
Package gmlock implements a thread-safe memory locker. |
gproc
Package gproc implements communication and management of processes.
|
Package gproc implements communication and management of processes. |
grpool
Package grpool implements a goroutine reusable pool.
|
Package grpool implements a goroutine reusable pool. |
gspath
Package gspath implements file index and search for folders.
|
Package gspath implements file index and search for folders. |
gtime
Package gtime provides functionality for measuring and displaying time.
|
Package gtime provides functionality for measuring and displaying time. |
gtimer
Package gtimer implements Hierarchical Timing Wheel for interval/delayed jobs running and management.
|
Package gtimer implements Hierarchical Timing Wheel for interval/delayed jobs running and management. |
gview
Package gview implements a template engine based on text/template.
|
Package gview implements a template engine based on text/template. |
gview/internal/text
from golang-1.11.2 text/template 1.
|
from golang-1.11.2 text/template 1. |
gview/internal/text/template
Package template implements data-driven templates for generating textual output.
|
Package template implements data-driven templates for generating textual output. |
gview/internal/text/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
|
Package parse builds parse trees for templates as defined by text/template and html/template. |
test
|
|
gtest
Package gtest provides convenient test utils for unit testing.
|
Package gtest provides convenient test utils for unit testing. |
text
|
|
gregex
Package gregex provides high performance API for regular expression functionality.
|
Package gregex provides high performance API for regular expression functionality. |
gstr
Package gstr provides functions for string handling.
|
Package gstr provides functions for string handling. |
util
|
|
gconv
Package gconv implements powerful and easy-to-use converting functionality for any types of variables.
|
Package gconv implements powerful and easy-to-use converting functionality for any types of variables. |
gpage
Package gpage provides useful paging functionality for web pages.
|
Package gpage provides useful paging functionality for web pages. |
grand
Package grand provides high performance API for random functionality.
|
Package grand provides high performance API for random functionality. |
gutil
Package gutil provides some uncategorized util functions.
|
Package gutil provides some uncategorized util functions. |
gvalid
Package gvalid implements powerful and useful data/form validation functionality.
|
Package gvalid implements powerful and useful data/form validation functionality. |