Categorygithub.com/flarco/gxutil
modulepackage
0.0.0-20200223021932-4ff5b01879c2
Repository: https://github.com/flarco/gxutil.git
Documentation: pkg.go.dev

# README

gxutil

xutil for Go

Sling

Please see https://github.com/flarco/gxutil/tree/master/cmd/sling for README.

# Packages

No description provided by the author

# Functions

Check logs an error.
Compress uses gzip to compress.
Decompress uses gzip to decompress if it is gzip.
Error returns stacktrace error with message.
F : fmt.Sprintf.
GetConn return the most proper connection for a given database.
GetType : return the type of an interface.
IsErr : checks for error.
IsErrExit : check for err and exits if error.
Log : print text.
LogC : print text in specified color.
LogCBlue prints in blue.
LogCCyan prints in white.
LogCGreen prints in green.
LogCMagenta print in magenta.
LogCRed prints in red.
LogCRedErr prints in red to Stderr.
LogCWhite prints in white.
LogError handles logging of an error, useful for reporting.
LogErrorExit handles logging of an error and exits, useful for reporting.
LogErrorMail handles logging of an error and mail it to self.
LogIfError handles logging of an error if it i not nil, useful for reporting.
Now : Get unix epoch time in milli.
Panic panics on error.
ParseString return an interface string: "varchar" integer: "integer" decimal: "decimal" date: "date" datetime: "timestamp" timestamp: "timestamp" text: "text".
PrintT prints the type of object.
PrintV prints the value of object.
Propagate is a modified version of stacktrace Propagate.
R : Replacer R("File {file} had error {error}", "file", file, "error", err).
RandString returns a random string of len n with the provided char set charset can be `aplha` or `aplhanumeric`.
ReadCsv reads CSV and returns dataset.
ReadCsvStream reads CSV and returns datasream.
Rm is like R, for replacing with a map.
SendMail sends an email to the specific email address https://godoc.org/gopkg.in/gomail.v2#example-package.
Tee prints stream of text of reader.

# Variables

AlertEmail is the email address to send errors to.
SMTPPass is user password.
SMTPPort is email SMTP server port.
SMTPServer is email SMTP server host.
SMTPUser is SMTP user name.

# Structs

BaseConn is a database connection.
Column represents a schemata column.
ColumnStats holds statistics for a column.
Context is to manage context.
CSV is a csv object.
Dataset is a query returned dataset.
Datastream is a stream of rows.
MsSQLServerConn is a Microsoft SQL Server connection.
MySQLConn is a Postgres connection.
OracleConn is a Postgres connection.
Parquet is a parquet object.
PostgresConn is a Postgres connection.
RedshiftConn is a Redshift connection.
S3 is a AWS s3 object.
Schema represents a schemata schema.
Schemata contains the full schema for a connection.
Table represents a schemata table.
Template is a database YAML template.

# Interfaces

Connection is the Base interface for Connections.