config

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncAlertHook added in v0.3.0

type AsyncAlertHook struct {
	Raw    bool
	PubSub bool
	SNS    bool
}

AsyncAlertHook represents configuration for asynchronous alert hooks

func (*AsyncAlertHook) Flags added in v0.3.0

func (cfg *AsyncAlertHook) Flags() []cli.Flag

Flags returns CLI flags for async alert hook configuration

func (*AsyncAlertHook) Parse added in v0.3.0

func (cfg *AsyncAlertHook) Parse(ctx *cli.Command) error

Parse parses CLI context and sets configuration values

type ClaudeCfg added in v0.1.0

type ClaudeCfg struct {
	ProjectID string
	// contains filtered or unexported fields
}

func (*ClaudeCfg) Configure added in v0.1.0

func (x *ClaudeCfg) Configure(ctx context.Context) (*claude.VertexClient, error)

func (*ClaudeCfg) Flags added in v0.1.0

func (x *ClaudeCfg) Flags() []cli.Flag

type CompositeLLMClient added in v0.1.0

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

func NewCompositeLLMClient added in v0.1.0

func NewCompositeLLMClient(contentClient, embeddingClient gollem.LLMClient) *CompositeLLMClient

func (*CompositeLLMClient) GenerateEmbedding added in v0.1.0

func (c *CompositeLLMClient) GenerateEmbedding(ctx context.Context, dimension int, input []string) ([][]float64, error)

func (*CompositeLLMClient) NewSession added in v0.1.0

func (c *CompositeLLMClient) NewSession(ctx context.Context, options ...gollem.SessionOption) (gollem.Session, error)

type Firestore

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

func (*Firestore) Configure

func (c *Firestore) Configure(ctx context.Context) (*repository.Firestore, error)

func (*Firestore) DatabaseID added in v0.5.0

func (c *Firestore) DatabaseID() string

DatabaseID returns the database ID (exported for migrate command)

func (*Firestore) Flags

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

func (*Firestore) IsConfigured added in v0.1.0

func (c *Firestore) IsConfigured() bool

IsConfigured returns true if Firestore is configured

func (Firestore) LogValue

func (c Firestore) LogValue() slog.Value

func (*Firestore) ProjectID added in v0.1.0

func (c *Firestore) ProjectID() string

ProjectID returns the project ID (exported for serve command)

type GeminiCfg

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

func (*GeminiCfg) Configure

func (x *GeminiCfg) Configure(ctx context.Context) (*gemini.Client, error)

func (*GeminiCfg) Flags

func (x *GeminiCfg) Flags() []cli.Flag

func (GeminiCfg) LogValue

func (x GeminiCfg) LogValue() slog.Value

type GenAI added in v0.4.0

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

GenAI represents configuration for GenAI functionality including prompt templates

func (*GenAI) Flags added in v0.4.0

func (x *GenAI) Flags() []cli.Flag

Flags returns CLI flags for GenAI configuration

func (*GenAI) GetPromptDir added in v0.4.0

func (x *GenAI) GetPromptDir() string

GetPromptDir returns the configured prompt directory path

func (*GenAI) IsConfigured added in v0.4.0

func (x *GenAI) IsConfigured() bool

IsConfigured returns true if prompt directory is configured

func (GenAI) LogValue added in v0.4.0

func (x GenAI) LogValue() slog.Value

LogValue returns a structured log value for GenAI configuration

type LLMCfg added in v0.1.0

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

func (*LLMCfg) Configure added in v0.1.0

func (x *LLMCfg) Configure(ctx context.Context) (gollem.LLMClient, error)

Configure creates and returns an LLM client, preferring Claude if configured

func (*LLMCfg) ConfigureEmbeddingClient added in v0.1.0

func (x *LLMCfg) ConfigureEmbeddingClient(ctx context.Context) (interfaces.EmbeddingClient, error)

ConfigureEmbeddingClient creates and returns an embedding client adapter from the configured LLM client

func (*LLMCfg) Flags added in v0.1.0

func (x *LLMCfg) Flags() []cli.Flag

func (*LLMCfg) GetActiveProvider added in v0.1.0

func (x *LLMCfg) GetActiveProvider() string

GetActiveProvider returns the name of the active LLM provider

func (*LLMCfg) IsClaudeConfigured added in v0.1.0

func (x *LLMCfg) IsClaudeConfigured() bool

IsClaudeConfigured returns true if Claude configuration is available

func (*LLMCfg) IsGeminiConfigured added in v0.1.0

func (x *LLMCfg) IsGeminiConfigured() bool

IsGeminiConfigured returns true if Gemini configuration is available

func (LLMCfg) LogValue added in v0.1.0

func (x LLMCfg) LogValue() slog.Value

type Logger

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

func (*Logger) Configure

func (x *Logger) Configure() (func(), error)

Configure sets up logger and returns closer function and error. You can call closer even if error is not nil.

func (*Logger) Flags

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

func (Logger) LogValue

func (x Logger) LogValue() slog.Value

type MCPConfig added in v0.1.0

type MCPConfig struct {
	Servers []MCPServerConfig `yaml:"servers,omitempty"`
	Local   []MCPLocalConfig  `yaml:"local,omitempty"`
	// contains filtered or unexported fields
}

MCPConfig represents MCP configuration

func (*MCPConfig) CreateMCPClients added in v0.1.0

func (x *MCPConfig) CreateMCPClients(ctx context.Context) ([]*mcp.Client, error)

CreateMCPClients creates MCP clients based on the configuration

