frantic-core

module
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0

README

frantic-core

frantic-core is a Go utility library and application toolkit.

It includes a large set of helper packages (banking, dates, logging, etc.) as well as a Storm-backed DAO layer (dao/) with caching and a code generator (cmd/dao-gen) for generating new DAO packages.

Docs:

Features

  • Banking utilities (IBAN, ISIN, LEI, UTI, etc.)
  • Color manipulation
  • Centralized configuration management
  • Common error handling
  • Context and session helpers
  • Data import/export helpers
  • Date and time utilities
  • DAO / database layer (Storm-backed) with optional caching
  • Typed (generic) helpers to reduce DAO boilerplate
  • go generate-friendly DAO code generator (cmd/dao-gen)
  • Docker helpers
  • Email handling
  • Financial calculations
  • Logging and audit
  • Math helpers
  • Messaging and notification
  • Path and file I/O helpers
  • String manipulation
  • TUI input helpers

Directory Structure

application/         # Application entry points
banking/             # Banking utilities (IBAN, ISIN, LEI, UTI, etc.)
cmd/                 # Tools (includes dao-gen)
colours/             # Color utilities
commonConfig/        # Configuration management
commonErrors/        # Error handling
contextHandler/      # Context and session helpers
dao/                 # Data access objects
dateHelpers/         # Date utilities
dockerHelpers/       # Docker support
emailHandler/        # Email utilities
financial/           # Financial calculations
frantic/             # Core frantic logic
htmlHelpers/         # HTML helpers
idHelpers/           # ID generation and validation
importExportHelper/  # Import/export helpers
ioHelpers/           # File and I/O helpers
jobs/                # Job scheduling and helpers
logHandler/          # Logging and audit
mathHelpers/         # Math utilities
messageHelpers/      # Messaging helpers
mockData/            # Mock/test data
netHandler/          # Networking helpers
notificationHandler/ # Notification utilities
paths/               # Path helpers
stringHelpers/       # String manipulation
timeHelpers/         # Time utilities
timing/              # Timing helpers
tuiInputHelper/      # TUI input helpers

Installation

To use frantic-core in your Go project:

go get github.com/mt1976/frantic-core

Usage

Import the package or specific modules as needed:

import (
    "github.com/mt1976/frantic-core/banking"
    "github.com/mt1976/frantic-core/dateHelpers"
    "github.com/mt1976/frantic-core/logHandler"
    // ...other imports as needed
)
Example: Validate an IBAN
package main

import (
    "fmt"
    "github.com/mt1976/frantic-core/banking"
)

func main() {
    iban := "GB82WEST12345698765432"
    valid := banking.ValidateIBAN(iban)
    fmt.Printf("IBAN %s valid: %v\n", iban, valid)
}
Example: Logging
import "github.com/mt1976/frantic-core/logHandler"

func main() {
    logHandler.Info("Application started")
}
Example: Date Helper
import (
    "fmt"
    "github.com/mt1976/frantic-core/dateHelpers"
)

func main() {
    today := dateHelpers.Today()
    fmt.Println("Today's date is:", today)
}

DAO layer & code generation

If you’re using the DAO stack in dao/, these docs are the best entry points:

Quick example (from this repo root):

mkdir -p dao/test/fred
go run ./cmd/dao-gen -out dao/test/fred -pkg fred -type Fred -table Fred -namespace main -force

License

This project is licensed under the MIT License. See the LICENSE file for details.

Directories

Path Synopsis
Package application contains OS and environment utilities such as host/platform detection and basic system identity helpers.
Package application contains OS and environment utilities such as host/platform detection and basic system identity helpers.
Package banking provides helpers for financial identifiers and standards such as IBAN, ISIN, LEI, and UTI parsing and validation.
Package banking provides helpers for financial identifiers and standards such as IBAN, ISIN, LEI, and UTI parsing and validation.
Package colours exposes ANSI color escape sequences for simple terminal styling.
Package colours exposes ANSI color escape sequences for simple terminal styling.
Package commonConfig defines application configuration structures and accessors for dates, logging, servers, databases, assets, and security.
Package commonConfig defines application configuration structures and accessors for dates, logging, servers, databases, assets, and security.
Package commonErrors declares shared error variables and wrapping helpers to produce consistent, contextual error messages across the project.
Package commonErrors declares shared error variables and wrapping helpers to produce consistent, contextual error messages across the project.
Package contextHandler manages request-scoped context, including getting and setting values on application contexts.
Package contextHandler manages request-scoped context, including getting and setting values on application contexts.
Package dateHelpers provides utilities for date/time formatting, parsing, arithmetic, and business-day adjustments used across the project.
Package dateHelpers provides utilities for date/time formatting, parsing, arithmetic, and business-day adjustments used across the project.
Package dockerHelpers provides helpers to detect Docker environments and interact with container-related metadata.
Package dockerHelpers provides helpers to detect Docker environments and interact with container-related metadata.
Package emailHandler manages email composition and sending utilities.
Package emailHandler manages email composition and sending utilities.
Package financial provides date/tenor calculations and financial helpers used for scheduling and time conventions.
Package financial provides date/tenor calculations and financial helpers used for scheduling and time conventions.
Package frantic defines identity utilities and validation for official project/component names within the frantic ecosystem.
Package frantic defines identity utilities and validation for official project/component names within the frantic ecosystem.
Package htmlHelpers provides small helpers for generating and working with HTML fragments.
Package htmlHelpers provides small helpers for generating and working with HTML fragments.
Package idHelpers provides helpers for generating and formatting IDs.
Package idHelpers provides helpers for generating and formatting IDs.
Package ioHelpers provides simple I/O utilities for files and streams.
Package ioHelpers provides simple I/O utilities for files and streams.
Package logHandler centralizes application logging facilities and helpers.
Package logHandler centralizes application logging facilities and helpers.
Package mathHelpers contains small numeric helpers and utility functions.
Package mathHelpers contains small numeric helpers and utility functions.
Package messageHelpers defines shared message types used between services and application components.
Package messageHelpers defines shared message types used between services and application components.
Package mockData provides deterministic mock datasets for tests and examples.
Package mockData provides deterministic mock datasets for tests and examples.
Package netHandler provides HTTP/network helpers for client and server code.
Package netHandler provides HTTP/network helpers for client and server code.
Package notificationHandler exposes notification utilities for system and user alerts.
Package notificationHandler exposes notification utilities for system and user alerts.
Package paths centralizes filesystem path helpers and constants.
Package paths centralizes filesystem path helpers and constants.
Package stringHelpers provides common string utilities for formatting and validation.
Package stringHelpers provides common string utilities for formatting and validation.
Package timehelpers contains helpers for time-of-day and duration handling.
Package timehelpers contains helpers for time-of-day and duration handling.
Package timing provides simple timing utilities and instrumentation helpers.
Package timing provides simple timing utilities and instrumentation helpers.
Package tuiInputHelper offers helpers for terminal UI input handling.
Package tuiInputHelper offers helpers for terminal UI input handling.

Jump to

Keyboard shortcuts

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