g

package
v1.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_LEVEL_ALL  = glog.LEVEL_ALL
	LOG_LEVEL_DEBU = glog.LEVEL_DEBU
	LOG_LEVEL_INFO = glog.LEVEL_INFO
	LOG_LEVEL_NOTI = glog.LEVEL_NOTI
	LOG_LEVEL_WARN = glog.LEVEL_WARN
	LOG_LEVEL_ERRO = glog.LEVEL_ERRO
	LOG_LEVEL_CRIT = glog.LEVEL_CRIT
)

Variables

This section is empty.

Functions

func Config

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

Config配置管理对象 配置文件目录查找依次为:启动参数cfgpath、当前程序运行目录

func DB

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

(别名)Database

func Database

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

数据库操作对象,使用了连接池

func Dump

func Dump(i ...interface{})

打印变量

func GetLogLevel added in v1.1.994

func GetLogLevel() int

获取设置的日志显示等级

func Redis

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

Redis操作对象,使用了连接池

func Server

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

HTTPServer单例对象

func SetDebug

func SetDebug(debug bool)

是否显示调试信息

func SetLogLevel

func SetLogLevel(level int)

设置日志的显示等级

func TCPServer added in v1.3.8

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

TCPServer单例对象

func Throw added in v1.1.994

func Throw(exception interface{})

抛出一个异常

func TryCatch added in v1.1.994

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

try...catch...

func UDPServer added in v1.3.8

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

UDPServer单例对象

func View

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

核心对象:View

func Wait

func Wait()

阻塞等待HTTPServer执行完成(同一进程多HTTPServer情况下)

Types

type Array

type Array = Slice

type ArrayInt added in v1.3.8

type ArrayInt = SliceInt

type ArrayStr added in v1.3.8

type ArrayStr = SliceStr

type List

type List = []Map

常用list数据结构(使用别名)

type ListIntInt added in v1.3.8

type ListIntInt = []map[int]int

type ListIntStr added in v1.3.8

type ListIntStr = []map[int]string

type ListStrInt added in v1.3.8

type ListStrInt = []map[string]int

type ListStrStr added in v1.3.8

type ListStrStr = []map[string]string

type Map

type Map = map[string]interface{}

常用map数据结构(使用别名)

type MapIntInt added in v1.3.8

type MapIntInt = map[int]int

type MapIntStr added in v1.3.8

type MapIntStr = map[int]string

type MapStrInt added in v1.3.8

type MapStrInt = map[string]int

type MapStrStr added in v1.3.8

type MapStrStr = map[string]string

type Slice

type Slice = []interface{}

常用slice数据结构(使用别名)

type SliceInt added in v1.3.8

type SliceInt = []int

type SliceStr added in v1.3.8

type SliceStr = []string

type Var

type Var = gvar.Var

框架动态变量,可以用该类型替代interface{}类型

func NewVar

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

动态变量

Directories

Path Synopsis
garray
Package garray provides kinds of concurrent-safe(alternative) arrays.
Package garray provides kinds of concurrent-safe(alternative) arrays.
gchan
Package gchan provides graceful operations for channel.
Package gchan provides graceful operations for channel.
glist
Package glist provides a concurrent-safe(alternative) doubly linked list.
Package glist provides a concurrent-safe(alternative) doubly linked list.
gmap
Package gmap provides kinds of concurrent-safe(alternative) maps.
Package gmap provides kinds of concurrent-safe(alternative) 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(alternative) ring(circular lists).
Package gring provides a concurrent-safe(alternative) ring(circular lists).
gset
Package gset provides kinds of concurrent-safe(alternative) sets.
Package gset provides kinds of concurrent-safe(alternative) sets.
gtype
Package gtype provides kinds of high performance, concurrent-safe basic variable types.
Package gtype provides kinds of high performance, concurrent-safe basic variable types.
gvar
Package gvar provides an universal variable type, like generics.
Package gvar provides an universal variable type, like generics.
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.
gdb
Package gdb provides ORM features for popular relationship databases.
Package gdb provides ORM features for popular relationship databases.
gkafka
Package gkafka provides producer and consumer client for kafka server.
Package gkafka provides producer and consumer client for kafka server.
gredis
Package gredis provides client for redis server.
Package gredis provides client for redis server.
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 quite flexible and useful API for JSON/XML/YAML/TOML content handling.
Package gjson provides quite flexible and useful API for JSON/XML/YAML/TOML content handling.
gparser
Package gparser provides a flexible and easy way for accessing/converting variable and JSON/XML/YAML/TOML contents.
Package gparser provides a flexible and easy way for accessing/converting variable and JSON/XML/YAML/TOML contents.
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.
gins
Package gins provides instances management and some core components.
Package gins provides instances management and some core components.
gmvc
Package gmvc provides basic object classes for MVC.
Package gmvc provides basic object classes for MVC.
internal
net
ghttp
Package ghttp provides quite powerful HTTP server and simple client implementations.
Package ghttp provides quite powerful HTTP server and simple client implementations.
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.
Package gcfg provides reading, caching and managing for configuration files.
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 1.
from golang-1.11.2 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.
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.
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 useful API for string handling.
Package gstr provides useful API for string handling.
gtest
Package gtest provides simple and useful test utils.
Package gtest provides simple and useful test utils.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL