Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/daoshenzzg/go-web-demo
/ functions
Functions
418 in github.com/daoshenzzg/go-web-demo
⨍
Functions
418
◇
Types & classes
71
↓ 33 callers
Method
AppendByte
AppendByte writes a single byte to the Buffer.
library/log/internal/core/buffer.go:20
↓ 31 callers
Method
Close
Close middleware
library/log/handler.go:60
↓ 22 callers
Method
Code
Code get error code.
library/ecode/ecode.go:38
↓ 22 callers
Function
Error
Error logs a message at the error log level.
library/log/log.go:108
↓ 15 callers
Method
Error
sometimes Error return Code in string form NOTE: don't use Error in monitor report even it also work for now
library/ecode/ecode.go:36
↓ 15 callers
Method
Len
Len returns the length of the underlying byte slice.
library/log/internal/core/buffer.go:52
↓ 15 callers
Function
slowLog
(statement string, now time.Time)
library/database/sql/sql.go:493
↓ 14 callers
Method
JSON
JSON serializes the given struct as JSON into the response body. It also sets the Content-Type as "application/json".
library/render/render.go:32
↓ 14 callers
Method
Log
Log handle log variadic D is k-v struct represent log content
library/log/handler.go:53
↓ 13 callers
Method
Set
Set sets the value of the named command-line flag. format: -log.filter key1,key2
library/log/log.go:90
↓ 13 callers
Function
add
(code int, message string)
library/ecode/ecode.go:23
↓ 13 callers
Method
addKey
(key string)
library/log/internal/core/json_encoder.go:310
↓ 12 callers
Method
Shrink
Shrink will decrease the duration by comparing with context's timeout duration and return new timeout\context\CancelFunc.
library/time/time.go:50
↓ 12 callers
Method
addElementSeparator
()
library/log/internal/core/json_encoder.go:321
↓ 11 callers
Method
AppendString
(string)
library/log/internal/core/encoder.go:121
↓ 11 callers
Method
Do
Do sends an HTTP request and returns an HTTP json response.
library/net/http/client.go:199
↓ 11 callers
Method
String
String implementation.
library/log/level.go:27
↓ 10 callers
Method
Bytes
Bytes returns a mutable reference to the underlying byte slice.
library/log/internal/core/buffer.go:62
↓ 10 callers
Function
New
New create a new gin Context
library/render/render.go:14
↓ 10 callers
Function
cannotConvert
(d reflect.Value, s interface{})
library/cache/redis/scan.go:36
↓ 9 callers
Method
Reset
Reset resets the underlying byte slice. Subsequent writes re-use the slice's backing array.
library/log/internal/core/buffer.go:73
↓ 8 callers
Method
Get
Get issues a GET to the specified URL.
library/net/http/client.go:138
↓ 8 callers
Function
KVString
KVString construct Field with string value.
library/log/field.go:15
↓ 8 callers
Function
NewGroup
NewGroup new a breaker group container, if conf nil use default conf.
library/net/netutil/breaker/breaker.go:65
↓ 8 callers
Method
Query
Query executes a query that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.
library/database/sql/sql.go:179
↓ 8 callers
Method
Write
Write implements io.Writer.
library/log/internal/core/buffer.go:78
↓ 7 callers
Method
AppendInt64
(val int64)
library/log/internal/core/json_encoder.go:208
↓ 7 callers
Method
Get
Get retrieves a Buffer from the pool, creating one if necessary.
library/log/internal/core/pool.go:23
↓ 7 callers
Function
New
New FileWriter A FileWriter is safe for use by multiple goroutines simultaneously.
library/log/internal/filewriter/filewriter.go:125
↓ 7 callers
Method
Write
Write write data to log file, return write bytes is pseudo just for implement io.Writer.
library/log/internal/filewriter/filewriter.go:193
↓ 7 callers
Function
keyFactory
(key string)
library/log/pattern.go:105
↓ 6 callers
Method
AppendUint64
(val uint64)
library/log/internal/core/json_encoder.go:242
↓ 6 callers
Method
Dial
Dial creates a client connection to the given target.
library/net/rpc/client.go:149
↓ 6 callers
Function
MaxSize
MaxSize set max size for single log file, defult 1GB, 0 meaning unlimit.
library/log/internal/filewriter/option.go:56
↓ 6 callers
Method
Message
Message get code message.
library/ecode/ecode.go:40
↓ 6 callers
Function
New
New new a ecode.Codes by int value. NOTE: ecode must unique in global, the New will check repeat and then panic.
library/ecode/ecode.go:16
↓ 6 callers
Method
Put
Put put a grpc ClientConn into Pool
library/net/rpc/pool.go:32
↓ 6 callers
Method
Use
Use attachs a global inteceptor to the Client. For example, this is the right place for a circuit breaker or error management inteceptor.
library/net/rpc/client.go:104
↓ 6 callers
Function
Values
Values is a helper that converts an array command reply to a []interface{}. If err is not equal to nil, then Values returns nil, err. Otherwise, Value
library/cache/redis/reply.go:233
↓ 6 callers
Function
realURL
realUrl return url with http://host/params.
library/net/http/client.go:214
↓ 5 callers
Method
AddString
(key, value string)
library/log/internal/core/encoder.go:34
↓ 5 callers
Method
AddUint64
(key string, val uint64)
library/log/internal/core/json_encoder.go:151
↓ 5 callers
Method
AppendFloat
AppendFloat appends a float to the underlying buffer. It doesn't quote NaN or +/- Inf.
library/log/internal/core/buffer.go:47
↓ 5 callers
Function
NewClient
NewClient returns a new blank Client instance with a default client interceptor. opt can be used to add rpc dial options.
library/net/rpc/client.go:129
↓ 5 callers
Method
NewRequest
NewRequest new http request with method, uri, values and headers.
library/net/http/client.go:120
↓ 4 callers
Method
Add
Add returns the result of appending value to args.
library/cache/redis/scan.go:489
↓ 4 callers
Method
AddInt64
(key string, val int64)
library/log/internal/core/json_encoder.go:109
↓ 4 callers
Method
AppendInt
(int)
library/log/internal/core/encoder.go:116
↓ 4 callers
Method
Exec
Exec executes a query without returning any rows. The args are for any placeholder parameters in the query.
library/database/sql/sql.go:157
↓ 4 callers
Function
Info
Info logs a message at the info log level.
library/log/log.go:98
↓ 4 callers
Method
JSON
JSON sends an HTTP request and returns an HTTP json response.
library/net/http/client.go:156
↓ 4 callers
Function
NewPool
NewPool constructs a new Pool.
library/log/internal/core/pool.go:11
↓ 4 callers
Method
Prepare
Prepare creates a prepared statement for later queries or executions. Multiple queries or executions may be run concurrently from the returned stateme
library/database/sql/sql.go:165
↓ 4 callers
Method
SayHello
SayHello implements helloworld.GreeterServer
library/net/rpc/client_test.go:22
↓ 4 callers
Method
SetConfig
SetConfig set client config.
library/net/http/client.go:92
↓ 4 callers
Function
String
String parse code string to error.
library/ecode/ecode.go:65
↓ 4 callers
Method
String
String returns a string copy of the underlying byte slice.
library/log/internal/core/buffer.go:67
↓ 4 callers
Function
Warn
Warn logs a message at the warning log level.
library/log/log.go:103
↓ 4 callers
Function
convertAssignValue
(d reflect.Value, s interface{})
library/cache/redis/scan.go:116
↓ 4 callers
Function
newPatternRender
newPatternRender new pattern render
library/log/pattern.go:34
↓ 3 callers
Method
AddDuration
(key string, value time.Duration)
library/log/internal/core/encoder.go:26
↓ 3 callers
Method
AddInt64
(key string, value int64)
library/log/internal/core/encoder.go:30
↓ 3 callers
Method
AddUint64
(key string, value uint64)
library/log/internal/core/encoder.go:37
↓ 3 callers
Method
AppendBool
Built-in types.
library/log/internal/core/encoder.go:110
↓ 3 callers
Method
AppendUint
(uint)
library/log/internal/core/encoder.go:122
↓ 3 callers
Method
Cap
Cap returns the capacity of the underlying byte slice.
library/log/internal/core/buffer.go:57
↓ 3 callers
Function
Cause
Cause cause from error to ecode.
library/ecode/ecode.go:78
↓ 3 callers
Method
Close
Close close all pool conns
library/net/rpc/pool.go:66
↓ 3 callers
Method
DialAll
DialAll dial grpc conns
library/net/rpc/pool.go:54
↓ 3 callers
Method
Do
Warped name with namespace for Hystrix DO.
library/net/netutil/breaker/breaker.go:93
↓ 3 callers
Method
Encode
EncodeEntry encodes an entry and fields, along with any accumulated context, into a byte buffer and returns it.
library/log/internal/core/encoder.go:164
↓ 3 callers
Function
MaxFile
MaxFile default 999, 0 meaning unlimit. TODO: don't create file list if MaxSize is unlimt.
library/log/internal/filewriter/option.go:48
↓ 3 callers
Function
NewClient
NewClient new a http client pool
library/net/http/client.go:60
↓ 3 callers
Function
NewPool
NewPool NewPool
library/net/rpc/pool.go:23
↓ 3 callers
Method
Reload
Reload reload the group by specified config, this may let all inner breaker reset to a new one.
library/net/netutil/breaker/breaker.go:82
↓ 3 callers
Method
Render
(io.Writer, map[string]interface{})
library/log/pattern.go:14
↓ 3 callers
Function
ToECode
(gst *status.Status)
library/net/rpc/status/status.go:34
↓ 3 callers
Method
UnmarshalText
UnmarshalText unmarshal text to duration.
library/time/time.go:40
↓ 3 callers
Function
ensureLen
(d reflect.Value, n int)
library/cache/redis/scan.go:28
↓ 3 callers
Function
logw
(args []interface{})
library/log/log.go:175
↓ 3 callers
Function
structSpecForType
(t reflect.Type)
library/cache/redis/scan.go:328
↓ 3 callers
Function
tStartSrv
()
library/net/http/client_test.go:25
↓ 3 callers
Function
touch
(dir, name string)
library/log/internal/filewriter/filewriter_test.go:16
↓ 3 callers
Method
write
(p []byte)
library/log/internal/filewriter/filewriter.go:327
↓ 2 callers
Method
AddFloat32
(key string, value float32)
library/log/internal/core/encoder.go:28
↓ 2 callers
Method
AddFloat64
(key string, value float64)
library/log/internal/core/encoder.go:27
↓ 2 callers
Method
AddInt
(key string, value int)
library/log/internal/core/encoder.go:29
↓ 2 callers
Method
AddTime
(key string, value time.Time)
library/log/internal/core/encoder.go:35
↓ 2 callers
Method
AddUint
(key string, value uint)
library/log/internal/core/encoder.go:36
↓ 2 callers
Method
AppendComplex128
(val complex128)
library/log/internal/core/json_encoder.go:184
↓ 2 callers
Method
Free
Free returns the Buffer to its Pool. Callers must not retain references to the Buffer after calling Free.
library/log/internal/core/buffer.go:95
↓ 2 callers
Method
GetConn
GetConn get conns from pool
library/net/rpc/pool.go:44
↓ 2 callers
Function
Int
Int parse code int to error.
library/ecode/ecode.go:62
↓ 2 callers
Function
KV
KV return a log kv for logging field. NOTE: use KV{type name} can avoid object alloc and get better performance. []~( ̄▽ ̄)~*干杯
library/log/field.go:56
↓ 2 callers
Function
NewStdout
NewStdout create a stdout log middleware
library/log/stdout.go:20
↓ 2 callers
Method
Raw
Raw sends an HTTP request and returns bytes response
library/net/http/client.go:171
↓ 2 callers
Method
Rollback
Rollback aborts the transaction.
library/database/sql/sql.go:424
↓ 2 callers
Function
ScanSlice
ScanSlice scans src to the slice pointed to by dest. The elements the dest slice must be integer, float, boolean, string, struct or pointer to struct
library/cache/redis/scan.go:412
↓ 2 callers
Method
SetFormat
SetFormat set render format on log output see StdoutHandler.SetFormat for detail
library/log/handler.go:57
↓ 2 callers
Function
String
String is a helper that converts a command reply to a string. If err is not equal to nil, then String returns "", err. Otherwise String converts the r
library/cache/redis/reply.go:150
next →
1–100 of 418, ranked by callers