func (*MCPConfig) CreateMCPToolSets added in v0.1.0

func (x *MCPConfig) CreateMCPToolSets(ctx context.Context) ([]gollem.ToolSet, error)

CreateMCPToolSets creates gollem tool sets from MCP clients

func (*MCPConfig) Flags added in v0.1.0

func (x *MCPConfig) Flags() []cli.Flag

func (*MCPConfig) GetServerNames added in v0.1.0

func (x *MCPConfig) GetServerNames() []string

GetServerNames returns a list of configured server names (both servers and local)

func (*MCPConfig) IsConfigured added in v0.1.0

func (x *MCPConfig) IsConfigured() bool

IsConfigured returns true if MCP configuration file is specified

func (*MCPConfig) LoadConfig added in v0.1.0

func (x *MCPConfig) LoadConfig() error

LoadConfig loads MCP configuration from the specified YAML file

func (MCPConfig) LogValue added in v0.1.0

func (x MCPConfig) LogValue() slog.Value

type MCPLocalConfig added in v0.1.0

type MCPLocalConfig struct {
	Name     string            `yaml:"name"`
	Command  string            `yaml:"command"`
	Args     []string          `yaml:"args,omitempty"`
	Env      map[string]string `yaml:"env,omitempty"`
	Disabled bool              `yaml:"disabled,omitempty"`
}

MCPLocalConfig represents configuration for a local MCP server

type MCPServerConfig added in v0.1.0

type MCPServerConfig struct {
	Name     string            `yaml:"name"`
	Type     string            `yaml:"type"` // "sse" or "http"
	URL      string            `yaml:"url"`
	Headers  map[string]string `yaml:"headers,omitempty"`
	Disabled bool              `yaml:"disabled,omitempty"`
}

MCPServerConfig represents configuration for a remote MCP server

type Policy

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

func (*Policy) Configure

func (x *Policy) Configure() (*opaq.Client, error)

func (*Policy) Flags

func (x *Policy) Flags() []cli.Flag

func (*Policy) HasPolicies added in v0.1.0

func (x *Policy) HasPolicies() bool

func (Policy) LogValue

func (x Policy) LogValue() slog.Value

type Sentry

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

func (*Sentry) Configure

func (x *Sentry) Configure() error

func (*Sentry) Flags

func (x *Sentry) Flags() []cli.Flag

func (Sentry) LogValue

func (x Sentry) LogValue() slog.Value

type Slack

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

func (*Slack) Configure

func (x *Slack) Configure() (*slack.Service, error)

func (*Slack) ConfigureOptional added in v0.1.0

func (x *Slack) ConfigureOptional() (*slack.Service, error)

ConfigureOptional returns a Slack service if configured, or nil if not configured

func (*Slack) ConfigureOptionalWithFrontendURL added in v0.1.0

func (x *Slack) ConfigureOptionalWithFrontendURL(frontendURL string) (*slack.Service, error)

ConfigureOptionalWithFrontendURL returns a Slack service if configured, or nil if not configured

func (*Slack) ConfigureWithFrontendURL

func (x *Slack) ConfigureWithFrontendURL(frontendURL string) (*slack.Service, error)

func (*Slack) Flags

func (x *Slack) Flags() []cli.Flag

func (*Slack) IsConfigured added in v0.1.0

func (x *Slack) IsConfigured() bool

IsConfigured checks if Slack configuration is complete

func (Slack) LogValue

func (x Slack) LogValue() slog.Value

func (*Slack) Verifier

func (x *Slack) Verifier() model.PayloadVerifier

type Storage

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

func (*Storage) Bucket added in v0.1.0

func (x *Storage) Bucket() string

Bucket returns the bucket name (exported for serve command)

func (*Storage) Configure

func (x *Storage) Configure(ctx context.Context) (*storage.Client, error)

func (*Storage) Flags

func (x *Storage) Flags() []cli.Flag

func (*Storage) IsConfigured added in v0.1.0

func (x *Storage) IsConfigured() bool

IsConfigured returns true if Storage is configured

func (*Storage) LogValue

func (x *Storage) LogValue() slog.Value

func (*Storage) Prefix added in v0.6.0

func (x *Storage) Prefix() string

Prefix returns the storage prefix (exported for serve command)

type TestData

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

func (*TestData) Configure

func (x *TestData) Configure() (*policy.TestDataSet, error)

func (*TestData) DetectDataPath

func (x *TestData) DetectDataPath() string

func (*TestData) Flags

func (x *TestData) Flags() []cli.Flag

func (*TestData) IgnoreDataPath

func (x *TestData) IgnoreDataPath() string

func (TestData) LogValue

func (x TestData) LogValue() slog.Value

type WebUI

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

func (*WebUI) Configure

func (x *WebUI) Configure(ctx context.Context, repo interfaces.Repository, slackSvc *slack.Service) (usecase.AuthUseCaseInterface, error)

func (*WebUI) Flags

func (x *WebUI) Flags() []cli.Flag

func (*WebUI) GetCallbackURL

func (x *WebUI) GetCallbackURL() string

func (*WebUI) GetFrontendURL

func (x *WebUI) GetFrontendURL() string

func (*WebUI) IsConfigured

func (x *WebUI) IsConfigured() bool

func (WebUI) LogValue

func (x WebUI) LogValue() slog.Value

func (*WebUI) SetFrontendURL added in v0.1.0

func (x *WebUI) SetFrontendURL(url string)

SetFrontendURL sets the frontend URL

Jump to

Keyboard shortcuts

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