config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeConfig

type ClaudeConfig struct {
	BundlePath string `mapstructure:"bundle_path"` // Path to claude-bundle tarball or directory
}

ClaudeConfig holds Claude Code related settings.

type Config

type Config struct {
	DataDir     string `mapstructure:"data_dir"`
	ProjectsDir string `mapstructure:"projects_dir"`
	JobsDir     string `mapstructure:"jobs_dir"`
	TicketsDir  string `mapstructure:"tickets_dir"`

	Credentials CredentialsConfig `mapstructure:"credentials"`
	Claude      ClaudeConfig      `mapstructure:"claude"`
	Server      ServerConfig      `mapstructure:"server"`
	Logging     LoggingConfig     `mapstructure:"logging"`
}

Config holds all MANFRED configuration.

func Load

func Load() (*Config, error)

Load reads configuration from file, environment, and defaults.

func (*Config) ClaudeCredentialsExist

func (c *Config) ClaudeCredentialsExist() bool

ClaudeCredentialsExist checks if Claude credentials file exists.

func (*Config) EnsureDirectories

func (c *Config) EnsureDirectories() error

EnsureDirectories creates all required directories.

func (*Config) ProjectConfig

func (c *Config) ProjectConfig(name string) (*ProjectConfig, error)

ProjectConfig loads the configuration for a specific project.

func (*Config) ProjectRepositoryPath

func (c *Config) ProjectRepositoryPath(name string) string

ProjectRepositoryPath returns the path to the project's repository.

type CredentialsConfig

type CredentialsConfig struct {
	AnthropicAPIKey       string `mapstructure:"anthropic_api_key"`
	ClaudeCredentialsFile string `mapstructure:"claude_credentials_file"`
}

CredentialsConfig holds credential-related settings.

type DockerConfig

type DockerConfig struct {
	ComposeFile string `yaml:"compose_file"`
	MainService string `yaml:"main_service"`
	Workdir     string `yaml:"workdir"`
}

DockerConfig holds Docker-related project settings.

type LoggingConfig

type LoggingConfig struct {
	Level  string `mapstructure:"level"`
	Format string `mapstructure:"format"`
}

LoggingConfig holds logging settings.

type ProjectConfig

type ProjectConfig struct {
	Name          string       `yaml:"name"`
	Repo          string       `yaml:"repo"`
	DefaultBranch string       `yaml:"default_branch"`
	Docker        DockerConfig `yaml:"docker"`
}

ProjectConfig holds per-project configuration from project.yml.

type ServerConfig

type ServerConfig struct {
	Addr string `mapstructure:"addr"`
	Port int    `mapstructure:"port"`
}

ServerConfig holds web server settings.

Jump to

Keyboard shortcuts

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