general_utils

package module
v0.0.0-...-6343707 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2020 License: LGPL-3.0 Imports: 9 Imported by: 0

README

General Utilities (general_utils)

trevis-ci Check last build on Travis-CI



GoLang Library


GoLang general utility libraries for supporting GoLanguage program development, and code write acceleration.

Any of package is extremely and exhaustively tested, and ready for use. Into any package you can find details about provided features, types and utilities

  • general_structures - General purpose data/logic structural components library (builders, utilities, flow, logic, event handling, terminal screen manager, plug-ins, etc...)

Library details

Packages :

  • base - Default utilities features
  • common - Package that contains data types, measures and dt conversions
  • config - Package that contains GoLang (*.a) database utilities
  • generics - Package that contains experimental type generalization utilities
  • errors - Package that contains error and custom errors features and utilities
  • log - Package that contains custom and extensive logger engine features and utilities
  • net - Package that contains networking utilities, exposing sub packages features
  • net/common - Package that contains networking common types, features and utilities
  • net/rest - Package that contains Rest Server features
  • net/tcp - Package that contains Tcp Server features
  • net/web - Package that contains Web Server features
  • parser - Package that contains entity parsing utilities in multiple formats with standard interfaces
  • parser/logger - Package that contains logger parser features
  • process - Package that contains process, workflows and semaphores for process management
  • streams - Package that contains Brokers, Events, Consumers, Channel managers, and more streaming features, types and utilities

All packages are internal logger ready, integrated and full working.

The idea is to create a collection of undefined basic features, used as accelerator for GoLanguage software development and product integration

Author

Fabrizio Torelli is Cloud/System Architect working in the IT sector since 1999.

License

In the pure spirit of open source we release this library in GNU Lesser General Public License v3.0, please see license for details. It's an open use license, that allow people to work on it and extends, requiring to stakeholders to improve code into this project, for common use and general/global purposes. Please remember that if you extends or use code in an open source library you have to distribute in same open source format your outcome.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecomposeFilePath

func DecomposeFilePath(filePath string) (string, string, []string, error)

Decompose a file path to recover most relevant information Parameters:

filePath (string) file absolute path (with extension)
fileName (string) file name without extension
extensions ([]string) list of suitable file extensions

Returns:

( string absolute file folder path, string absolute file path, []stirng list of suitable extensions, error Any error arisen during computation )

func DestroyLoggerEngine

func DestroyLoggerEngine()

Destroys and unregister Logger Engine

func DisableLogChanMode

func DisableLogChanMode()

Disables Log to default Channel and restore log to target configuration

func EnableLogChanMode

func EnableLogChanMode() *chan interface{}

Enables Log to default Channel instead of target configuration

func FindFileInPath

func FindFileInPath(folder string, fileName string, extensions []string) (string, string, error)

Finds a file into a folder and look forward a file matching multiple file extensions Parameters:

folder (string) folder containing files
fileName (string) file name without extension
extensions ([]string) list of suitable file extensions

Returns:

( string absolute file path, stirng file extension, error Any error arisen during computation )

func InitCustomLoggerEngine

func InitCustomLoggerEngine(filePath string) error

Initializes and registers full Logger from custom configuration file.

Parameters:

filePath (string) Absolute file path

Returns:

error Any suitable error risen during code execution

func InitDeviceLoggerEngine

func InitDeviceLoggerEngine() error

Initializes and registers full Logger from base configuration file.

Returns:

error Any suitable error risen during code execution

func InitSimpleLoggerEngine

func InitSimpleLoggerEngine(verbosity log.LogLevel)

Initializes and registers Logger for StdOut.

Params:

verbosity (log.LogLevel) Log verbosity level

func InitializeLoggers

func InitializeLoggers()

Initialize loggers for all sub packages in global_utils. To run after the logger initialization only

Types

This section is empty.

Directories

Path Synopsis
log
net
tcp
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL