config

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenerEndpoint

func ListenerEndpoint(ch *ChannelConfig) (port int, path string)

ListenerEndpoint extracts the port and path from a channel's listener config. Returns port=0 for non-HTTP listener types (tcp, file, etc.) which are skipped during duplicate detection.

func ValidateListenerEndpoints

func ValidateListenerEndpoints(channels []*ChannelConfig) []string

ValidateListenerEndpoints checks that no two enabled channels share the same port+path combination. Returns a list of human-readable error strings (empty if no duplicates).

Types

type ACKConfig

type ACKConfig struct {
	Auto        bool   `yaml:"auto,omitempty"`
	SuccessCode string `yaml:"success_code,omitempty"`
	ErrorCode   string `yaml:"error_code,omitempty"`
	RejectCode  string `yaml:"reject_code,omitempty"`
}

type AWSSecretsManagerConfig

type AWSSecretsManagerConfig struct {
	Region    string `mapstructure:"region"`
	AccessKey string `mapstructure:"access_key"`
	SecretKey string `mapstructure:"secret_key"`
	CacheTTL  string `mapstructure:"cache_ttl"`
}

type AccessControlConfig

type AccessControlConfig struct {
	Enabled  bool        `mapstructure:"enabled"`
	Provider string      `mapstructure:"provider"`
	LDAP     *LDAPConfig `mapstructure:"ldap"`
	OIDC     *OIDCConfig `mapstructure:"oidc"`
}

type AlertConfig

type AlertConfig struct {
	Name         string       `mapstructure:"name"`
	Trigger      AlertTrigger `mapstructure:"trigger"`
	Destinations []string     `mapstructure:"destinations"`
}

type AlertRefConfig

type AlertRefConfig struct {
	Destination string `yaml:"destination,omitempty"`
}

type AlertTrigger

type AlertTrigger struct {
	Type        string `mapstructure:"type"`
	Channel     string `mapstructure:"channel"`
	Threshold   int    `mapstructure:"threshold"`
	Window      string `mapstructure:"window"`
	ThresholdMs int    `mapstructure:"threshold_ms"`
	Percentile  string `mapstructure:"percentile"`
}

type AttachmentsConfig

type AttachmentsConfig struct {
	Enabled           bool   `yaml:"enabled,omitempty"`
	Store             string `yaml:"store,omitempty"`
	MaxSizeMB         int    `yaml:"max_size_mb,omitempty"`
	InlineThresholdKB int    `yaml:"inline_threshold_kb,omitempty"`
	Directory         string `yaml:"directory,omitempty"`
	Bucket            string `yaml:"bucket,omitempty"`
	Region            string `yaml:"region,omitempty"`
}

type AuditConfig

type AuditConfig struct {
	Enabled     bool     `mapstructure:"enabled"`
	Destination string   `mapstructure:"destination"`
	Events      []string `mapstructure:"events"`
}

type AuthConfig

type AuthConfig struct {
	Type            string   `yaml:"type"`
	Username        string   `yaml:"username,omitempty"`
	Password        string   `yaml:"password,omitempty"`
	Token           string   `yaml:"token,omitempty"`
	Key             string   `yaml:"key,omitempty"`
	Header          string   `yaml:"header,omitempty"`
	QueryParam      string   `yaml:"query_param,omitempty"`
	TokenURL        string   `yaml:"token_url,omitempty"`
	AuthURL         string   `yaml:"auth_url,omitempty"`
	ClientID        string   `yaml:"client_id,omitempty"`
	ClientSecret    string   `yaml:"client_secret,omitempty"`
	Scopes          []string `yaml:"scopes,omitempty"`
	RedirectURI     string   `yaml:"redirect_uri,omitempty"`
	CAFile          string   `yaml:"ca_file,omitempty"`
	ClientCertFile  string   `yaml:"client_cert_file,omitempty"`
	ClientKeyFile   string   `yaml:"client_key_file,omitempty"`
	PrivateKeyFile  string   `yaml:"private_key_file,omitempty"`
	Passphrase      string   `yaml:"passphrase,omitempty"`
	Mechanism       string   `yaml:"mechanism,omitempty"`
	Handler         string   `yaml:"handler,omitempty"`
	AccessKeyID     string   `yaml:"access_key_id,omitempty"`
	SecretAccessKey string   `yaml:"secret_access_key,omitempty"`
	Domain          string   `yaml:"domain,omitempty"`
}

type AutoResponseConfig

type AutoResponseConfig struct {
	Enabled     bool   `yaml:"enabled,omitempty"`
	Type        string `yaml:"type,omitempty"`
	SuccessCode string `yaml:"success_code,omitempty"`
	ErrorCode   string `yaml:"error_code,omitempty"`
	RejectCode  string `yaml:"reject_code,omitempty"`
}

type BatchConfig

type BatchConfig struct {
	Enabled        bool   `yaml:"enabled,omitempty"`
	Type           string `yaml:"type,omitempty"`
	SplitOn        string `yaml:"split_on,omitempty"`
	CustomSplitter string `yaml:"custom_splitter,omitempty"`
	MaxBatchSize   int    `yaml:"max_batch_size,omitempty"`
	BatchTimeoutMs int    `yaml:"batch_timeout_ms,omitempty"`
}

type ChannelAssignConfig

