Reference
Reference
Settings, commands, tags and rules, to look things up.
Commands and settings
- anetos tool and app commands reference: Two command lines: the
anetosdeveloper tool (moduleanetos.dev/anetos/cli), which creates projects and writes code, and your application’s binary, which runs the app and its commands. See Commands and Getting started for walkthroughs. - anetos generate reference:
anetos generatewrites the typed columns of your models. It is part of theanetosdeveloper tool (moduleanetos.dev/anetos/cli). See Generate typed columns for a walkthrough. - Configuration reference: Every key starts with its area’s prefix (
DB_,CACHE_,QUEUE_…). The key that picks a backend is<AREA>_DRIVERin every area (DB_DRIVER,CACHE_DRIVER,MAIL_DRIVER,STORAGE_DRIVER), exceptAI_PROVIDER.
Web
- Request binding reference: Rules used by
web.Hto fill a handler’s input struct. - Views, sessions and forms reference: The APIs of packages
view,sessionandencryption, and the HTML helpers of packageweb. See Render HTML with templ, Sessions and flash messages and Handle HTML forms for walkthroughs. The components of a project’sviews/uiare in the UI components reference. - Validation rules reference: Rules for the
validatestruct tag, used byvalidate.Structandweb.H. See the validation guide for how to use them. - Translation file formats: The
formatandrelativesections of a catalog, whichi18n.Date,Time,DateTime,Format,Currency,Ago,DurationandLanguageNameuse, and the date pattern fields. The framework’s English values are ini18n/locales/en.yaml; a language’s come fromanetos locale:add(Numbers, dates and languages). A key a locale lacks comes from its parents, then English (the app’sencatalogs, then the framework’s), never from a fallback locale in another language. - OpenAPI reference: Package
web/openapiand what it writes. How to use it: Describe an API with OpenAPI. - UI components reference: The components of
views/ui, the packageanetos newwrites into a web project, which the layout and the pages ofmake:crudandmake:authcall. The package is your app’s: this page describes it asanetos newwrites it. See Style your app for changing it.
Data
- Models reference: How the db package maps a struct to a table. See Define models and save data for a walkthrough.
- Query builder reference: Everything available on
db.Q[T], the query started bydb.Query[T](ctx). See Query data for a walkthrough. - Migrations reference: The schema builder, the migration runner and the commands in package
anetos.dev/anetos/db/migrate. See Migrations and Seed the database for walkthroughs.
Packages
- Authentication reference: Packages
auth,auth/password,auth/socialandauth/rbac. How-to: Authentication, Authorization, Roles and permissions. Settings: configuration reference. - AI reference: The API of package
ai. See Add AI to your app for a walkthrough, AI for the design, and Configuration for theAI_*settings. - Testing reference: The APIs of packages
anetostestanddb/factory, and the hooks they use. See Test your app for a walkthrough.