Documentation
¶
Index ¶
- type CatalogService
- type CertificatesConfig
- type Config
- type ConfigOption
- type ConnectionInfo
- type DiscoveryConfig
- type DockerConfig
- type EnvVar
- type HealthCheck
- type Healthcheck
- type Instance
- type NetworkConfig
- type NetworkGlobalConfig
- type PortConfig
- type PreferencesConfig
- type Project
- type ResourceConfig
- type ResourceRequirements
- type Service
- type ServiceCatalog
- type ServiceConfiguration
- type ServiceLinks
- type ServiceSpec
- type ServiceStatus
- type TraefikConfig
- type TraefikGlobalConfig
- type TraefikInstanceConfig
- type VersionConfig
- type VolumeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatalogService ¶
type CatalogService struct {
Name string `toml:"name"`
Description string `toml:"description"`
Category string `toml:"category"` // database, cache, queue, monitoring, etc.
Icon string `toml:"icon"` // emoji or icon reference
Versions map[string]*ServiceSpec `toml:"versions"`
Tags []string `toml:"tags"`
Links *ServiceLinks `toml:"links"`
}
CatalogService represents a service definition in the catalog
type CertificatesConfig ¶
CertificatesConfig holds SSL certificate configuration
type Config ¶
type Config struct {
Preferences PreferencesConfig
Network NetworkGlobalConfig
Traefik TraefikGlobalConfig
Certificates CertificatesConfig
Instances map[string]*Instance
Projects map[string]*Project
}
Config represents the main Doku configuration
type ConfigOption ¶
type ConfigOption struct {
Name string `toml:"name"` // Option name
Description string `toml:"description"` // Option description
Type string `toml:"type"` // string, int, bool, select
Default string `toml:"default"` // Default value
Required bool `toml:"required"` // Whether required
EnvVar string `toml:"env_var"` // Environment variable name
Options []string `toml:"options,omitempty"` // For select type
Validation string `toml:"validation,omitempty"` // Validation regex
}
ConfigOption represents a single configuration option
type ConnectionInfo ¶
type ConnectionInfo struct {
Host string `json:"host"`
Port int `json:"port"`
URL string `json:"url"`
Protocol string `json:"protocol"`
Env map[string]string `json:"env"` // Environment variables for connection
}
ConnectionInfo represents service connection information
type DiscoveryConfig ¶
type DiscoveryConfig struct {
Type string
Protocol string
DefaultPort int
ConnectionTemplate string
EnvVars map[string]string
CompatibleWith []string
}
DiscoveryConfig holds service discovery metadata
type DockerConfig ¶
type DockerConfig struct {
Image string
DefaultTag string
Ports []PortConfig
Environment []EnvVar
Volumes []VolumeConfig
HealthCheck *HealthCheck
}
DockerConfig holds Docker-specific configuration
type HealthCheck ¶
HealthCheck defines container health check
type Healthcheck ¶
type Healthcheck struct {
Test []string `toml:"test"` // Health check command
Interval string `toml:"interval"` // Check interval (e.g., "30s")
Timeout string `toml:"timeout"` // Check timeout
Retries int `toml:"retries"` // Number of retries
Start string `toml:"start_period"` // Start period before checks begin
}
Healthcheck defines health check configuration
type Instance ¶
type Instance struct {
Name string
ServiceType string
Version string
Status ServiceStatus
ContainerName string
URL string
ConnectionString string
CreatedAt time.Time
UpdatedAt time.Time
Network NetworkConfig
Resources ResourceConfig
Traefik TraefikInstanceConfig
Volumes map[string]string
Environment map[string]string
}
Instance represents an installed service instance
type NetworkConfig ¶
NetworkConfig holds network configuration for an instance
type NetworkGlobalConfig ¶
NetworkGlobalConfig holds global network configuration
type PortConfig ¶
PortConfig defines a port mapping
type PreferencesConfig ¶
type PreferencesConfig struct {
Protocol string
Domain string
CatalogVersion string
LastUpdate time.Time
DNSSetup string
}
PreferencesConfig holds user preferences
type Project ¶
type Project struct {
Name string
Path string
Dockerfile string
Status ServiceStatus
ContainerName string
URL string
Port int
CreatedAt time.Time
Dependencies []string
Environment map[string]string
}
Project represents a local user project
type ResourceConfig ¶
type ResourceConfig struct {
MemoryLimit string
MemoryUsage string
CPULimit string
CPUUsage string
}
ResourceConfig holds resource limits and usage
type ResourceRequirements ¶
type ResourceRequirements struct {
MemoryMin string `toml:"memory_min"` // Minimum memory (e.g., "256m")
MemoryMax string `toml:"memory_max"` // Maximum memory (e.g., "1g")
CPUMin string `toml:"cpu_min"` // Minimum CPU (e.g., "0.25")
CPUMax string `toml:"cpu_max"` // Maximum CPU (e.g., "1.0")
}
ResourceRequirements defines default resource requirements
type Service ¶
type Service struct {
Name string
DisplayName string
Description string
Category string
Icon string
Tags []string
OfficialDocs string
Versions VersionConfig
Docker DockerConfig
Traefik TraefikConfig
Discovery DiscoveryConfig
}
Service represents a service from the catalog
type ServiceCatalog ¶
type ServiceCatalog struct {
Version string `toml:"version"`
Services map[string]*CatalogService `toml:"services"`
}
ServiceCatalog represents the complete catalog structure
type ServiceConfiguration ¶
type ServiceConfiguration struct {
Options []ConfigOption `toml:"options"` // Configuration options
}
ServiceConfiguration defines configurable options
type ServiceLinks ¶
type ServiceLinks struct {
Homepage string `toml:"homepage"`
Documentation string `toml:"documentation"`
Repository string `toml:"repository"`
}
ServiceLinks contains useful links for a service
type ServiceSpec ¶
type ServiceSpec struct {
Image string `toml:"image"` // Docker image with tag
Description string `toml:"description"` // Version-specific description
Port int `toml:"port"` // Main service port
AdminPort int `toml:"admin_port"` // Optional admin/management port
Protocol string `toml:"protocol"` // http, tcp, grpc, etc.
Environment map[string]string `toml:"environment"` // Default environment variables
Volumes []string `toml:"volumes"` // Volume mount paths
Command []string `toml:"command"` // Custom command
Healthcheck *Healthcheck `toml:"healthcheck"` // Health check configuration
Resources *ResourceRequirements `toml:"resources"` // CPU/memory requirements
Configuration *ServiceConfiguration `toml:"configuration"` // Configuration options
Dependencies []string `toml:"dependencies"` // Other services this depends on
}
ServiceSpec represents a specific version of a service
type ServiceStatus ¶
type ServiceStatus string
ServiceStatus represents the status of a service instance
const ( StatusRunning ServiceStatus = "running" StatusStopped ServiceStatus = "stopped" StatusFailed ServiceStatus = "failed" StatusUnknown ServiceStatus = "unknown" )
type TraefikConfig ¶
type TraefikConfig struct {
Enabled bool
Port int
HasWebInterface bool
WebPort int
CustomRules []string
}
TraefikConfig holds Traefik routing configuration
type TraefikGlobalConfig ¶
type TraefikGlobalConfig struct {
ContainerName string
Status ServiceStatus
DashboardEnabled bool
HTTPPort int
HTTPSPort int
DashboardURL string
}
TraefikGlobalConfig holds Traefik global configuration
type TraefikInstanceConfig ¶
TraefikInstanceConfig holds Traefik configuration for an instance
type VersionConfig ¶
VersionConfig holds version information