type ChannelAssignConfig struct {
	Strategy    string              `mapstructure:"strategy"`
	TagAffinity map[string][]string `mapstructure:"tag_affinity"`
}

type ChannelConfig

type ChannelConfig struct {
	ID      string `yaml:"id"`
	Enabled bool   `yaml:"enabled"`

	Tags     []string `yaml:"tags,omitempty"`
	Group    string   `yaml:"group,omitempty"`
	Priority string   `yaml:"priority,omitempty"`

	DataTypes *DataTypesConfig `yaml:"data_types,omitempty"`
	Listener  ListenerConfig   `yaml:"listener"`

	Pipeline    *PipelineConfig `yaml:"pipeline,omitempty"`
	Validator   *ScriptRef      `yaml:"validator,omitempty"`
	Transformer *ScriptRef      `yaml:"transformer,omitempty"`

	Destinations []ChannelDestination `yaml:"destinations,omitempty"`

	Logging        *ChannelLogging       `yaml:"logging,omitempty"`
	ErrorHandling  *ErrorHandlingConfig  `yaml:"error_handling,omitempty"`
	Lifecycle      *LifecycleConfig      `yaml:"lifecycle,omitempty"`
	MessageStorage *ChannelStorageConfig `yaml:"message_storage,omitempty"`
	Batch          *BatchConfig          `yaml:"batch,omitempty"`
	Attachments    *AttachmentsConfig    `yaml:"attachments,omitempty"`
	Tracing        *TracingConfig        `yaml:"tracing,omitempty"`
	Performance    *PerformanceConfig    `yaml:"performance,omitempty"`
	Pruning        *ChannelPruningConfig `yaml:"pruning,omitempty"`
	DependsOn      []string              `yaml:"depends_on,omitempty"`
	StartupOrder   int                   `yaml:"startup_order,omitempty"`
	CodeTemplates  []string              `yaml:"code_templates,omitempty"`
	AutoResponse   *AutoResponseConfig   `yaml:"auto_response,omitempty"`
}

func LoadChannelConfig

func LoadChannelConfig(channelDir string) (*ChannelConfig, error)

type ChannelDestMapConfig

type ChannelDestMapConfig struct {
	TargetChannelID string `mapstructure:"target_channel_id"`
}

type ChannelDestRef

type ChannelDestRef struct {
	TargetChannelID string `yaml:"target_channel_id"`
}

type ChannelDestination

type ChannelDestination struct {
	Name                string            `yaml:"name,omitempty"`
	Ref                 string            `yaml:"ref,omitempty"`
	Type                string            `yaml:"type,omitempty"`
	HTTP                *HTTPDestConfig   `yaml:"http,omitempty"`
	Kafka               *KafkaDestConfig  `yaml:"kafka,omitempty"`
	TCP                 *TCPDestConfig    `yaml:"tcp,omitempty"`
	File                *FileDestConfig   `yaml:"file,omitempty"`
	Database            *DBDestConfig     `yaml:"database,omitempty"`
	SMTP                *SMTPDestConfig   `yaml:"smtp,omitempty"`
	ChannelDest         *ChannelDestRef   `yaml:"channel,omitempty"`
	DICOM               *DICOMDestConfig  `yaml:"dicom,omitempty"`
	JMS                 *JMSDestConfig    `yaml:"jms,omitempty"`
	FHIR                *FHIRDestConfig   `yaml:"fhir,omitempty"`
	Direct              *DirectDestConfig `yaml:"direct,omitempty"`
	Filter              string            `yaml:"filter,omitempty"`
	TransformerFile     string            `yaml:"transformer,omitempty"`
	ResponseTransformer string            `yaml:"response_transformer,omitempty"`
	Queue               *QueueConfig      `yaml:"queue,omitempty"`
	Retry               *RetryConfig      `yaml:"retry,omitempty"`
}

func (*ChannelDestination) UnmarshalYAML

func (cd *ChannelDestination) UnmarshalYAML(value *yaml.Node) error

type ChannelListener

type ChannelListener struct {
	SourceChannelID string `yaml:"source_channel_id"`
}

type ChannelLogging

type ChannelLogging struct {
	Level      string          `yaml:"level,omitempty"`
	Payloads   *PayloadLogging `yaml:"payloads,omitempty"`
	TruncateAt int             `yaml:"truncate_at,omitempty"`
}

type ChannelPruningConfig

type ChannelPruningConfig struct {
	RetentionDays int  `yaml:"retention_days,omitempty"`
	PruneErrored  bool `yaml:"prune_errored,omitempty"`
}

type ChannelStorageConfig

type ChannelStorageConfig struct {
	Enabled       bool     `yaml:"enabled,omitempty"`
	Mode          string   `yaml:"mode,omitempty"`
	Stages        []string `yaml:"stages,omitempty"`
	ContentTypes  []string `yaml:"content_types,omitempty"`
	RetentionDays int      `yaml:"retention_days,omitempty"`
}

type CloudWatchLogConfig

type CloudWatchLogConfig struct {
	Region    string `mapstructure:"region"`
	LogGroup  string `mapstructure:"log_group"`
	LogStream string `mapstructure:"log_stream"`
}

type ClusterConfig

