 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
	// Request encapsulates the provider facing request payload.
	Request cliproxyexecutor.Request
	// Options carries execution flags (streaming, headers, etc.).
	Options cliproxyexecutor.Options
	// Auth references the credential selected for execution.
	Auth *cliproxyauth.Auth
	// Translator represents the pipeline responsible for schema adaptation.
	Translator *sdktranslator.Pipeline
	// HTTPClient allows middleware to customise the outbound transport per request.
	HTTPClient *http.Client
}
    Context encapsulates execution state shared across middleware, translators, and executors.
type Hook ¶
type Hook interface {
	BeforeExecute(ctx context.Context, execCtx *Context)
	AfterExecute(ctx context.Context, execCtx *Context, resp cliproxyexecutor.Response, err error)
	OnStreamChunk(ctx context.Context, execCtx *Context, chunk cliproxyexecutor.StreamChunk)
}
    Hook captures middleware callbacks around execution.
type HookFunc ¶
type HookFunc struct {
	Before func(context.Context, *Context)
	After  func(context.Context, *Context, cliproxyexecutor.Response, error)
	Stream func(context.Context, *Context, cliproxyexecutor.StreamChunk)
}
    HookFunc aggregates optional hook implementations.
func (HookFunc) AfterExecute ¶
func (h HookFunc) AfterExecute(ctx context.Context, execCtx *Context, resp cliproxyexecutor.Response, err error)
AfterExecute implements Hook.
func (HookFunc) BeforeExecute ¶
BeforeExecute implements Hook.
func (HookFunc) OnStreamChunk ¶
func (h HookFunc) OnStreamChunk(ctx context.Context, execCtx *Context, chunk cliproxyexecutor.StreamChunk)
OnStreamChunk implements Hook.
type RoundTripperProvider ¶
type RoundTripperProvider interface {
	RoundTripperFor(auth *cliproxyauth.Auth) http.RoundTripper
}
    RoundTripperProvider allows injection of custom HTTP transports per auth entry.
 Click to show internal directories. 
   Click to hide internal directories.