package
0.0.0-20240712132348-8effd5a6bcb1
Repository: https://github.com/dmwm/dbs2go.git
Documentation: pkg.go.dev
# Functions
BasePath function provides end-point path for given api string.
CastFloat function to check and cast interface{} to int64 data-type.
CastInt function to check and cast interface{} to int data-type.
CastInt64 function to check and cast interface{} to int64 data-type.
CastString function to check and cast interface{} to string data-type.
ConvertFloat converts string representation of float scientific number to string int.
Diff provides a slice of the different elements from a and b.
Equal tells whether a and b contain the same elements.
ErrPropagate helper function which can be used in defer ErrPropagate().
ErrPropagate2Channel helper function which can be used in goroutines as ch := make(chan interface{})
go func() { defer ErrPropagate2Channel(api, ch) someFunction() }().
FetchResponse fetches data for provided URL, args is a json dump of arguments.
GetHash generates SHA256 hash for given data blob.
GoDeferFunc runs any given function in defered go routine.
InList checks item in a list.
Insert inserts value into array at zero position.
ListFiles lists files in a given directory.
MapIntKeys returns int keys from a map.
MapKeys returns string keys from a map.
OrderedSet implementa ordered set.
ParseTmpl parses template with given data.
PrintSQL prints SQL/args.
ProcFSMetrics returns procfs (prometheus) metrics.
RecordSize returns actual record size of given interface object.
ReplaceBinds replaces given pattern in string.
Response represents final response in a form of JSON structure we use custorm representation.
Set converts input list into set.
Stack returns full runtime stack.
UpdateOrderedDict returns new ordered list from given ordered dicts.
# Variables
BASE represents /base path of dbs2go end-point.
Localhost represents localhost name (with port) which can be used for local HTTP requests.
ORACLE represents a flag that underlying DB is oracle.
STATICDIR holds location of static directory for dbs2go.
UrlCounter for profile output.
VERBOSE controls verbosity level of the package.
# Structs
GzipReader struct to handle GZip'ed content of HTTP requests.
GzipWriter provides the same functionality as http.ResponseWriter It compresses data using compress/zip writer and provides headers from given http.ResponseWriter.
ProcFS represents prometheus profcs metrics.
ResponseType structure is what we expect to get for our URL call.
# Interfaces
ListEntry identifies types used by list's generics function.
# Type aliases
DevNullWriter provides the same functionality as http.ResponseWriter to cover unit tests of DBS APIs.
StdoutWriter provides the same functionality as http.ResponseWriter to cover unit tests of DBS APIs.