type ClusterConfig struct {
	Enabled           bool                 `mapstructure:"enabled"`
	Mode              string               `mapstructure:"mode"`
	Coordination      *CoordinationConfig  `mapstructure:"coordination"`
	InstanceID        string               `mapstructure:"instance_id"`
	HeartbeatInterval string               `mapstructure:"heartbeat_interval"`
	ChannelAssignment *ChannelAssignConfig `mapstructure:"channel_assignment"`
	Deduplication     *DeduplicationConfig `mapstructure:"deduplication"`
}

type CodeTemplateLibraryConfig

type CodeTemplateLibraryConfig struct {
	Name      string   `mapstructure:"name"`
	Directory string   `mapstructure:"directory"`
	Channels  []string `mapstructure:"channels,omitempty"`
}

type Config

type Config struct {
	Runtime        RuntimeConfig               `mapstructure:"runtime"`
	ChannelsDir    string                      `mapstructure:"channels_dir"`
	Destinations   map[string]Destination      `mapstructure:"destinations"`
	Kafka          KafkaConfig                 `mapstructure:"kafka"`
	Secrets        *SecretsConfig              `mapstructure:"secrets"`
	DeadLetter     *DeadLetterConfig           `mapstructure:"dead_letter"`
	MessageStorage *MessageStorageConfig       `mapstructure:"message_storage"`
	Pruning        *PruningConfig              `mapstructure:"pruning"`
	Observability  *ObservabilityConfig        `mapstructure:"observability"`
	Logging        *LoggingConfig              `mapstructure:"logging"`
	Alerts         []AlertConfig               `mapstructure:"alerts"`
	AccessControl  *AccessControlConfig        `mapstructure:"access_control"`
	Roles          []RoleConfig                `mapstructure:"roles"`
	Audit          *AuditConfig                `mapstructure:"audit"`
	Cluster        *ClusterConfig              `mapstructure:"cluster"`
	Global         *GlobalConfig               `mapstructure:"global"`
	Tenancy        *TenancyConfig              `mapstructure:"tenancy"`
	Dashboard      *DashboardConfig            `mapstructure:"dashboard"`
	CodeTemplates  []CodeTemplateLibraryConfig `mapstructure:"code_templates"`
}

type CoordinationConfig

type CoordinationConfig struct {
	Type  string       `mapstructure:"type"`
	Redis *RedisConfig `mapstructure:"redis"`
}

type DBDestConfig

type DBDestConfig struct {
	Driver    string `yaml:"driver,omitempty"`
	DSN       string `yaml:"dsn,omitempty"`
	Statement string `yaml:"statement,omitempty"`
}

type DBDestMapConfig

type DBDestMapConfig struct {
	Driver    string `mapstructure:"driver"`
	DSN       string `mapstructure:"dsn"`
	Statement string `mapstructure:"statement"`
	MaxConns  int    `mapstructure:"max_conns"`
}

type DBListener

type DBListener struct {
	Driver               string     `yaml:"driver"`
	DSN                  string     `yaml:"dsn"`
	PollInterval         string     `yaml:"poll_interval,omitempty"`
	Query                string     `yaml:"query,omitempty"`
	PostProcessStatement string     `yaml:"post_process_statement,omitempty"`
	TLS                  *TLSConfig `yaml:"tls,omitempty"`
}

type DICOMDestConfig

type DICOMDestConfig struct {
	Host          string `yaml:"host"`
	Port          int    `yaml:"port,omitempty"`
	AETitle       string `yaml:"ae_title,omitempty"`
	CalledAETitle string `yaml:"called_ae_title,omitempty"`
}

type DICOMDestMapConfig

type DICOMDestMapConfig struct {
	Host          string        `mapstructure:"host"`
	Port          int           `mapstructure:"port"`
	AETitle       string        `mapstructure:"ae_title"`
	CalledAETitle string        `mapstructure:"called_ae_title"`
	TimeoutMs     int           `mapstructure:"timeout_ms"`
	TLS           *TLSMapConfig `mapstructure:"tls"`
}

type DICOMListener

type DICOMListener struct {
	Port            int        `yaml:"port"`
	AETitle         string     `yaml:"ae_title,omitempty"`
	CallingAETitles []string   `yaml:"calling_ae_titles,omitempty"`
	TLS             *TLSConfig `yaml:"tls,omitempty"`
}

type DLQRefConfig

type DLQRefConfig struct {
	Destination string `yaml:"destination,omitempty"`
}

type DashboardAuthConfig

type DashboardAuthConfig struct {
	Provider         string `mapstructure:"provider"`
	Username         string `mapstructure:"username"`
	Password         string `mapstructure:"password"`
	DisableLoginPage bool   `mapstructure:"disable_login_page"`
}

type DashboardConfig

type DashboardConfig struct {
	Enabled bool                 `mapstructure:"enabled"`
	Port    int                  `mapstructure:"port"`
	Auth    *DashboardAuthConfig `mapstructure:"auth"`
}

type DataTypesConfig

type DataTypesConfig struct {
	Inbound            string         `yaml:"inbound,omitempty"`
	Outbound           string         `yaml:"outbound,omitempty"`
	InboundProperties  map[string]any `yaml:"inbound_properties,omitempty"`
	OutboundProperties map[string]any `yaml:"outbound_properties,omitempty"`
}

type DatadogLogConfig

type DatadogLogConfig struct {
	APIKey  string   `mapstructure:"api_key"`
	Site    string   `mapstructure:"site"`
	Service string   `mapstructure:"service"`
	Source  string   `mapstructure:"source"`
	Tags    []string `mapstructure:"tags"`
}

