gf: Index | Files | Directories

package g

import ""


Package Files

g.go g_func.go g_logger.go g_object.go g_setting.go

func Config Uses

func Config(name ...string) *gcfg.Config

Config returns an instance of config object with specified name.

func DB Uses

func DB(name ...string) gdb.DB

DB is alias of Database. See Database.

func Database Uses

func Database(name ...string) gdb.DB

Database returns an instance of database ORM object with specified configuration group name.

func Dump Uses

func Dump(i ...interface{})

Dump dumps a variable to stdout with more manually readable.

func Export Uses

func Export(i ...interface{}) string

Export exports a variable to string with more manually readable.

func GetLogLevel Uses

func GetLogLevel() int

GetLogLevel returns the global logging level.

func IsEmpty Uses

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 Redis Uses

func Redis(name ...string) *gredis.Redis

Redis returns an instance of redis client with specified configuration group name.

func Server Uses

func Server(name ...interface{}) *ghttp.Server

Server returns an instance of http server with specified name.

func SetDebug Uses

func SetDebug(debug bool)

SetDebug disables/enables debug level for logging component globally.

func SetLogLevel Uses

func SetLogLevel(level int)

SetLogLevel sets the logging level globally.

func SetServerGraceful Uses

func SetServerGraceful(enabled bool)

SetServerGraceful enables/disables graceful reload feature of http Web Server. This feature is disabled in default.

func TCPServer Uses

func TCPServer(name ...interface{}) *gtcp.Server

TCPServer returns an instance of tcp server with specified name.

func Throw Uses

func Throw(exception interface{})

Throw throws a exception, which can be caught by TryCatch function. It always be used in TryCatch function.

func TryCatch Uses

func TryCatch(try func(), catch ...func(exception interface{}))

TryCatch does the try...catch... mechanism.

func UDPServer Uses

func UDPServer(name ...interface{}) *gudp.Server

UDPServer returns an instance of udp server with specified name.

func View Uses

func View(name ...string) *gview.View

View returns an instance of template engine object with specified name.

func Wait Uses

func Wait()

Wait blocks until all the web servers shutdown.

type Array Uses

type Array = []interface{}

Array is alias of Slice.

type ArrayAny Uses

type ArrayAny = []interface{}

type ArrayInt Uses

type ArrayInt = []int

type ArrayStr Uses

type ArrayStr = []string

type List Uses

type List = []Map

Frequently-used slice type alias.

type ListAnyInt Uses

type ListAnyInt = []map[interface{}]int

type ListAnyStr Uses

type ListAnyStr = []map[interface{}]string

type ListIntAny Uses

type ListIntAny = []map[int]interface{}

type ListIntInt Uses

type ListIntInt = []map[int]int

type ListIntStr Uses

type ListIntStr = []map[int]string

type ListStrAny Uses

type ListStrAny = []map[string]interface{}

type ListStrInt Uses

type ListStrInt = []map[string]int

type ListStrStr Uses

type ListStrStr = []map[string]string

type Map Uses

type Map = map[string]interface{}

Frequently-used map type alias.

type MapAnyAny Uses

type MapAnyAny = map[interface{}]interface{}

type MapAnyInt Uses

type MapAnyInt = map[interface{}]int

type MapAnyStr Uses

type MapAnyStr = map[interface{}]string

type MapIntAny Uses

type MapIntAny = map[int]interface{}

type MapIntInt Uses

type MapIntInt = map[int]int

type MapIntStr Uses

type MapIntStr = map[int]string

type MapStrAny Uses

type MapStrAny = map[string]interface{}

type MapStrInt Uses

type MapStrInt = map[string]int

type MapStrStr Uses

type MapStrStr = map[string]string

type Slice Uses

type Slice = []interface{}

Frequently-used slice type alias.

type SliceAny Uses

type SliceAny = []interface{}

type SliceInt Uses

type SliceInt = []int

type SliceStr Uses

type SliceStr = []string

type Var Uses

type Var = gvar.Var

Universal variable type, like generics.

func NewVar Uses

func NewVar(i interface{}, unsafe ...bool) *Var

NewVar returns a *gvar.Var.


