image

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallOptions

type CallOptions struct {
	Extra map[string]any
}

func BuildCallOptions

func BuildCallOptions(opts ...Option) *CallOptions

type ClientOption

type ClientOption func(*ClientOptions)

ClientOption 控制 Generator 客户端实例化行为。

func WithHTTPClient

func WithHTTPClient(client *http.Client) ClientOption

type ClientOptions

type ClientOptions struct {
	HTTPClient *http.Client
}

func BuildClientOptions

func BuildClientOptions(timeout time.Duration, opts ...ClientOption) *ClientOptions

type Generator

type Generator interface {
	Generate(ctx context.Context, req *schema.Request, opts ...Option) (*schema.Response, error)
}

type Option

type Option func(*CallOptions)

Option 控制单次 Generate 调用的行为。

func WithExtra

func WithExtra(key string, value any) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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