type DeadLetterConfig

type DeadLetterConfig struct {
	Enabled         bool   `mapstructure:"enabled"`
	Destination     string `mapstructure:"destination"`
	IncludeError    bool   `mapstructure:"include_error"`
	IncludeOriginal bool   `mapstructure:"include_original"`
}

type DeduplicationConfig

type DeduplicationConfig struct {
	Enabled      bool   `mapstructure:"enabled"`
	Window       string `mapstructure:"window"`
	Store        string `mapstructure:"store"`
	KeyExtractor string `mapstructure:"key_extractor"`
}

type Destination

type Destination struct {
	Type     string                `mapstructure:"type"`
	Kafka    *KafkaDestConfig      `mapstructure:"kafka"`
	HTTP     *HTTPDestConfig       `mapstructure:"http"`
	TCP      *TCPDestMapConfig     `mapstructure:"tcp"`
	File     *FileDestMapConfig    `mapstructure:"file"`
	SFTP     *SFTPDestMapConfig    `mapstructure:"sftp"`
	Database *DBDestMapConfig      `mapstructure:"database"`
	SMTP     *SMTPDestMapConfig    `mapstructure:"smtp"`
	Channel  *ChannelDestMapConfig `mapstructure:"channel"`
	DICOM    *DICOMDestMapConfig   `mapstructure:"dicom"`
	JMS      *JMSDestMapConfig     `mapstructure:"jms"`
	FHIR     *FHIRDestMapConfig    `mapstructure:"fhir"`
	Direct   *DirectDestMapConfig  `mapstructure:"direct"`
	Retry    *RetryMapConfig       `mapstructure:"retry"`
}

type DirectDestConfig

type DirectDestConfig struct {
	To          string          `yaml:"to,omitempty"`
	From        string          `yaml:"from,omitempty"`
	SMTP        *SMTPDestConfig `yaml:"smtp,omitempty"`
	Certificate string          `yaml:"certificate,omitempty"`
}

type DirectDestMapConfig

type DirectDestMapConfig struct {
	To          string        `mapstructure:"to"`
	From        string        `mapstructure:"from"`
	Certificate string        `mapstructure:"certificate"`
	SMTPHost    string        `mapstructure:"smtp_host"`
	SMTPPort    int           `mapstructure:"smtp_port"`
	TLS         *TLSMapConfig `mapstructure:"tls"`
}

type ElasticsearchLogConfig

type ElasticsearchLogConfig struct {
	URLs     []string `mapstructure:"urls"`
	Index    string   `mapstructure:"index"`
	Username string   `mapstructure:"username"`
	Password string   `mapstructure:"password"`
	APIKey   string   `mapstructure:"api_key"`
}

type EmailListener

type EmailListener struct {
	Protocol        string      `yaml:"protocol,omitempty"`
	Host            string      `yaml:"host"`
	Port            int         `yaml:"port,omitempty"`
	PollInterval    string      `yaml:"poll_interval,omitempty"`
	TLS             *TLSConfig  `yaml:"tls,omitempty"`
	Auth            *AuthConfig `yaml:"auth,omitempty"`
	Folder          string      `yaml:"folder,omitempty"`
	Filter          string      `yaml:"filter,omitempty"`
	ReadAttachments bool        `yaml:"read_attachments,omitempty"`
	DeleteAfterRead bool        `yaml:"delete_after_read,omitempty"`
}

type EncryptionConfig

type EncryptionConfig struct {
	KeyFile   string `mapstructure:"key_file"`
	Algorithm string `mapstructure:"algorithm"`
}

type ErrorHandlingConfig

type ErrorHandlingConfig struct {
	OnError string          `yaml:"on_error,omitempty"`
	DLQ     *DLQRefConfig   `yaml:"dlq,omitempty"`
	Alert   *AlertRefConfig `yaml:"alert,omitempty"`
}

type FHIRDestConfig

type FHIRDestConfig struct {
	BaseURL    string       `yaml:"base_url,omitempty"`
	Version    string       `yaml:"version,omitempty"`
	Auth       *AuthConfig  `yaml:"auth,omitempty"`
	Operations []string     `yaml:"operations,omitempty"`
	Retry      *RetryConfig `yaml:"retry,omitempty"`
}

type FHIRDestMapConfig

type FHIRDestMapConfig struct {
	BaseURL    string          `mapstructure:"base_url"`
	Version    string          `mapstructure:"version"`
	Operations []string        `mapstructure:"operations"`
	Auth       *HTTPAuthConfig `mapstructure:"auth"`
	TLS        *TLSMapConfig   `mapstructure:"tls"`
	TimeoutMs  int             `mapstructure:"timeout_ms"`
}

type FHIRListener

type FHIRListener struct {
	Port             int         `yaml:"port"`
	BasePath         string      `yaml:"base_path,omitempty"`
	Version          string      `yaml:"version,omitempty"`
	Resources        []string    `yaml:"resources,omitempty"`
	SubscriptionType string      `yaml:"subscription_type,omitempty"`
	TLS              *TLSConfig  `yaml:"tls,omitempty"`
	Auth             *AuthConfig `yaml:"auth,omitempty"`
}

type FTPConfig

