Documentation
¶
Overview ¶
Package compaz implements Compa/z, the z/OSMF operator console used by the separate compaz executable (formerly cqt).
Index ¶
Constants ¶
const (
MinTerminalWidth = 52
)
Variables ¶
This section is empty.
Functions ¶
func MinTerminalHeight ¶
func MinTerminalHeight() int
MinTerminalHeight returns the smallest usable terminal height.
func VisibleRows ¶
VisibleRows returns the number of data rows available in the terminal. A non-positive result is a hard boundary: callers must not issue a row fetch.
Types ¶
type CopybookSource ¶
CopybookSource describes an optional display overlay. Exactly one of Local and DSN must be set when the source is applied.
type Dependencies ¶
type Dependencies struct {
LoadSession func(ctx context.Context, profile string) (Session, error)
ListProfiles func(context.Context) ([]string, error)
LoadFile func(context.Context, string) ([]byte, error)
Mappings MappingStore
Favorites FavoriteStore
Events EventRecorder
DSNSearchPath []string
Timeout time.Duration
}
Dependencies provide test seams without weakening the production command's read-only boundaries.
type EventRecorder ¶
EventRecorder appends local usage events — data set opens and executed jq queries — for the future suggestion engine and the query history. A nil recorder disables tracking.
type FavoriteStore ¶
type FavoriteStore interface {
Favorites(profile string, kind favorites.Kind) []favorites.Favorite
Matches(profile string, kind favorites.Kind, name string) bool
Toggle(profile string, kind favorites.Kind, name string) (bool, error)
Add(profile string, kind favorites.Kind, pattern string) error
Rename(profile string, kind favorites.Kind, oldPattern, newPattern string) error
SetNote(profile string, kind favorites.Kind, pattern, note string) error
Remove(profile string, kind favorites.Kind, pattern string) (bool, error)
Touch(profile string, kind favorites.Kind, pattern string) error
}
FavoriteStore persists data set favorites across sessions. A nil store disables favorites. FavoriteStore persists data set favorites keyed by z/OSMF profile; the empty profile holds entries shared across profiles (single-profile sessions and favorites saved before profile keying).
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
PageUp key.Binding
PageDown key.Binding
Top key.Binding
Bottom key.Binding
Open key.Binding
Back key.Binding
Search key.Binding
Locate key.Binding
Refresh key.Binding
Copybook key.Binding
ClearOverlay key.Binding
ToggleOverlay key.Binding
ToggleView key.Binding
Diagnostics key.Binding
Help key.Binding
Quit key.Binding
WideLeft key.Binding
WideRight key.Binding
Accept key.Binding
Cancel key.Binding
NextField key.Binding
PreviousField key.Binding
MappingAdd key.Binding
MappingEdit key.Binding
MappingRemove key.Binding
ToggleFavorite key.Binding
Favorites key.Binding
Recall key.Binding
Jobs key.Binding
FavoriteNote key.Binding
FavoriteRemove key.Binding
FavoriteAdd key.Binding
FavoriteEdit key.Binding
FavoriteOpen key.Binding
Edit key.Binding
Query key.Binding
QueryComplete key.Binding
QueryCopy key.Binding
SaveEdit key.Binding
ReloadEdit key.Binding
DiscardEdit key.Binding
NextProfile key.Binding
PreviousProfile key.Binding
}
KeyMap is the single source of truth for application, input, dialog, and wide-data bindings. Function keys are intentionally assigned only here.
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
type MappingStore ¶
type MappingStore interface {
Match(name string) (dsnmap.Mapping, bool)
Matches(name string) []dsnmap.Mapping
Put(mapping dsnmap.Mapping) error
Remove(pattern string) (bool, error)
Touch(pattern string) error
}
MappingStore persists DSN → copybook mappings across sessions. A nil store disables mapping persistence.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea state machine. It is read-only: actions can only navigate, filter, fetch, decode, or change presentation.
The active workspace is embedded so that existing code paths can continue to read per-profile fields (datasets, records, pagers, etc.) directly. Inactive workspaces are stored in the workspaces slice and swapped in on profile switches.
func NewModel ¶
func NewModel(options Options, deps Dependencies) (*Model, error)
NewModel validates static options and constructs a model whose work begins in Init. No network, filesystem, copybook, or decoding operation runs here.
func (*Model) Init ¶
Init loads the Zowe session in a typed command. Window-size handling remains independent, so a session can resolve in a tiny terminal without dispatching a row request.
type Options ¶
type Options struct {
Prefix string
Copybook string
CopybookDSN string
Format string
Record string
Codepage string
// ReadOnly disables edit mode entirely, restoring the strictly read-only
// console guarantee for operators who want it.
ReadOnly bool
}
Options are the approved compaz command-line settings.
type Screen ¶
type Screen uint8
const ( ScreenDataSets Screen = iota ScreenMembers ScreenRecords // ScreenJobs, ScreenSpoolFiles, and ScreenSpoolContent are a second, // parallel drill-down (owner/prefix-filtered jobs -> a job's spool/DD // files -> one spool file's text), reachable from ScreenDataSets and // back-navigable to it, mirroring the data set chain above. ScreenJobs ScreenSpoolFiles ScreenSpoolContent )