internal/

directory
v0.0.0-...-a798bc3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0

Directories

Path Synopsis
Package apiaction holds the vocabulary of an action a model declares: the phases of an action, the action itself and the hooks run before and after it, and the rule of the path of a route, the route under the API prefix and the segment the CRUD layout appends to it for an action.
Package apiaction holds the vocabulary of an action a model declares: the phases of an action, the action itself and the hooks run before and after it, and the rule of the path of a route, the route under the API prefix and the segment the CRUD layout appends to it for an action.
cache
cachetest
Package cachetest provides the conformance suite every types.Cache backend must pass.
Package cachetest provides the conformance suite every types.Cache backend must pass.
capacity
Package capacity resolves the per-type entry bound shared by the entry-addressed cache backends, so the configuration is read in one place rather than copied into each of them.
Package capacity resolves the per-type entry bound shared by the entry-addressed cache backends, so the configuration is read in one place rather than copied into each of them.
codec
Package codec encodes cache values for the backends that store bytes rather than live objects.
Package codec encodes cache values for the backends that store bytes rather than live objects.
defaultcache
Package defaultcache is the in-memory cache backend the framework forwards as its default, freelru: the one place the choice is made.
Package defaultcache is the in-memory cache backend the framework forwards as its default, freelru: the one place the choice is made.
freelru
Package freelru is a sharded LRU cache that stores live values.
Package freelru is a sharded LRU cache that stores live values.
lru
otter
Package otter is a W-TinyLFU cache.
Package otter is a W-TinyLFU cache.
registry
Package registry provides the shared per-type singleton store used by the in-memory cache backends.
Package registry provides the shared per-type singleton store used by the in-memory cache backends.
ristretto
Package ristretto is a TinyLFU-admission cache.
Package ristretto is a TinyLFU-admission cache.
tracing
Package tracing wraps cache backends that talk to remote systems with OpenTelemetry spans.
Package tracing wraps cache backends that talk to remote systems with OpenTelemetry spans.
cmd
apidocgen command
Command apidocgen regenerates the apidoc registration files of the framework packages that ship struct doc comments to the OpenAPI generator.
Command apidocgen regenerates the apidoc registration files of the framework packages that ship struct doc comments to the OpenAPI generator.
selfcheck command
Command selfcheck holds the framework's own source to the rules golangci-lint cannot express, and prints each violation it finds.
Command selfcheck holds the framework's own source to the rules golangci-lint cannot express, and prints each violation it finds.
testcachefix command
Command testcachefix writes back the test results go keeps under one key only, so a cached test never links its binary again.
Command testcachefix writes back the test results go keeps under one key only, so a cached test never links its binary again.
Package controller serves the actions of the registered routes on both transports: over HTTP through the handlers the router mounts (CreateHandler and its kind), over gRPC through the call functions the generated pb package runs (CreateCall and its kind).
Package controller serves the actions of the registered routes on both transports: over HTTP through the handlers the router mounts (CreateHandler and its kind), over gRPC through the call functions the generated pb package runs (CreateCall and its kind).
Package cqlpolicy builds the gocql policies the cassandra and scylla providers configure from settings both of them carry, so that a setting means the same in either: the retry policy downgrading_consistency names and the tries a reconnection policy makes.
Package cqlpolicy builds the gocql policies the cassandra and scylla providers configure from settings both of them carry, so that a setting means the same in either: the retry policy downgrading_consistency names and the tries a reconnection policy makes.
Package datatypes holds the value types the framework declares for model fields itself, where a project would otherwise reach for a third-party type: each stores, scans and writes its JSON the way the framework's contract says.
Package datatypes holds the value types the framework declares for model fields itself, where a project would otherwise reach for a third-party type: each stores, scans and writes its JSON the way the framework's contract says.
dbnode
Package dbnode names the roles of the nodes a database handle writes to and reads from, and stamps the role that serves a statement on the statement's context, for the SQL log to report which node ran it.
Package dbnode names the roles of the nodes a database handle writes to and reads from, and stamps the role that serves a statement on the statement's context, for the SQL log to report which node ran it.
Package dsl reads the designs the models of a project declare with the keywords of the public dsl package: Parse turns a model file into the Design of each of its models, Validate reports the declarations the generator cannot honor, and Design and Action are what gg gen, gg check and the generators consume.
Package dsl reads the designs the models of a project declare with the keywords of the public dsl package: Parse turns a model file into the Design of each of its models, Validate reports the declarations the generator cannot honor, and Design and Action are what gg gen, gg check and the generators consume.
Package errorstack extracts stack traces embedded in errors, shared by tracing and logging so both report the same error origin stack format.
Package errorstack extracts stack traces embedded in errors, shared by tracing and logging so both report the same error origin stack format.
Package execctx carries the identity of the unit of work a context belongs to.
Package execctx carries the identity of the unit of work a context belongs to.
Package ggcheck holds the rules gg check holds a business project to.
Package ggcheck holds the rules gg check holds a business project to.
Package ggconfig loads the project-level gst configuration file (gst.yaml) that gg commands consume at build time.
Package ggconfig loads the project-level gst configuration file (gst.yaml) that gg commands consume at build time.
Package ggconst holds the conventions the framework's tooling shares: the import paths of the framework packages, the names of the files, packages, fields and symbols gg generates and reads, and the patterns it recognizes them by.
Package ggconst holds the conventions the framework's tooling shares: the import paths of the framework packages, the names of the files, packages, fields and symbols gg generates and reads, and the patterns it recognizes them by.
Package gggen builds the code gg gen writes: the registration files, the service files and their test scaffolds, and, in its sub-packages, the column references, the TypeScript declarations and the protobuf definitions.
Package gggen builds the code gg gen writes: the registration files, the service files and their test scaffolds, and, in its sub-packages, the column references, the TypeScript declarations and the protobuf definitions.
columns
Package columns generates the typed column references of a project's models, so filters name columns through the compiler instead of through string literals.
Package columns generates the typed column references of a project's models, so filters name columns through the compiler instead of through string literals.
jsonshape
Package jsonshape reads what the types of a gst project look like on the wire: the JSON encoding/json writes for them, which is the codec of the framework's response envelope and request binding.
Package jsonshape reads what the types of a gst project look like on the wire: the JSON encoding/json writes for them, which is the codec of the framework's response envelope and request binding.
jsonshape/fixture/a-b
Package ab lives in a directory whose name maps to the same TypeScript import name as the a_b fixture package.
Package ab lives in a directory whose name maps to the same TypeScript import name as the a_b fixture package.
jsonshape/fixture/a_b
Package ab lives in a directory whose name maps to the same TypeScript import name as the a-b fixture package.
Package ab lives in a directory whose name maps to the same TypeScript import name as the a-b fixture package.
jsonshape/fixture/gst
Package gst sits where its output file would be gst.ts, the name of the framework prelude.
Package gst sits where its output file would be gst.ts, the name of the framework prelude.
jsonshape/fixture/mode
Package mode declares an enum type another fixture package declares a further constant of.
Package mode declares an enum type another fixture package declares a further constant of.
jsonshape/fixture/model/record
Package record declares fixture types the sample fixture refers to from another package.
Package record declares fixture types the sample fixture refers to from another package.
jsonshape/fixture/model/sample
Package sample declares the fixture types the TypeScript generator tests start from.
Package sample declares the fixture types the TypeScript generator tests start from.
jsonshape/fixture/pkg/notifier
Package notifier declares a fixture type a model refers to from outside the model directory.
Package notifier declares a fixture type a model refers to from outside the model directory.
jsonshape/fixture/unsupported
Package unsupported declares fixture types whose JSON shape the TypeScript generator cannot describe.
Package unsupported declares fixture types whose JSON shape the TypeScript generator cannot describe.
pb
Package pb generates the protobuf definitions of a gst project's gRPC services and the Go files serving them, from the schema pbschema derives of the models declaring GRPC(): the definitions printed as .proto files that mirror the model directory under pb/; beside each, a .gen.go with the type serving the service, the calls of its actions, the handlers of its rpcs and the conversions between the messages and the Go types (see handlerFile); and, in every package under pb/, a pb.gen.go registering its services on the listener (see registrationFiles).
Package pb generates the protobuf definitions of a gst project's gRPC services and the Go files serving them, from the schema pbschema derives of the models declaring GRPC(): the definitions printed as .proto files that mirror the model directory under pb/; beside each, a .gen.go with the type serving the service, the calls of its actions, the handlers of its rpcs and the conversions between the messages and the Go types (see handlerFile); and, in every package under pb/, a pb.gen.go registering its services on the listener (see registrationFiles).
ts
Package ts generates the TypeScript declarations of the Go types a gst project's API routes send and receive.
Package ts generates the TypeScript declarations of the Go types a gst project's API routes send and receive.
Package gghelper holds what more than one of gg's packages needs about the project gg runs in: the module path its go.mod declares, the paths gg leaves out of it, the ones its Git ignore rules exclude and the ones the go command leaves out, programs and package listings run against its module, and the small file and path helpers the commands share.
Package gghelper holds what more than one of gg's packages needs about the project gg runs in: the module path its go.mod declares, the paths gg leaves out of it, the ones its Git ignore rules exclude and the ones the go command leaves out, programs and package listings run against its module, and the small file and path helpers the commands share.
program/inspect command
The inspection program reports the project models' columns, what their index declarations violate on MySQL, the framework columns they rename, the query names they declare ambiguously and the ID accessors they lack for an ID of their own, as JSON written to the file its argument names: it is what gg gen and gg check build and run inside the project.
The inspection program reports the project models' columns, what their index declarations violate on MySQL, the framework columns they rename, the query names they declare ambiguously and the ID accessors they lack for an ID of their own, as JSON written to the file its argument names: it is what gg gen and gg check build and run inside the project.
program/migrate command
The migration program migrates a project's database to its models, or dumps the schema its models describe: it is what gg migrate builds and runs inside the project.
The migration program migrates a project's database to its models, or dumps the schema its models describe: it is what gg migrate builds and runs inside the project.
Package ggmodule implements the behavior behind the gg module command family: discovering framework modules (list), registering a module import in the project's module/module.go (add, remove), and materializing a module into the project as project-owned source (copy).
Package ggmodule implements the behavior behind the gg module command family: discovering framework modules (list), registering a module import in the project's module/module.go (add, remove), and materializing a module into the project as project-owned source (copy).
Package ggnew scaffolds the project gg new creates: the first version of every package the generated main.go imports, so the project compiles before its first generation.
Package ggnew scaffolds the project gg new creates: the first version of every package the generated main.go imports, so the project compiles before its first generation.
Package ggprune works out what gg prune deletes from a project's service and pb directories, and deletes it: the service files of disabled actions, the unmanaged files of service directories no model owns, the files under pb/ gg gen would not write now (see PlanPBFiles), and the directories that leaves empty.
Package ggprune works out what gg prune deletes from a project's service and pb directories, and deletes it: the service files of disabled actions, the unmanaged files of service directories no model owns, the files under pb/ gg gen would not write now (see PlanPBFiles), and the directories that leaves empty.
Package grpcserver serves the gRPC services of the models declaring GRPC(), on a listener of its own beside the HTTP one and on the same lifecycle: bootstrap starts it with the other listeners, drains it with the readiness probe and stops it side by side with the HTTP listener within the shutdown's window, its streams ending as the stop begins.
Package grpcserver serves the gRPC services of the models declaring GRPC(), on a listener of its own beside the HTTP one and on the same lifecycle: bootstrap starts it with the other listeners, drains it with the readiness probe and stops it side by side with the HTTP listener within the shutdown's window, its streams ending as the stop begins.
Package hookoverride tells whether a type overrides a method beyond the framework base it embeds, reading the answer off the compiled binary.
Package hookoverride tells whether a type overrides a method beyond the framework base it embeds, reading the answer off the compiled binary.
Package httpwrapper provides JSON round-trip wrappers around *http.Request and *http.Response.
Package httpwrapper provides JSON round-trip wrappers around *http.Request and *http.Response.
Package instance answers one question — which process is this — for every part of the framework that tells replicas apart: the field every log entry carries, the tracing resource, the origin a replicated cache event names.
Package instance answers one question — which process is this — for every part of the framework that tells replicas apart: the field every log entry carries, the tracing resource, the origin a replicated cache event names.
Package lease is the coordination primitive the framework's distributed capabilities stand on: a name that at most one healthy process among those sharing the primary database holds at a time.
Package lease is the coordination primitive the framework's distributed capabilities stand on: a name that at most one healthy process among those sharing the primary database holds at a time.
Package lifecycle is the registry of the framework components that have a lifetime of their own: clients of external systems, the scheduler, election loops, anything that owns a connection or a background goroutine — and, through the component package, a project's own long-running work.
Package lifecycle is the registry of the framework components that have a lifetime of their own: clients of external systems, the scheduler, election loops, anything that owns a connection or a background goroutine — and, through the component package, a project's own long-running work.
Package logfield declares log fields more than one stream of the framework writes, each as one constructor fixing the field's key and its type.
Package logfield declares log fields more than one stream of the framework writes, each as one constructor fixing the field's key and its type.
Package middleware holds the middleware the framework mounts itself and the machinery that mounts the rest: the built-in chain ahead of every route, the registry Register and RegisterAuth fill, and the registries the router fills as routes register — route parameters and streaming routes — together with the circuit breaker built from configuration at startup.
Package middleware holds the middleware the framework mounts itself and the machinery that mounts the rest: the built-in chain ahead of every route, the registry Register and RegisterAuth fill, and the registries the router fills as routes register — route parameters and streaming routes — together with the circuit breaker built from configuration at startup.
model
mfa
Package modelinfo reads the models of a project the way gg sees them: the model files under the model directory, each model with the design its DSL declares, its routes resolved through the resource hierarchy and the gst.yaml ignore rules, the service files its actions map to, and the doc comments the API document registers.
Package modelinfo reads the models of a project the way gg sees them: the model files under the model directory, each model with the design its DSL declares, its routes resolved through the resource hierarchy and the gst.yaml ignore rules, the service files its actions map to, and the doc comments the API document registers.
Package modelinspect inspects a project's models by running them.
Package modelinspect inspects a project's models by running them.
Package modelregistry contains the internal model infrastructure behind the public model package.
Package modelregistry contains the internal model infrastructure behind the public model package.
Package modelschema resolves what a model struct declares about its table: its database columns, the kind of value each stores and the URL query name each takes (see Column and ClassifyColumn), the columns the framework fixes the names of (see ValidateFrameworkColumns and DefaultCursorColumn), the secondary indexes it declares (see Index), its optimistic-locking column (see Version), the columns identifying one of its rows (see IdentifyingColumns), its associations (see AssociationFields) and the fields it declares read-only to clients (see IsReadOnly); and the fingerprint of everything a set of models declares about their tables (see Fingerprint).
Package modelschema resolves what a model struct declares about its table: its database columns, the kind of value each stores and the URL query name each takes (see Column and ClassifyColumn), the columns the framework fixes the names of (see ValidateFrameworkColumns and DefaultCursorColumn), the secondary indexes it declares (see Index), its optimistic-locking column (see Version), the columns identifying one of its rows (see IdentifyingColumns), its associations (see AssociationFields) and the fields it declares read-only to clients (see IsReadOnly); and the fingerprint of everything a set of models declares about their tables (see Fingerprint).
Package operation begins the framework's own background operations — a round of a cron job, a tenure of a leader work — with the identity the rest of the operation is annotated with: a trace id, taken from a root span when tracing is on and generated otherwise, the way a request takes its own at the listener.
Package operation begins the framework's own background operations — a round of a cron job, a tenure of a leader work — with the identity the rest of the operation is annotated with: a trace id, taken from a root span when tracing is on and generated otherwise, the way a request takes its own at the listener.
Package pbschema derives the protobuf definitions of a gst project's gRPC services: for every model whose Design declares GRPC(), the messages its Go types encode to and the service exposing its actions, as the descriptors of the .proto files that mirror the model directory under pb/, held to the files already committed there (see Derive).
Package pbschema derives the protobuf definitions of a gst project's gRPC services: for every model whose Design declares GRPC(), the messages its Go types encode to and the service exposing its actions, as the descriptors of the .proto files that mirror the model directory under pb/, held to the files already committed there (see Derive).
Package router builds the HTTP server a gst process serves: the engine carrying the framework's middleware chain and operational endpoints, the route groups registered routes attach to, the routes-ready hooks, and the server's start and shutdown.
Package router builds the HTTP server a gst process serves: the engine carrying the framework's middleware chain and operational endpoints, the route groups registered routes attach to, the routes-ready hooks, and the server's start and shutdown.
service
mfa
Package serviceregistry owns the framework-internal service registry used by controllers and modules.
Package serviceregistry owns the framework-internal service registry used by controllers and modules.
Package sse implements Server-Sent Events (SSE) for the framework.
Package sse implements Server-Sent Events (SSE) for the framework.
Package streamctx gives a stream a context that ends when the server it is served on begins to shut down.
Package streamctx gives a stream a context that ends when the server it is served on begins to shut down.
Package structdoc parses Go source code and extracts the doc comments of exported struct declarations and their exported fields.
Package structdoc parses Go source code and extracts the doc comments of exported struct declarations and their exported fields.
Package tenant implements the row scoping the public tenant package forwards: the column type whose clauses Gorm applies to every statement of a schema carrying it, the struct a model embeds to carry that column, and the context a statement takes its tenant from.
Package tenant implements the row scoping the public tenant package forwards: the column type whose clauses Gorm applies to every statement of a schema carrying it, the struct a model embeds to carry that column, and the context a statement takes its tenant from.
golist
Package golist reads the packages of the module a test runs in through go list, for a test that reads the source of packages other than its own.
Package golist reads the packages of the module a test runs in through go list, for a test that reads the source of packages other than its own.
oteltest
Package oteltest turns real OpenTelemetry tracing on inside one framework test and reads back the spans it exports.
Package oteltest turns real OpenTelemetry tracing on inside one framework test and reads back the spans it exports.
providertest
Package providertest runs the tests of a provider package against the external services they need, with the framework brought up as far as its provider stage and no further.
Package providertest runs the tests of a provider package against the external services they need, with the framework brought up as far as its provider stage and no further.
swap
Package swap replaces process-wide values for the duration of one test.
Package swap replaces process-wide values for the duration of one test.
testcontainer
Package testcontainer prepares the services the framework's tests run against, in containers started through testcontainers-go.
Package testcontainer prepares the services the framework's tests run against, in containers started through testcontainers-go.
testlog
Package testlog keeps the framework's logs of a test process out of the test output and out of the package source tree, where log files changing with every run would make go's test cache rerun every test that reads or lists the tree.
Package testlog keeps the framework's logs of a test process out of the test output and out of the package source tree, where log files changing with every run would make go's test cache rerun every test that reads or lists the tree.
Package tunnel is the communication protocol between a server and its users, and between a server and its clients.
Package tunnel is the communication protocol between a server and its users, and between a server and its clients.
Package types defines the contracts between the framework and business projects: the Model, Service, Database, Selector, Cache, RBAC, and Logger interfaces, the query building blocks they exchange (Filter, Order, Cursor, Column, Term, Window), and the per-request ServiceContext.
Package types defines the contracts between the framework and business projects: the Model, Service, Database, Selector, Cache, RBAC, and Logger interfaces, the query building blocks they exchange (Filter, Order, Cursor, Column, Term, Window), and the per-request ServiceContext.
Package urlquery translates URL query parameters into the arguments the database layer builds a query from.
Package urlquery translates URL query parameters into the arguments the database layer builds a query from.
Package websocket serves and dials the WebSocket connections a stream travels on over HTTP: every message one text frame holding a JSON document, the client's last one followed by a frame holding null.
Package websocket serves and dials the WebSocket connections a stream travels on over HTTP: every message one text frame holding a JSON document, the client's last one followed by a frame holding null.

Jump to

Keyboard shortcuts

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