type FTPConfig struct {
	Host string      `yaml:"host"`
	Port int         `yaml:"port,omitempty"`
	Auth *AuthConfig `yaml:"auth,omitempty"`
}

type FileDestConfig

type FileDestConfig struct {
	Scheme          string        `yaml:"scheme,omitempty"`
	Directory       string        `yaml:"directory,omitempty"`
	FilenamePattern string        `yaml:"filename_pattern,omitempty"`
	SFTP            *SFTPListener `yaml:"sftp,omitempty"`
}

type FileDestMapConfig

type FileDestMapConfig struct {
	Scheme          string `mapstructure:"scheme"`
	Directory       string `mapstructure:"directory"`
	FilenamePattern string `mapstructure:"filename_pattern"`
}

type FileListener

type FileListener struct {
	Scheme       string     `yaml:"scheme,omitempty"`
	Directory    string     `yaml:"directory,omitempty"`
	FilePattern  string     `yaml:"file_pattern,omitempty"`
	PollInterval string     `yaml:"poll_interval,omitempty"`
	MoveTo       string     `yaml:"move_to,omitempty"`
	ErrorDir     string     `yaml:"error_dir,omitempty"`
	SortBy       string     `yaml:"sort_by,omitempty"`
	FTP          *FTPConfig `yaml:"ftp,omitempty"`
	S3           *S3Config  `yaml:"s3,omitempty"`
	SMB          *SMBConfig `yaml:"smb,omitempty"`
}

type FileLogConfig

type FileLogConfig struct {
	Path      string `mapstructure:"path"`
	MaxSizeMB int    `mapstructure:"max_size_mb"`
	MaxFiles  int    `mapstructure:"max_files"`
	Compress  bool   `mapstructure:"compress"`
}

type GCPSecretManagerConfig

type GCPSecretManagerConfig struct {
	ProjectID       string `mapstructure:"project_id"`
	CredentialsFile string `mapstructure:"credentials_file"`
	CacheTTL        string `mapstructure:"cache_ttl"`
}

type GlobalConfig

type GlobalConfig struct {
	Hooks *GlobalHooks `mapstructure:"hooks"`
}

type GlobalHooks

type GlobalHooks struct {
	OnStartup   string `mapstructure:"on_startup"`
	OnShutdown  string `mapstructure:"on_shutdown"`
	OnDeployAll string `mapstructure:"on_deploy_all"`
}

type HTTPAuthConfig

type HTTPAuthConfig struct {
	Type           string   `mapstructure:"type"`
	Token          string   `mapstructure:"token"`
	Username       string   `mapstructure:"username"`
	Password       string   `mapstructure:"password"`
	Key            string   `mapstructure:"key"`
	Header         string   `mapstructure:"header"`
	QueryParam     string   `mapstructure:"query_param"`
	TokenURL       string   `mapstructure:"token_url"`
	ClientID       string   `mapstructure:"client_id"`
	ClientSecret   string   `mapstructure:"client_secret"`
	Scopes         []string `mapstructure:"scopes"`
	PrivateKeyFile string   `mapstructure:"private_key_file"`
	Passphrase     string   `mapstructure:"passphrase"`
}

type HTTPDestConfig

type HTTPDestConfig struct {
	URL       string            `mapstructure:"url"`
	Method    string            `mapstructure:"method"`
	Headers   map[string]string `mapstructure:"headers"`
	TimeoutMs int               `mapstructure:"timeout_ms"`
	Auth      *HTTPAuthConfig   `mapstructure:"auth"`
	TLS       *TLSMapConfig     `mapstructure:"tls"`
}

type HTTPListener

type HTTPListener struct {
	Port    int         `yaml:"port"`
	Path    string      `yaml:"path,omitempty"`
	Methods []string    `yaml:"methods,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
}

type HealthConfig

type HealthConfig struct {
	Port          int    `mapstructure:"port"`
	Path          string `mapstructure:"path"`
	ReadinessPath string `mapstructure:"readiness_path"`
	LivenessPath  string `mapstructure:"liveness_path"`
}

type IHEListener

type IHEListener struct {
	Profile string      `yaml:"profile"`
	Port    int         `yaml:"port"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
}

type JMSDestConfig

type JMSDestConfig struct {
	Provider string      `yaml:"provider,omitempty"`
	URL      string      `yaml:"url,omitempty"`
	Queue    string      `yaml:"queue,omitempty"`
	Auth     *AuthConfig `yaml:"auth,omitempty"`
}

type JMSDestMapConfig

type JMSDestMapConfig struct {
	Provider  string          `mapstructure:"provider"`
	URL       string          `mapstructure:"url"`
	Queue     string          `mapstructure:"queue"`
	Auth      *HTTPAuthConfig `mapstructure:"auth"`
	TimeoutMs int             `mapstructure:"timeout_ms"`
}

type KafkaConfig

type KafkaConfig struct {
	Brokers  []string `mapstructure:"brokers"`
	ClientID string   `mapstructure:"client_id"`
}

type KafkaDestConfig

type KafkaDestConfig struct {
	Brokers  []string        `mapstructure:"brokers"`
	Topic    string          `mapstructure:"topic"`
	ClientID string          `mapstructure:"client_id"`
	Auth     *HTTPAuthConfig `mapstructure:"auth"`
	TLS      *TLSMapConfig   `mapstructure:"tls"`
}

