types

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL