config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLM

type LLM struct {
	// contains filtered or unexported fields
}

LLM holds LLM configuration.

func (*LLM) Configure

func (c *LLM) Configure(ctx context.Context) (gollem.LLMClient, error)

Configure creates an LLM client from the configuration.

func (*LLM) Flags

func (c *LLM) Flags() []cli.Flag

Flags returns CLI flags for LLM configuration.

func (*LLM) LogConfig

func (c *LLM) LogConfig(logger *slog.Logger)

LogConfig logs the LLM configuration.

type Logger

type Logger struct {
	Level string
}

Logger holds logger configuration.

func (*Logger) Configure

func (c *Logger) Configure() *slog.Logger

Configure creates a configured logger.

func (*Logger) Flags

func (c *Logger) Flags() []cli.Flag

Flags returns CLI flags for logger configuration.

type Prompt

type Prompt struct {
	SiteType    string
	Style       string
	Taste       string
	Layout      string
	ColorScheme string
	Lang        string
	ExtraPrompt string
	PromptFile  string
}

Prompt holds prompt customization configuration.

func (*Prompt) Flags

func (c *Prompt) Flags() []cli.Flag

Flags returns CLI flags for prompt configuration.

func (*Prompt) LogConfig

func (c *Prompt) LogConfig(logger *slog.Logger)

LogConfig logs the prompt configuration (only set values).

func (*Prompt) ResolveExtraPrompt

func (c *Prompt) ResolveExtraPrompt() (string, error)

ResolveExtraPrompt returns the extra prompt, reading from file if needed.

type PubSub

type PubSub struct {
	ProjectID         string
	TopicID           string
	ServiceAccountKey string
}

PubSub holds Google Cloud Pub/Sub emitter configuration.

func (*PubSub) Configure

func (c *PubSub) Configure(ctx context.Context) (*psEmitter.Emitter, error)

Configure creates a PubSubEmitter if both ProjectID and TopicID are set, returns nil otherwise. When ServiceAccountKey is provided, it is used for authentication instead of ADC.

func (*PubSub) Flags

func (c *PubSub) Flags() []cli.Flag

Flags returns CLI flags for Pub/Sub configuration.

type Server

type Server struct {
	Addr    string
	NodeID  string
	TLS     bool
	TLSCert string
	TLSKey  string
}

Server holds HTTP server configuration.

func (*Server) Flags

func (c *Server) Flags() []cli.Flag

Flags returns CLI flags for server configuration.

func (*Server) ValidateTLS

func (c *Server) ValidateTLS() error

ValidateTLS checks TLS flag combinations and returns an error for invalid configurations.

type Webhook

type Webhook struct {
	URL    string
	Secret string
}

Webhook holds webhook emitter configuration.

func (*Webhook) Configure

func (c *Webhook) Configure() interfaces.Emitter

Configure creates a WebhookEmitter if URL is set, returns nil otherwise.

func (*Webhook) Flags

func (c *Webhook) Flags() []cli.Flag

Flags returns CLI flags for webhook configuration.

Jump to

Keyboard shortcuts

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