Repository navigation
Releases: dayanchm/golar
Releases · dayanchm/golar
Release list
Golar v0.5.1
Fixed
golar newfrom a CLI installed withgo install ...@v0.5.0treated the
module cache as a local Golar checkout and wrote areplacedirective to
it, so generated projects did not build on other machines. Installed CLIs
now require the published version;--framework-dirstill selects a
checkout.- Generated projects default to
github.com/dayanchm/golar v0.5.1, and
golar versionreports0.5.1.
Golar v0.5.0
The first tagged release. Install the CLI with
go install github.com/dayanchm/golar/cmd/golar@v0.5.0; generated projects
require github.com/dayanchm/golar v0.5.0.
Added
- Validation (
validation, #41): struct-tag rules (required,email,
url,uuid,regex,numeric,min,max,len,between,in,
confirmed,unique,exists), custom rules and messages, and nested
structs.c.Validatebinds and validates a request; invalid input becomes
422 {"errors": {...}}. - Middleware (
http/middleware, #43):CORS,RequestID,Timeout,
BodyLimit,SecureHeadersandCompress.Loggerlogs the request ID. - Request context (
http/context, #42):Bindfor JSON, URL-encoded and multipart bodies;Form,File,SaveFile,QueryDefaultandQueryInt;Cookie,SetCookiewith secure defaults,SetRawCookieandClearCookie;HTML,Render,Blob,NoContent,RedirectandDownload;IPandIsTLS, which trust forwarded headers only from configured proxies;WantsJSONandContext.
- SQL session store (
http/session, #44):SQLStorekeeps sessions in a
sessionstable keyed by the SHA-256 of their ID, so they survive restarts
and are shared between instances.CreateTables,PruneandPruneEvery
manage the table. - Mail (
mail, #45): messages with header-injection checks, SMTP
(STARTTLS by default), log and fake drivers, templates andFromEnv.
auth.PasswordResetMailandauth.VerificationMailsend the auth emails. - Authentication and authorization (
auth): Argon2id passwords, session
and API token guards, CSRF, rate limiting, gates, policies, roles, password
resets and email verification. - ORM and query builder (
database/orm,database/query): models, CRUD,
relationships, eager loading, soft deletes, joins, aggregates, pagination and
dialect-aware SQL for SQLite, PostgreSQL and MySQL. - Scaffolding:
golar new --auth token|sessiongenerates user accounts;- projects with authentication get password reset and email verification routes;
- generated projects register RequestID, Logger, Recovery, SecureHeaders,
BodyLimit and Compress; - session projects store sessions in the database unless
SESSION_DRIVER=memory.
Changed
- The default error handler maps oversized bodies to 413, unsupported body
types to 415, and undecodable bodies and invalid query parameters to 400. - Request bodies read through
Contextare limited by default: 4 MiB, or
32 MiB for multipart. Change the limits withapp.SetContextConfig. - Router: HEAD requests are served by GET routes, and
Allowlists HEAD. golar versionreports0.5.0.
Fixed
- Password reset times are stored in whole seconds, so MySQL compares them
correctly.