type KafkaListener

type KafkaListener struct {
	Brokers []string    `yaml:"brokers,omitempty"`
	Topic   string      `yaml:"topic"`
	GroupID string      `yaml:"group_id,omitempty"`
	Offset  string      `yaml:"offset,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
}

type LDAPConfig

type LDAPConfig struct {
	URL          string `mapstructure:"url"`
	BaseDN       string `mapstructure:"base_dn"`
	BindDN       string `mapstructure:"bind_dn"`
	BindPassword string `mapstructure:"bind_password"`
}

type LifecycleConfig

type LifecycleConfig struct {
	OnDeploy   string `yaml:"on_deploy,omitempty"`
	OnUndeploy string `yaml:"on_undeploy,omitempty"`
}

type ListenerConfig

type ListenerConfig struct {
	Type     string           `yaml:"type"`
	HTTP     *HTTPListener    `yaml:"http,omitempty"`
	TCP      *TCPListener     `yaml:"tcp,omitempty"`
	SFTP     *SFTPListener    `yaml:"sftp,omitempty"`
	File     *FileListener    `yaml:"file,omitempty"`
	Database *DBListener      `yaml:"database,omitempty"`
	Kafka    *KafkaListener   `yaml:"kafka,omitempty"`
	Channel  *ChannelListener `yaml:"channel,omitempty"`
	Email    *EmailListener   `yaml:"email,omitempty"`
	DICOM    *DICOMListener   `yaml:"dicom,omitempty"`
	SOAP     *SOAPListener    `yaml:"soap,omitempty"`
	FHIR     *FHIRListener    `yaml:"fhir,omitempty"`
	IHE      *IHEListener     `yaml:"ihe,omitempty"`
}

type Loader

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

func NewLoader

func NewLoader(root string) *Loader

func (*Loader) Load

func (l *Loader) Load(profile string) (*Config, error)

type LogTransportConfig

type LogTransportConfig struct {
	Type          string                  `mapstructure:"type"`
	CloudWatch    *CloudWatchLogConfig    `mapstructure:"cloudwatch"`
	Datadog       *DatadogLogConfig       `mapstructure:"datadog"`
	SumoLogic     *SumoLogicLogConfig     `mapstructure:"sumologic"`
	Elasticsearch *ElasticsearchLogConfig `mapstructure:"elasticsearch"`
	File          *FileLogConfig          `mapstructure:"file"`
}

type LoggingConfig

type LoggingConfig struct {
	Transports []LogTransportConfig `mapstructure:"transports"`
}

type MessageStorageConfig

type MessageStorageConfig struct {
	Driver    string                  `mapstructure:"driver"`
	Mode      string                  `mapstructure:"mode"`
	Stages    []string                `mapstructure:"stages"`
	Postgres  *StoragePostgresConfig  `mapstructure:"postgres"`
	S3        *StorageS3Config        `mapstructure:"s3"`
	Retention *StorageRetentionConfig `mapstructure:"retention"`
}

type OIDCConfig

type OIDCConfig struct {
	Issuer       string `mapstructure:"issuer"`
	ClientID     string `mapstructure:"client_id"`
	ClientSecret string `mapstructure:"client_secret"`
}

type OTelConfig

type OTelConfig struct {
	Enabled            bool              `mapstructure:"enabled"`
	Endpoint           string            `mapstructure:"endpoint"`
	Protocol           string            `mapstructure:"protocol"`
	Traces             bool              `mapstructure:"traces"`
	Metrics            bool              `mapstructure:"metrics"`
	ServiceName        string            `mapstructure:"service_name"`
	ResourceAttributes map[string]string `mapstructure:"resource_attributes"`
}

type ObservabilityConfig

type ObservabilityConfig struct {
	OpenTelemetry *OTelConfig       `mapstructure:"opentelemetry"`
	Prometheus    *PrometheusConfig `mapstructure:"prometheus"`
}

type PayloadLogging

type PayloadLogging struct {
	Source      bool `yaml:"source,omitempty"`
	Transformed bool `yaml:"transformed,omitempty"`
	Sent        bool `yaml:"sent,omitempty"`
	Response    bool `yaml:"response,omitempty"`
	Filtered    bool `yaml:"filtered,omitempty"`
}

type PerformanceConfig

type PerformanceConfig struct {
	ZeroCopy         bool `yaml:"zero_copy,omitempty"`
	SyncDestinations bool `yaml:"sync_destinations,omitempty"`
}

type PipelineConfig

type PipelineConfig struct {
	Preprocessor  string `yaml:"preprocessor,omitempty"`
	Validator     string `yaml:"validator,omitempty"`
	SourceFilter  string `yaml:"source_filter,omitempty"`
	Transformer   string `yaml:"transformer,omitempty"`
	Postprocessor string `yaml:"postprocessor,omitempty"`
}

type PrometheusConfig

type PrometheusConfig struct {
	Enabled bool   `mapstructure:"enabled"`
	Port    int    `mapstructure:"port"`
	Path    string `mapstructure:"path"`
}

type PruningConfig

type PruningConfig struct {
	Enabled              bool   `mapstructure:"enabled"`
	Schedule             string `mapstructure:"schedule"`
	DefaultRetentionDays int    `mapstructure:"default_retention_days"`
	ArchiveBeforePrune   bool   `mapstructure:"archive_before_prune"`
	ArchiveDestination   string `mapstructure:"archive_destination"`
}

type QueueConfig

type QueueConfig struct {
	Enabled  bool   `yaml:"enabled,omitempty"`
	MaxSize  int    `yaml:"max_size,omitempty"`
	Overflow string `yaml:"overflow,omitempty"`
	Persist  bool   `yaml:"persist,omitempty"`
	Threads  int    `yaml:"threads,omitempty"`
}

type RedisConfig

type RedisConfig struct {
	Address      string        `mapstructure:"address"`
	Password     string        `mapstructure:"password"`
	DB           int           `mapstructure:"db"`
	PoolSize     int           `mapstructure:"pool_size"`
	MinIdleConns int           `mapstructure:"min_idle_conns"`
	TLS          *TLSMapConfig `mapstructure:"tls"`
	KeyPrefix    string        `mapstructure:"key_prefix"`
}

type ResponseConfig

type ResponseConfig struct {
	OnSuccess           string `yaml:"on_success,omitempty"`
	OnError             string `yaml:"on_error,omitempty"`
	OnFilterDrop        string `yaml:"on_filter_drop,omitempty"`
	WaitForDestinations bool   `yaml:"wait_for_destinations,omitempty"`
}

type RetryConfig

type RetryConfig struct {
	MaxAttempts    int      `yaml:"max_attempts,omitempty"`
	Backoff        string   `yaml:"backoff,omitempty"`
	InitialDelayMs int      `yaml:"initial_delay_ms,omitempty"`
	MaxDelayMs     int      `yaml:"max_delay_ms,omitempty"`
	Jitter         bool     `yaml:"jitter,omitempty"`
	RetryOn        []string `yaml:"retry_on,omitempty"`
	NoRetryOn      []string `yaml:"no_retry_on,omitempty"`
}

type RetryMapConfig

type RetryMapConfig struct {
	MaxAttempts    int      `mapstructure:"max_attempts"`
	Backoff        string   `mapstructure:"backoff"`
	InitialDelayMs int      `mapstructure:"initial_delay_ms"`
	MaxDelayMs     int      `mapstructure:"max_delay_ms"`
	Jitter         bool     `mapstructure:"jitter"`
	RetryOn        []string `mapstructure:"retry_on"`
	NoRetryOn      []string `mapstructure:"no_retry_on"`
}

type RoleConfig

type RoleConfig struct {
	Name        string   `mapstructure:"name"`
	Permissions []string `mapstructure:"permissions"`
}

type RuntimeConfig

type RuntimeConfig struct {
	Name       string            `mapstructure:"name"`
	Profile    string            `mapstructure:"profile"`
	LogLevel   string            `mapstructure:"log_level"`
	Mode       string            `mapstructure:"mode"`
	Storage    StorageConfig     `mapstructure:"storage"`
	Encryption *EncryptionConfig `mapstructure:"encryption"`
	Health     *HealthConfig     `mapstructure:"health"`
	JSRuntime  string            `mapstructure:"js_runtime"`
	WorkerPool int               `mapstructure:"worker_pool"`
}

type S3Config

type S3Config struct {
	Bucket string      `yaml:"bucket"`
	Region string      `yaml:"region,omitempty"`
	Prefix string      `yaml:"prefix,omitempty"`
	Auth   *AuthConfig `yaml:"auth,omitempty"`
}

type SFTPDestMapConfig

type SFTPDestMapConfig struct {
	Host            string          `mapstructure:"host"`
	Port            int             `mapstructure:"port"`
	Directory       string          `mapstructure:"directory"`
	FilenamePattern string          `mapstructure:"filename_pattern"`
	Auth            *HTTPAuthConfig `mapstructure:"auth"`
}

type SFTPListener

type SFTPListener struct {
	Host         string      `yaml:"host"`
	Port         int         `yaml:"port,omitempty"`
	PollInterval string      `yaml:"poll_interval,omitempty"`
	Directory    string      `yaml:"directory,omitempty"`
	FilePattern  string      `yaml:"file_pattern,omitempty"`
	MoveTo       string      `yaml:"move_to,omitempty"`
	ErrorDir     string      `yaml:"error_dir,omitempty"`
	Auth         *AuthConfig `yaml:"auth,omitempty"`
	SortBy       string      `yaml:"sort_by,omitempty"`
}

type SMBConfig

type SMBConfig struct {
	Host string      `yaml:"host"`
	Auth *AuthConfig `yaml:"auth,omitempty"`
}

type SMTPDestConfig

type SMTPDestConfig struct {
	Host    string      `yaml:"host"`
	Port    int         `yaml:"port,omitempty"`
	From    string      `yaml:"from,omitempty"`
	To      []string    `yaml:"to,omitempty"`
	Subject string      `yaml:"subject,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
}