container/garrayPackage garray provides concurrent-safe/unsafe arrays.
container/gchanPackage gchan provides graceful channel for no panic operations.
container/glistPackage glist provides a concurrent-safe/unsafe doubly linked list.
container/gmapPackage gmap provides concurrent-safe/unsafe map containers.
container/gpoolPackage gpool provides object-reusable concurrent-safe pool.
container/gqueuePackage gqueue provides a dynamic/static concurrent-safe queue.
container/gringPackage gring provides a concurrent-safe/unsafe ring(circular lists).
container/gsetPackage gset provides kinds of concurrent-safe/unsafe sets.
container/gtreePackage gtree provides concurrent-safe/unsafe tree containers.
container/gtypePackage gtype provides kinds of high performance and concurrent-safe basic variable types.
container/gvarPackage gvar provides an universal variable type, like generics.
crypto/gaesPackage gaes provides useful API for AES encryption/decryption algorithms.
crypto/gcrc32Package gcrc32 provides useful API for CRC32 encryption algorithms.
crypto/gdesPackage gdes provides useful API for DES encryption/decryption algorithms.
crypto/gmd5Package gmd5 provides useful API for MD5 encryption algorithms.
crypto/gsha1Package gsha1 provides useful API for SHA1 encryption algorithms.
database/gdbPackage gdb provides ORM features for popular relationship databases.
database/gredisPackage gredis provides convenient client for redis server.
encoding/gbase64Package gbase64 provides useful API for BASE64 encoding/decoding algorithm.
encoding/gbinaryPackage gbinary provides useful API for handling binary/bytes data.
encoding/gcharsetPackage charset implements character-set conversion functionality.
encoding/gcompressPackage gcompress provides kinds of compression algorithms for binary/bytes data.
encoding/ghashPackage ghash provides some popular hash functions(uint32/uint64) in go.
encoding/ghtmlPackage ghtml provides useful API for HTML content handling.
encoding/gjsonPackage gjson provides convenient API for JSON/XML/YAML/TOML data handling.
encoding/gparserPackage gparser provides convenient API for accessing/converting variable and JSON/XML/YAML/TOML.
encoding/gtomlPackage gtoml provides accessing and converting for TOML content.
encoding/gurlPackage gurl provides useful API for URL handling.
encoding/gxmlPackage gxml provides accessing and converting for XML content.
encoding/gyamlPackage gyaml provides accessing and converting for YAML content.
frame/ginsPackage gins provides instances management and core components management.
frame/gmvcPackage gmvc provides basic object classes for MVC.
net/ghttpPackage ghttp provides powerful http server and simple client implements.
net/gipv4Package gipv4 provides useful API for IPv4 address handling.
net/gipv6Package gipv4 provides useful API for IPv6 address handling.
net/gscannerPackage gscanner provides a port scanner for local intranet.
net/gsmtpPackage gsmtp provides a SMTP client to access remote mail server.
net/gtcpPackage gtcp provides TCP server and client implementations.
net/gudpPackage gtcp provides UDP server and client implementations.
os/gcachePackage gcache provides high performance and concurrent-safe in-memory cache for process.
os/gcfgPackage gcfg provides reading, caching and managing for configuration.
os/gcmdPackage gcmd provides console operations, like options/values reading and command running.
os/gcronPackage gcron implements a cron pattern parser and job runner.
os/genvPackage genv provides operations for environment variables of system.
os/gfcachePackage gfcache provides reading and caching for file contents.
os/gfilePackage gfile provides easy-to-use operations for file system.
os/gflockPackage gflock implements a concurrent-safe sync.Locker interface for file locking.
os/gfpoolPackage gfpool provides io-reusable pool for file pointer.
os/gfsnotifyPackage gfsnotify provides a platform-independent interface for file system notifications.
os/glogPackage glog implements powerful and easy-to-use levelled logging functionality.
os/gmlockPackage gmlock implements a concurrent-safe memory-based locker.
os/gmutexPackage gmutex implements graceful concurrent-safe mutex with more rich features.
os/gprocPackage gproc implements management and communication for processes.
os/grpoolPackage grpool implements a goroutine reusable pool.
os/gspathPackage gspath implements file index and search for folders.
os/gtimePackage gtime provides functionality for measuring and displaying time.
os/gtimerPackage gtimer implements Hierarchical Timing Wheel for interval/delayed jobs running and management.
os/gviewPackage gview implements a template engine based on text/template.
util/gconvPackage gconv implements powerful and easy-to-use converting functionality for any types of variables.
util/gpagePackage gpage provides useful paging functionality for web pages.
util/grandPackage grand provides high performance random string generation functionality.
util/gutilPackage gutil provides utility functions.
util/gvalidPackage gvalid implements powerful and useful data/form validation functionality.

Package g imports 12 packages (graph). Updated 2019-07-13. Refresh now. Tools for package owners.