Documentation
¶
Overview ¶
Package types provides global flags and resolver interface for the application.
Package types provides global flags and resolver interfaces for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientResolver ¶
type ClientResolver interface {
ResolveClient(flags *GlobalFlags) (*client.Client, error)
}
ClientResolver resolves a Redmine API client from global flags.
type GlobalFlags ¶
type GlobalFlags struct {
URL string
Key string
Format string
JQ string
Fields string
DryRun bool
Yes bool
Output string
Limit int
Offset int
Timeout time.Duration
Retries int
Verbose bool
Debug bool
Instance string
}
GlobalFlags contains global command line flags
type OutputWriter ¶
type OutputWriter interface {
WriteOutput(w io.Writer, flags *GlobalFlags, payload any) error
}
OutputWriter writes formatted output based on global flags.
type Resolver ¶
type Resolver interface {
ClientResolver
OutputWriter
}
Resolver combines client resolution and output writing. Commands can depend on only the subset they need.
Click to show internal directories.
Click to hide internal directories.