type SMTPDestMapConfig

type SMTPDestMapConfig struct {
	Host    string          `mapstructure:"host"`
	Port    int             `mapstructure:"port"`
	From    string          `mapstructure:"from"`
	To      []string        `mapstructure:"to"`
	Subject string          `mapstructure:"subject"`
	Auth    *HTTPAuthConfig `mapstructure:"auth"`
	TLS     *TLSMapConfig   `mapstructure:"tls"`
}

type SOAPListener

type SOAPListener struct {
	Port        int         `yaml:"port"`
	WSDLPath    string      `yaml:"wsdl_path,omitempty"`
	ServiceName string      `yaml:"service_name,omitempty"`
	TLS         *TLSConfig  `yaml:"tls,omitempty"`
	Auth        *AuthConfig `yaml:"auth,omitempty"`
}

type ScriptRef

type ScriptRef struct {
	Runtime    string `yaml:"runtime,omitempty"`
	Entrypoint string `yaml:"entrypoint,omitempty"`
}

type SecretsConfig

type SecretsConfig struct {
	Provider string                   `mapstructure:"provider"`
	Vault    *VaultConfig             `mapstructure:"vault"`
	AWS      *AWSSecretsManagerConfig `mapstructure:"aws"`
	GCP      *GCPSecretManagerConfig  `mapstructure:"gcp"`
}

