Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Root = "pkg"
Root is the project layout root stripped from every name so the category stays visible (services/db/manager, routers/user/router). Projects with a different layout may override or clear it.
Functions ¶
func ConfigRoot ¶ added in v0.6.14
ConfigRoot returns the config key root a service reads its dynamic keys under, derived from its name alone: the package segment of a category-visible name (services/db/manager -> db, so an unnamed db instance reads db.connection.*), or the whole name when it has no path (a second instance named clickhouse reads clickhouse.connection.*). The auto name itself can never be a root - an env override cannot spell its slashes - which is why the segment, not the name, is the fallback.
func Name ¶
Name returns obj's service name: its package dir relative to the project root, with Root stripped, joined with the type name (pkg/services/db + manager -> services/db/manager). Optional prefixes are stripped after Root, whole segments only, first match wins - Name(m, "services") turns services/db/manager into db/manager.
Types ¶
This section is empty.