Documentation
¶
Overview ¶
Package gorules defines custom lint rules for ruleguard.
golangci-lint runs these rules via go-critic, which includes support for ruleguard. All Go files in this directory define lint rules in the Ruleguard DSL; see:
- https://go-ruleguard.github.io/by-example/ - https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl
You run one of the following commands to execute your go rules only:
golangci-lint run golangci-lint run --disable-all --enable=gocritic
Note: don't forget to run `golangci-lint cache clean`!
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullResponseWriter ¶
FullResponseWriter ensures that any overridden response writer has full functionality. Mainly is hijackable and flushable.
func HttpAPIErrorMessage ¶
HttpAPIErrorMessage intends to enforce constructing proper sentences as error messages for the api. A proper sentence includes proper capitalization and ends with punctuation. There are ways around the linter, but this should work in the common cases.
func HttpAPIReturn ¶
HttpAPIReturn will report a linter violation if the http function is not returned after writing a response to the client.
func ProperRBACReturn ¶
ProperRBACReturn ensures we always write to the response writer after a call to Authorize. If we just do a return, the client will get a status code 200, which is incorrect.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
agenthooks-server is a reference consumer that logs verified lifecycle events as JSON.
|
agenthooks-server is a reference consumer that logs verified lifecycle events as JSON. |
|
aibridgepricesdiff renders a human-readable Markdown summary of the difference between two AI Gateway price seed files (the prices.json produced by aibridgepricesgen).
|
aibridgepricesdiff renders a human-readable Markdown summary of the difference between two AI Gateway price seed files (the prices.json produced by aibridgepricesgen). |
|
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format:
|
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format: |
|
apidocgen
|
|
|
postprocess
command
|
|
|
swaginit
command
Package main wraps swag init with Strict mode enabled.
|
Package main wraps swag init with Strict mode enabled. |
|
Command checkexperimentkeys validates experiment keys named in documentation.
|
Command checkexperimentkeys validates experiment keys named in documentation. |
|
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues.
|
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues. |
|
Command develop orchestrates the Coder development environment.
|
Command develop orchestrates the Coder development environment. |
|
Package docgenenv normalizes the process environment so documentation generators produce host-independent output.
|
Package docgenenv normalizes the process environment so documentation generators produce host-independent output. |
|
Command docsgenfiltercheck fails when the docs-gen paths filter in the CI workflow drifts from the files make gen writes.
|
Command docsgenfiltercheck fails when the docs-gen paths filter in the CI workflow drifts from the files make gen writes. |
|
Command docshtmlcheck fails when Markdown files under docs/ contain invalid inline HTML that the documentation site's HTML renderer silently drops or mangles.
|
Command docshtmlcheck fails when Markdown files under docs/ contain invalid inline HTML that the documentation site's HTML renderer silently drops or mangles. |
|
Command docsmanifestgen compiles the YAML sidebar sources under docs/manifest into docs/manifest.json, formats those sources, and checks them.
|
Command docsmanifestgen compiles the YAML sidebar sources under docs/manifest into docs/manifest.json, formats those sources, and checks them. |
|
Command docsredirectscheck validates docs/redirects.json, the list of redirects the documentation website applies for pages that have moved or been removed.
|
Command docsredirectscheck validates docs/redirects.json, the list of redirects the documentation website applies for pages that have moved or been removed. |
|
Start an embedded postgres database on port 5432.
|
Start an embedded postgres database on port 5432. |
|
Command gpgkms creates OpenPGP signatures with an RSA key held in Google Cloud KMS, so the release signing private key never leaves KMS.
|
Command gpgkms creates OpenPGP signatures with an RSA key held in Google Cloud KMS, so the release signing private key never leaves KMS. |
|
scanner
command
Package main provides a tool to scan Go source files and extract Prometheus metric definitions.
|
Package main provides a tool to scan Go source files and extract Prometheus metric definitions. |
|
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision.
|
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision. |
|
Command scopesdocgen generates the API key scopes reference at docs/reference/api-key-scopes.md from the RBAC scope catalog.
|
Command scopesdocgen generates the API key scopes reference at docs/reference/api-key-scopes.md from the RBAC scope catalog. |
|
Command styleclaims fails when the Coder documentation style guide claims a prose rule is enforced by tooling that is not actually enabled.
|
Command styleclaims fails when the Coder documentation style guide claims a prose rule is enforced by tooling that is not actually enabled. |
|
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout.
|
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout. |