type StorageConfig

type StorageConfig struct {
	Driver      string `mapstructure:"driver"`
	PostgresDSN string `mapstructure:"postgres_dsn"`
}

type StoragePostgresConfig

type StoragePostgresConfig struct {
	DSN          string `mapstructure:"dsn"`
	TablePrefix  string `mapstructure:"table_prefix"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
}

type StorageRetentionConfig

type StorageRetentionConfig struct {
	Days                 int    `mapstructure:"days"`
	PruneInterval        string `mapstructure:"prune_interval"`
	PruneErrored         bool   `mapstructure:"prune_errored"`
	ErroredRetentionDays int    `mapstructure:"errored_retention_days"`
}

type StorageS3Config

type StorageS3Config struct {
	Bucket   string `mapstructure:"bucket"`
	Region   string `mapstructure:"region"`
	Prefix   string `mapstructure:"prefix"`
	Endpoint string `mapstructure:"endpoint"`
}

type SumoLogicLogConfig

type SumoLogicLogConfig struct {
	Endpoint       string `mapstructure:"endpoint"`
	SourceCategory string `mapstructure:"source_category"`
	SourceName     string `mapstructure:"source_name"`
}

type TCPDestConfig

type TCPDestConfig struct {
	Host      string     `yaml:"host"`
	Port      int        `yaml:"port"`
	Mode      string     `yaml:"mode,omitempty"`
	TimeoutMs int        `yaml:"timeout_ms,omitempty"`
	TLS       *TLSConfig `yaml:"tls,omitempty"`
}

type TCPDestMapConfig

type TCPDestMapConfig struct {
	Host      string        `mapstructure:"host"`
	Port      int           `mapstructure:"port"`
	Mode      string        `mapstructure:"mode"`
	TimeoutMs int           `mapstructure:"timeout_ms"`
	TLS       *TLSMapConfig `mapstructure:"tls"`
	KeepAlive bool          `mapstructure:"keep_alive"`
}

type TCPListener

type TCPListener struct {
	Port           int             `yaml:"port"`
	Mode           string          `yaml:"mode,omitempty"`
	MaxConnections int             `yaml:"max_connections,omitempty"`
	TimeoutMs      int             `yaml:"timeout_ms,omitempty"`
	TLS            *TLSConfig      `yaml:"tls,omitempty"`
	ACK            *ACKConfig      `yaml:"ack,omitempty"`
	Response       *ResponseConfig `yaml:"response,omitempty"`
}

type TLSConfig

type TLSConfig struct {
	Enabled            bool   `yaml:"enabled,omitempty"`
	CertFile           string `yaml:"cert_file,omitempty"`
	KeyFile            string `yaml:"key_file,omitempty"`
	CAFile             string `yaml:"ca_file,omitempty"`
	ClientCertFile     string `yaml:"client_cert_file,omitempty"`
	ClientKeyFile      string `yaml:"client_key_file,omitempty"`
	MinVersion         string `yaml:"min_version,omitempty"`
	ClientAuth         string `yaml:"client_auth,omitempty"`
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify,omitempty"`
}

type TLSMapConfig

type TLSMapConfig struct {
	Enabled            bool   `mapstructure:"enabled"`
	CertFile           string `mapstructure:"cert_file"`
	KeyFile            string `mapstructure:"key_file"`
	CAFile             string `mapstructure:"ca_file"`
	ClientCertFile     string `mapstructure:"client_cert_file"`
	ClientKeyFile      string `mapstructure:"client_key_file"`
	MinVersion         string `mapstructure:"min_version"`
	InsecureSkipVerify bool   `mapstructure:"insecure_skip_verify"`
}

type TenancyConfig

type TenancyConfig struct {
	Mode         string `mapstructure:"mode"`
	Isolation    string `mapstructure:"isolation"`
	TenantHeader string `mapstructure:"tenant_header"`
}

type TracingConfig

type TracingConfig struct {
	CorrelationIDHeader string `yaml:"correlation_id_header,omitempty"`
	Propagate           bool   `yaml:"propagate,omitempty"`
}

type VaultAuthConfig

type VaultAuthConfig struct {
	Type     string `mapstructure:"type"`
	RoleID   string `mapstructure:"role_id"`
	SecretID string `mapstructure:"secret_id"`
}

type VaultConfig

type VaultConfig struct {
	Address string           `mapstructure:"address"`
	Path    string           `mapstructure:"path"`
	Auth    *VaultAuthConfig `mapstructure:"auth"`
}

Jump to

Keyboard shortcuts

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