config

package
v1.0.80 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORSConfig

type CORSConfig struct {
	AllowedOrigins []string `yaml:"allowed_origins"`
	AllowedMethods []string `yaml:"allowed_methods"`
	AllowedHeaders []string `yaml:"allowed_headers"`
}

CORSConfig represents CORS configuration

type CSRFConfig

type CSRFConfig struct {
	Enabled            bool `yaml:"enabled"`
	TokenExpiryMinutes int  `yaml:"token_expiry_minutes"`
}

CSRFConfig represents CSRF configuration

type Config

type Config struct {
	JWT         JWTConfig      `yaml:"jwt"`
	OAuth       OAuthConfig    `yaml:"oauth"`
	GitHub      GitHubConfig   `yaml:"github"`
	Security    SecurityConfig `yaml:"security"`
	WorkingDir  string         `yaml:"working_dir"`
	LogLevel    string         `yaml:"log_level"`
	FrontendURL string         `yaml:"frontend_url"`
	APIURL      string         `yaml:"api_url"`
	MinIOConfig MinIOConfig    `yaml:"minio"`
	RateLimit   RateLimit      `yaml:"rate_limit"`
}

Config represents the application configuration

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

LoadConfig loads the configuration from the specified file

type GitHubAppConfig

type GitHubAppConfig struct {
	AppID          int64  `yaml:"app_id"`
	PrivateKeyPath string `yaml:"private_key_path"`
	WebhookSecret  string `yaml:"webhook_secret"`
	Name           string `yaml:"app_name"`
	Description    string `yaml:"description"`
	HomepageURL    string `yaml:"homepage_url"`
	WebhookURL     string `yaml:"webhook_url"`
}

GitHubAppConfig represents GitHub App configuration

type GitHubConfig

type GitHubConfig struct {
	OAuth GitHubOAuthConfig `yaml:"oauth"`
	App   GitHubAppConfig   `yaml:"app"`
}

GitHubConfig represents GitHub configuration

type GitHubOAuthConfig

type GitHubOAuthConfig struct {
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
}

GitHubOAuthConfig represents GitHub OAuth configuration

type JWTConfig

type JWTConfig struct {
	Secret          string `yaml:"secret"`
	ExpirationHours int    `yaml:"expiration_hours"`
}

JWTConfig represents JWT configuration

type MinIOConfig

type MinIOConfig struct {
	APIURL    string `yaml:"api_url"`
	AccessKey string `yaml:"access_key"`
	SecretKey string `yaml:"secret_key"`
}

type OAuthConfig

type OAuthConfig struct {
	RedirectURL string `yaml:"redirect_url"`
}

OAuthConfig represents general OAuth configuration

type RateLimit

type RateLimit struct {
	MaxRequests       int `yaml:"max_requests"`
	RequestsPerSecond int `yaml:"per_second"`
}

type SecurityConfig

type SecurityConfig struct {
	CORS CORSConfig `yaml:"cors"`
	CSRF CSRFConfig `yaml:"csrf"`
}

SecurityConfig represents security configuration

Jump to

Keyboard shortcuts

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