Versions in this module Expand all Collapse all v0 v0.1.0 Nov 15, 2020 v0.0.800 Nov 15, 2020 Changes in this version + const CONF_TOML_ENV + const CONF_TOML_FILE + const Ckey + const CodeAppErr + const CodeSysErr + const HTTP_BUFF_SIZE + const LAYOUT_DATE + const LAYOUT_DATETIME + const LAYOUT_DATETIME_T + const LAYOUT_TIME + const LENGTH_DATETIME + const PATH_STEP_SEP + const ProxyBufferPool_None + const ProxyBufferPool_Sync + const ProxyErrorHandler_Body + const ProxyErrorHandler_None + const REVERSE_HOST + const REVERSE_PATH + const REVERSE_SCHEME + const StatusFailureResult + const StatusSuccessResult + var DefaultHttpClient *http.Client + var DefaultHttpProxy *httputil.ReverseProxy + var DefaultHttpTransport *http.Transport + var ZERO_TIME = time.Unix(0, 0) + func Bind(keys string, ret interface{}) (bool, error) + func BindWith(keys string, f BindFunc) (interface{}, bool, error) + func Elem(val interface{}, key string) (ret interface{}, ok bool) + func ElemBool(val interface{}, key string) (ret bool, ok bool) + func ElemDuration(val interface{}, key string) (ret time.Duration, ok bool) + func ElemFloat64(val interface{}, key string) (ret float64, ok bool) + func ElemInt(val interface{}, key string) (ret int, ok bool) + func ElemInt64(val interface{}, key string) (ret int64, ok bool) + func ElemMap(val interface{}, key string) (ret map[string]interface{}, ok bool) + func ElemSlice(val interface{}, key string) (ret []interface{}, ok bool) + func ElemString(val interface{}, key string) (ret string, ok bool) + func ElemStringMap(val interface{}, key string) (ret map[string]string, ok bool) + func ElemStringSlice(val interface{}, key string) (ret []string, ok bool) + func ElemTime(val interface{}, key string) (ret time.Time, ok bool) + func Evaluate(val string) string + func FirstPrivIpv4() string + func FormatDate(t time.Time) string + func FormatDateTime(t time.Time) string + func FormatTime(t time.Time) string + func Get(keys string) (interface{}, bool) + func GetBool(keys string) (bool, bool) + func GetDuration(keys string) (time.Duration, bool) + func GetFloat64(keys string) (float64, bool) + func GetInt(keys string) (int, bool) + func GetInt64(keys string) (int64, bool) + func GetMap(keys string) (map[string]interface{}, bool) + func GetSlice(keys string) ([]interface{}, bool) + func GetString(keys string) (string, bool) + func GetStringMap(keys string) (map[string]string, bool) + func GetStringSlice(keys string) ([]string, bool) + func GetTime(keys string) (time.Time, bool) + func HttpJson(method string, url string, header map[string]string, reqobj interface{}, ...) (status int, err error) + func HttpJsonRequest(method string, url string, header map[string]string, body io.Reader) (state int, content string, err error) + func HttpProxy(rurl string, writer http.ResponseWriter, request *http.Request) (err error) + func HttpProxyHandler(rurl string) *httputil.ReverseProxy + func HttpRequest(method string, url string, header map[string]string, body io.Reader) (state int, content string, err error) + func If(c bool, v1 interface{}, v2 interface{}) interface + func IfBool(c bool, v1 bool, v2 bool) bool + func IfFloat64(c bool, v1 float64, v2 float64) float64 + func IfInt(c bool, v1 int, v2 int) int + func IfInt64(c bool, v1 int64, v2 int64) int64 + func IfString(c bool, v1 string, v2 string) string + func InitConf(vs map[string]interface{}) + func InitHttp(c *HttpConfig) + func JoinQuery(rurl string, params map[string]string) string + func Json(v interface{}) string + func LoadConf(env string, name string) (bs []byte, path string, err error) + func MMHash32(data []byte) uint32 + func MarshalToml(vl interface{}) (bs []byte, err error) + func MustBind(keys string, ret interface{}) + func MustBool(keys string) bool + func MustDuration(keys string) time.Duration + func MustFloat64(keys string) float64 + func MustInt(keys string) int + func MustInt64(keys string) int64 + func MustMap(keys string) map[string]interface + func MustSlice(keys string) []interface + func MustString(keys string) string + func MustStringMap(keys string) map[string]string + func MustStringSlice(keys string) []string + func MustTime(keys string) time.Time + func NewBuilderPool(cap int) *sync.Pool + func OptiBool(keys string, def bool) bool + func OptiDuration(keys string, def time.Duration) time.Duration + func OptiFloat64(keys string, def float64) float64 + func OptiInt(keys string, def int) int + func OptiInt64(keys string, def int64) int64 + func OptiMap(keys string, def map[string]interface{}) map[string]interface + func OptiSlice(keys string, def []interface{}) []interface + func OptiString(keys string, def string) string + func OptiStringMap(keys string, def map[string]string) map[string]string + func OptiStringSlice(keys string, def []string) []string + func OptiTime(keys string, def time.Time) time.Time + func ParseDate(v string) (ret time.Time) + func ParseDateTime(v string) (ret time.Time) + func ParseDateTimeExt(v string) (ret time.Time) + func ParseTime(v string) (ret time.Time) + func ToBool(val interface{}) bool + func ToDuration(val interface{}) time.Duration + func ToFloat64(val interface{}) float64 + func ToInt(val interface{}) int + func ToInt64(val interface{}) int64 + func ToMap(val interface{}) map[string]interface + func ToSlice(val interface{}) []interface + func ToString(val interface{}) string + func ToStringMap(val interface{}) map[string]string + func ToStringSlice(val interface{}) []string + func ToTime(val interface{}) time.Time + type BaseConfig struct + Http HttpConfig + type BindFunc func(val interface{}) (interface{}, error) + type Builder struct + func NewBuilder(cap int) *Builder + func (b *Builder) Back(n int) + func (b *Builder) Cap() int + func (b *Builder) Grow(n int) + func (b *Builder) Len() int + func (b *Builder) Reset() *Builder + func (b *Builder) String() string + func (b *Builder) UnsafeString() string + func (b *Builder) Write(p []byte) (int, error) + func (b *Builder) WriteByte(c byte) error + func (b *Builder) WriteRune(r rune) (int, error) + func (b *Builder) WriteString(s string) (int, error) + type HttpBufferPool struct + func (s *HttpBufferPool) Get() []byte + func (s *HttpBufferPool) Put(v []byte) + type HttpConfig struct + ConnectTimeout time.Duration + DisableCompression bool + ExpectContinueTimeout time.Duration + ForceAttemptHTTP2 bool + HttpBuffSize int + IdleConnTimeout time.Duration + KeepAlive time.Duration + MaxConnsPerHost int + MaxIdleConns int + MaxIdleConnsPerHost int + MaxResponseHeaderBytes int64 + ProxyBufferPool string + ProxyErrorHandler string + ProxyFlushInterval time.Duration + ReadBufferSize int + RequestTimeout time.Duration + ResponseHeaderTimeout time.Duration + TLSHandshakeTimeout time.Duration + WriteBufferSize int + type IParallel interface + Add func(func()) + Close func() + Wait func() + func Parallel(cap int) IParallel + type Result struct + Code int + Data interface{} + Msg string + Tag string + func AppErr(msg string, tag string) *Result + func NewErr(code int, msg string, tag string) *Result + func NewResult(code int, msg string, data interface{}, tag string) *Result + func SysErr(msg string, tag string) *Result + func (r *Result) Error() string