Documentation
¶
Overview ¶
Package env reads the METAXISDATA_* environment, which is where a project's analysis scopes come from.
Scopes are deliberately never persisted. Several agents can share a machine while serving different projects, and anything remembered between runs would be silently overwritten by whichever agent ran last. Keeping the scopes in the process environment makes the isolation the caller's, which is where the decision belongs.
Index ¶
Constants ¶
const ( // ServerEnv is the server address. It is saved on the first `auth login // --server`, so later commands do not need it. ServerEnv = "METAXISDATA_SERVER" // TokenEnv injects a bearer token directly, for CI. TokenEnv = "METAXISDATA_TOKEN" // ScopesEnv lists the analysis scopes: comma separated entries, each either // a GUID or "name=guid". ScopesEnv = "METAXISDATA_SCOPES" // ConfigEnv points at the credentials file to use, skipping the default // location. This is how one machine holds several identities. ConfigEnv = "METAXISDATA_CONFIG" // ServiceKeyEnv carries a service account's key for the service-account // login path. ServiceKeyEnv = "METAXISDATA_SERVICE_KEY" )
The environment variables the CLI reads.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
Scope is one named analysis scope. The name is an opaque label used to attribute results; the GUID is what the server resolves the statement against.
func Lookup ¶
Lookup returns the scope with the given name, and whether it exists. A bare GUID is not a name, so a typo cannot silently resolve to something else.
func ParseScopes ¶
ParseScopes reads the METAXISDATA_SCOPES format: comma separated entries, each a bare GUID or "name=guid". GUIDs use ";" as their own separator, so the two never collide.