Documentation
¶
Overview ¶
Package identity resolves which project and run a CLI invocation acts for.
Precedence: --project/--run flags, then OTAG_PROJECT/OTAG_RUN_ID, then the working directory matched against registered project paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
Project *registry.ProjectRow `json:"project"`
ProjectSource string `json:"project_source,omitempty"` // flag | env | run | cwd
RunID string `json:"run_id,omitempty"`
RunSource string `json:"run_source,omitempty"` // flag | env
}
Identity is the resolved identity. Project may be nil when nothing matched.
func (Identity) RequireProject ¶
func (id Identity) RequireProject() (*registry.ProjectRow, error)
RequireProject returns the project or a NO_PROJECT error.