wypas-lib

module
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT

README

wypas-lib

Shared Go module for the Wypas Tibia project. Provides common packages used by wypas-api, wypas-creator, and other Go services.

Module

github.com/codefatherllc/wypas-lib

Go 1.22+

Packages

Package Purpose
config Env var helpers (GetEnv, GetEnvInt, SplitCSV, ConvertDSN)
db MySQL connection pool with configured limits and lifetime
jwt JWT (HS256) parsing, signing, middleware, admin guard
middleware CORS middleware for net/http
otbm OTBM/OTB binary format parsers (map tiles, towns, items)
ratelimit In-memory IP rate limiter (sliding window)
response JSON response helpers (JSON, Error)
sprite Tibia.dat/spr parser, sprite cache, item/outfit rendering with color palette
worlds Game world list loader from JSON (worlds.json)

Install

go get github.com/codefatherllc/wypas-lib@latest

For local development with a sibling repo, add a replace directive:

replace github.com/codefatherllc/wypas-lib => ../wypas-lib

Release

Tags trigger CI. Push a semver tag to create a GitHub Release:

git tag v0.1.0
git push origin v0.1.0

CI runs go vet + go test before publishing the release.

Dependencies

  • github.com/go-sql-driver/mysql — MySQL driver
  • github.com/golang-jwt/jwt/v5 — JWT

License

Part of the Wypas project.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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