MCPcopy Create free account

hub / github.com/ardanlabs/kit / functions

Functions292 in github.com/ardanlabs/kit

↓ 102 callersMethodLog
Log returns a string to help with logging your configuration. It excludes any values whose key contains the string "PASS".
cfg/cfg.go:41
↓ 54 callersMethodString
String returns the value of the given key as a string. It will return an error if key was not found.
cfg/cfg.go:57
↓ 40 callersMethodFatal
Fatal logs trace information for users and terminates the app.
log/log.go:101
↓ 30 callersFunctionDecode
Decode takes a map and uses reflection to convert it into the given Go native structure. val must be a pointer to a struct.
mapstructure/mapstructure.go:81
↓ 29 callersMethodUser
User logs trace information for users.
log/log.go:71
↓ 21 callersMethodError
Error logs trace information that are errors.
log/log.go:86
↓ 19 callersMethodDev
Dev logs trace information for developers.
log/log.go:56
↓ 17 callersMethodError
Error is implementing the error interface.
mapstructure/error.go:15
↓ 17 callersMethodInt
Int returns the value of the given key as an int. It will return an error if the key was not found or the value can't be converted to an int.
cfg/cfg.go:95
↓ 12 callersMethodDecode
Decode decodes the given raw interface to the target pointer specified by the configuration.
mapstructure/mapstructure.go:222
↓ 12 callersMethodEvent
Event fires events back to the user for important events.
tcp/tcp_config.go:59
↓ 11 callersFunctionNewDecoder
NewDecoder returns a new decoder for the given configuration. Once a decoder has been returned, the same configuration must not be used again.
mapstructure/mapstructure.go:164
↓ 10 callersMethodBool
Bool returns the bool value of a given key as a bool. It will return an error if the key was not found or the value can't be converted to a bool.
cfg/cfg.go:189
↓ 8 callersMethodMustInt
MustInt returns the value of the given key as an int. It will panic if the key was not found or the value can't be converted to an int.
cfg/cfg.go:114
↓ 8 callersMethodSetBool
SetBool adds or modifies the configuration for the specified key and value.
cfg/cfg.go:238
↓ 8 callersMethodSetInt
SetInt adds or modifies the configuration for the specified key and value.
cfg/cfg.go:132
↓ 8 callersMethodSetString
SetString adds or modifies the configuration for the specified key and value.
cfg/cfg.go:85
↓ 8 callersMethodgetKind
(val reflect.Value)
mapstructure/mapstructure.go:401
↓ 7 callersFunctionDecodePath
DecodePath takes a map and uses reflection to convert it into the given Go native structure. Tags are used to specify the mapping between fields in th
mapstructure/mapstructure.go:98
↓ 7 callersMethodDuration
Duration returns the value of the given key as a Duration. It will return an error if the key was not found or the value can't be converted to a Durat
cfg/cfg.go:300
↓ 6 callersMethodAddr
Addr returns the local listening network address.
udp/udp.go:226
↓ 6 callersMethodErrorOffset
ErrorOffset logs trace information that are errors with a offset option to expand the caller level.
log/log.go:151
↓ 6 callersMethodRun
Run performs the execution of the specified job.
runner/runner.go:45
↓ 6 callersMethodUserOffset
UserOffset logs trace information for users with a offset option to expand the caller level.
log/log.go:135
↓ 6 callersFunctionappendErrors
(errors []string, err error)
mapstructure/error.go:26
↓ 6 callersMethoddecode
Decodes an unknown data type into a specific reflection value.
mapstructure/mapstructure.go:325
↓ 6 callersFunctiondisplayLog
displayLog can be called at the end of a test or example. It only prints the log contents if the -test.v flag is set.
log/log_test.go:28
↓ 6 callersFunctionresetLog
resetLog can be called at the beginning of a test or example.
log/log_test.go:24
↓ 6 callersFunctionshouldNotPanic
shouldNotPanic receives a ctx string and a function to run, if the function panics, it is considered a failure else a success.
cfg/cfg_test.go:240
↓ 6 callersFunctionshouldPanic
shouldPanic receives a ctx string and a function to run, if the function panics, it is considered a success else a failure.
cfg/cfg_test.go:226
↓ 5 callersMethodAddr
Addr returns the listener's network address. This may be different than the values provided in the configuration, for example if configuration port va
tcp/tcp.go:362
↓ 5 callersMethodDecodePath
DecodePath decodes the raw interface against the map based on the specified tags
mapstructure/mapstructure.go:228
↓ 5 callersMethodDevOffset
DevOffset logs trace information for developers with a offset option to expand the caller level.
log/log.go:119
↓ 5 callersMethodDo
Do waits for the goroutine pool to take the work to be executed.
pool/pool.go:141
↓ 5 callersMethodMustBool
MustBool returns the bool value of a given key as a bool. It will panic if the key was not found or the value can't be converted to a bool.
cfg/cfg.go:214
↓ 5 callersMethodMustString
MustString returns the value of the given key as a string. It will panic if the key was not found.
cfg/cfg.go:71
↓ 5 callersFunctionRespondError
RespondError sends JSON describing the error
web/reponse.go:99
↓ 5 callersMethodStop
Stop shuts down the manager and closes all connections.
udp/udp.go:193
↓ 5 callersMethodURL
URL returns the value of the given key as a URL. It will return an error if the key was not found or the value can't be converted to a URL.
cfg/cfg.go:253
↓ 4 callersFunctionDecodeSlicePath
DecodeSlicePath decodes a slice of maps against a slice of structures that contain specified tags
mapstructure/mapstructure.go:115
↓ 4 callersMethodHeader
Header implements the http.ResponseWriter interface and simply relays the request.
web/proxy.go:16
↓ 4 callersMethodKill
Kill will kill the Job method immediately.
runner/runner_test.go:41
↓ 4 callersMethodKillAfter
KillAfter will kill the Job method after the specified duration.
runner/runner_test.go:52
↓ 4 callersMethodMustTime
MustTime returns the value of the given key as a Time. It will panic if the key was not found or the value can't be converted to a Time.
cfg/cfg.go:161
↓ 4 callersMethodRead
Read is provided a request and a user-defined reader for each client connection on its own routine. Read must read a full request and return the popul
tcp/handlers.go:48
↓ 4 callersMethodShutdown
Shutdown waits for all the workers to finish.
pool/pool.go:130
↓ 4 callersMethodStart
Start begins to accept data.
udp/udp.go:80
↓ 4 callersMethodStart
Start creates the accept routine and begins to accept connections.
tcp/tcp.go:112
↓ 4 callersMethodStop
Stop shuts down the manager and closes all connections.
tcp/tcp.go:231
↓ 4 callersMethodWrite
Write is provided the response to write and the user-defined writer.
tcp/handlers.go:59
↓ 3 callersMethodError
Error implments the error interface for CltError.
tcp/tcp.go:45
↓ 3 callersMethodEvent
Event fires events back to the user for important events.
udp/udp_config.go:50
↓ 3 callersMethodHandle
Handle is our mechanism for mounting Handlers for a given HTTP verb and path pair, this makes for really easy, convenient routing.
web/web.go:109
↓ 3 callersMethodMustDuration
MustDuration returns the value of the given key as a Duration. It will panic if the key was not found or the value can't be converted into a Duration.
cfg/cfg.go:319
↓ 3 callersMethodMustURL
MustURL returns the value of the given key as a URL. It will panic if the key was not found or the value can't be converted to a URL.
cfg/cfg.go:272
↓ 3 callersMethodSend
Send will deliver the response back to the client.
udp/udp.go:221
↓ 3 callersMethodTemporary
()
tcp/tcp.go:172
↓ 3 callersMethodTime
Time returns the value of the given key as a Time. It will return an error if the key was not found or the value can't be converted to a Time.
cfg/cfg.go:142
↓ 3 callersMethodadd
add creates routines to process work or sets a count for routines to terminate. NOTE: since our pools are auto-adjustable, we will not give the user a
pool/pool.go:193
↓ 3 callersMethoddrop
drop closes the client connection and read operation.
tcp/client.go:61
↓ 3 callersFunctionwrapMiddleware
wrapMiddleware wraps a handler with some middleware.
web/web.go:213
↓ 2 callersMethodBind
Bind is called to set the reader and writer.
tcp/handlers.go:33
↓ 2 callersMethodFatalOffset
FatalOffset logs trace information for users and terminates the app with a offset expand the caller level.
log/log.go:167
↓ 2 callersFunctionNewPathDecoder
NewPathDecoder returns a new decoder for the given configuration. This is used to decode path specific structures
mapstructure/mapstructure.go:198
↓ 2 callersMethodProcess
Process is used to handle the processing of the request.
tcp/handlers.go:51
↓ 2 callersMethodProvide
()
cfg/cfg.go:23
↓ 2 callersFunctionRespond
Respond sends JSON to the client. If code is StatusNoContent, v is expected to be nil.
web/reponse.go:105
↓ 2 callersMethodSetDuration
SetDuration adds or modifies the configuration for a given duration at a specific key.
cfg/cfg.go:338
↓ 2 callersMethodSetTime
SetTime adds or modifies the configuration for the specified key and value.
cfg/cfg.go:179
↓ 2 callersMethodSetURL
SetURL adds or modifies the configuration for the specified key and value.
cfg/cfg.go:290
↓ 2 callersMethodStats
Stats returns the current snapshot of the pool stats.
pool/pool.go:179
↓ 2 callersMethodWriteHeader
WriteHeader implements the http.ResponseWriter interface and simply relays the request after cleaning up the request headers. It theb records the stat
web/proxy.go:29
↓ 2 callersFunctioncatchPanic
CatchPanic is used to catch any Panic.
timezone/timezone.go:105
↓ 2 callersFunctionjoin
join takes an IP and port values and creates a cleaner string.
udp/udp.go:75
↓ 2 callersFunctionjoin
join takes an IP and port values and creates a cleaner string.
tcp/tcp.go:107
↓ 2 callersMethodmeasureHealth
measureHealth calculates the health of the work pool.
pool/pool.go:280
↓ 2 callersFunctiontestSliceInput
(t *testing.T, input map[string]interface{}, expected *Slice)
mapstructure/mapstructure_test.go:768
↓ 1 callersMethodCheckShutdown
CheckShutdown can be used to check if a shutdown request has been issued.
runner/runner.go:78
↓ 1 callersMethodDropConnections
DropConnections sets a flag to tell the accept routine to immediately drop connections that come in.
tcp/tcp.go:351
↓ 1 callersMethodError
Error implements the error interface for InvalidError.
web/reponse.go:50
↓ 1 callersMethodEvent
Event fires events back to the user for important events.
pool/pool.go:67
↓ 1 callersMethodGroup
Group creates a new App Group based on the current App and provided middleware.
web/web.go:93
↓ 1 callersMethodJob
(traceID string)
runner/runner.go:23
↓ 1 callersFunctionNew
New returns a instance of a logger.
log/log.go:45
↓ 1 callersMethodSend
Send will deliver the response back to the client.
tcp/tcp.go:301
↓ 1 callersMethodValidate
Validate checks the configuration to required items.
udp/udp_config.go:25
↓ 1 callersMethodValidate
Validate checks the configuration to required items.
tcp/tcp_config.go:34
↓ 1 callersMethodWork
(ctx context.Context, id int)
pool/pool.go:31
↓ 1 callersMethoddecodeBasic
This decodes a basic type (bool, int, string, etc.) and sets the value to "data" of that type.
mapstructure/mapstructure.go:418
↓ 1 callersMethoddecodeBool
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:525
↓ 1 callersMethoddecodeFloat
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:556
↓ 1 callersMethoddecodeInt
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:459
↓ 1 callersMethoddecodeMap
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:589
↓ 1 callersFunctiondecodePath
============================================================================== decodePath shows how to use the DecodePath API call.
examples/mapstructure/main.go:21
↓ 1 callersFunctiondecodePathArray
============================================================================== decodePath shows how to use the DecodePath API call with an array of su
examples/mapstructure/main.go:125
↓ 1 callersFunctiondecodeSlice
============================================================================== decodeSlice shows how to use the DecodeSlicePath API call.
examples/mapstructure/main.go:96
↓ 1 callersMethoddecodeSlice
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:647
↓ 1 callersMethoddecodeString
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:431
↓ 1 callersMethoddecodeStruct
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:692
↓ 1 callersMethoddecodeUint
(name string, data interface{}, val reflect.Value)
mapstructure/mapstructure.go:492
next →1–100 of 292, ranked by callers