Skip to content

weprodev/go-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-pkg: WeProDev Standard Library

go-pkg is a zero-business-logic, highly modular set of utilities for Go backend services. It is designed to be fully open-source compatible, robust, and extensible.

📦 Packages

Each package is designed to be tightly scoped with minimal dependencies across packages.

  • config: Environment and File-based generic configuration loading.
  • api: Helper structs and utilities for the Echo web framework (extensible to other frameworks like Chi/Gin).
  • crypto: Generic AES-256-GCM authenticated encryption and BCrypt credential hashing.
  • httperr: Structured and actionable error types for web APIs (ServiceError).
  • logger: Generic JSON/text logger wrapping log/slog with Context extractors and multi-handler fan out.
  • pgsql: Configurable PostgreSQL connection helpers with transaction context wrappers.
  • sanitizer: Extensible, configuration-driven HTML sanitization (prevents XSS).
  • timeutil: Timestamp and pointer time utilities.
  • uuidutil: Common identifier types, mapping safely to database/sql driver implementations.
  • validator: Framework-agnostic validation helpers over go-playground/validator with strict JSON decoding utilities.
  • validator/echo: Echo integration helpers (binding + strict validation) without coupling the core validator package to Echo.

🛠 Usage & Audit

Validate the library with:

make audit

Packages

 
 
 

Contributors