Documentation
¶
Index ¶
- Constants
- func ElementText(xmlElement *xmlquery.Node, elmntPath string) (string, error)
- func NMAsCGREvent(nM *utils.OrderedNavigableMap, tnt string, pathSep string) (cgrEv *utils.CGREvent)
- func NewFWVProvider(record string) (dP utils.DataProvider)
- func NewObjectDP(obj any, prfxSls []string) (dP utils.DataProvider)
- func NewRjReader(rdr io.Reader) (r *rjReader, err error)
- func NewRjReaderFromBytes(b []byte) *rjReader
- func NewSliceDP(record []string) (dP utils.DataProvider)
- func NewXmlProvider(req *xmlquery.Node, cdrPath utils.HierarchyPath) (dP utils.DataProvider)
- func ReadEnv(key string) (string, error)
- func SetCgrConfig(cfg *CGRConfig)
- type AnalyzerSCfg
- type AnalyzerSJsonCfg
- type ApierCfg
- type ApierJsonCfg
- type AstConnJsonCfg
- type AsteriskAgentCfg
- type AsteriskAgentJsonCfg
- type AsteriskConnCfg
- type AttributeSCfg
- type AttributeSJsonCfg
- type CGRConfig
- func (cfg *CGRConfig) AnalyzerSCfg() *AnalyzerSCfg
- func (cfg *CGRConfig) ApierCfg() *ApierCfg
- func (cfg *CGRConfig) AsMapInterface(separator string) map[string]any
- func (cfg *CGRConfig) AsteriskAgentCfg() *AsteriskAgentCfg
- func (cfg *CGRConfig) AttributeSCfg() *AttributeSCfg
- func (cfg *CGRConfig) CacheCfg() CacheCfg
- func (cfg *CGRConfig) Call(serviceMethod string, args any, reply any) error
- func (cfg *CGRConfig) CdrsCfg() *CdrsCfg
- func (cfg *CGRConfig) ChargerSCfg() *ChargerSCfg
- func (cfg *CGRConfig) CheckConfigSanity() error
- func (cfg *CGRConfig) DNSAgentCfg() *DNSAgentCfg
- func (cfg *CGRConfig) DataDbCfg() *DataDbCfg
- func (cfg *CGRConfig) DiameterAgentCfg() *DiameterAgentCfg
- func (cfg *CGRConfig) DispatcherSCfg() *DispatcherSCfg
- func (cfg *CGRConfig) ERsCfg() *ERsCfg
- func (cfg *CGRConfig) FilterSCfg() *FilterSCfg
- func (cfg *CGRConfig) FsAgentCfg() *FsAgentCfg
- func (cfg *CGRConfig) GeneralCfg() *GeneralCfg
- func (cfg *CGRConfig) GetReloadChan(sectID string) chan struct{}
- func (cfg *CGRConfig) HTTPCfg() *HTTPCfg
- func (cfg *CGRConfig) HttpAgentCfg() []*HttpAgentCfg
- func (cfg *CGRConfig) KamAgentCfg() *KamAgentCfg
- func (cfg *CGRConfig) LazySanityCheck()
- func (cfg *CGRConfig) ListenCfg() *ListenCfg
- func (cfg *CGRConfig) LoaderCfg() LoaderSCfgs
- func (cfg *CGRConfig) LoaderCgrCfg() *LoaderCgrCfg
- func (cfg *CGRConfig) MailerCfg() *MailerCfg
- func (cfg *CGRConfig) MigratorCgrCfg() *MigratorCgrCfg
- func (cfg *CGRConfig) RPCConns() map[string]*RPCConn
- func (cfg *CGRConfig) RadiusAgentCfg() *RadiusAgentCfg
- func (cfg *CGRConfig) RalsCfg() *RalsCfg
- func (cfg *CGRConfig) ResourceSCfg() *ResourceSConfig
- func (cfg *CGRConfig) SchedulerCfg() *SchedulerCfg
- func (cfg *CGRConfig) SessionSCfg() *SessionSCfg
- func (cfg *CGRConfig) StatSCfg() *StatSCfg
- func (cfg *CGRConfig) StorDbCfg() *StorDbCfg
- func (cfg *CGRConfig) SupplierSCfg() *SupplierSCfg
- func (cfg *CGRConfig) SureTaxCfg() *SureTaxCfg
- func (cfg *CGRConfig) ThresholdSCfg() *ThresholdSCfg
- func (cfg *CGRConfig) TlsCfg() *TlsCfg
- func (cfg *CGRConfig) V1GetConfigSection(args *StringWithArgDispatcher, reply *map[string]any) (err error)
- func (cfg *CGRConfig) V1ReloadConfigFromJSON(args *JSONReloadWithArgDispatcher, reply *string) (err error)
- func (cfg *CGRConfig) V1ReloadConfigFromPath(args *ConfigReloadWithArgDispatcher, reply *string) (err error)
- type CacheCfg
- type CacheJsonCfg
- type CacheParamCfg
- type CacheParamJsonCfg
- type CdreCfg
- type CdreJsonCfg
- type CdrsCfg
- type CdrsJsonCfg
- type CgrJsonCfg
- func (self CgrJsonCfg) AnalyzerCfgJson() (*AnalyzerSJsonCfg, error)
- func (self CgrJsonCfg) ApierCfgJson() (*ApierJsonCfg, error)
- func (self CgrJsonCfg) AsteriskAgentJsonCfg() (*AsteriskAgentJsonCfg, error)
- func (cgrJsn CgrJsonCfg) AttributeServJsonCfg() (*AttributeSJsonCfg, error)
- func (self CgrJsonCfg) CacheJsonCfg() (*CacheJsonCfg, error)
- func (self CgrJsonCfg) CdreJsonCfgs() (map[string]*CdreJsonCfg, error)
- func (self CgrJsonCfg) CdrsJsonCfg() (*CdrsJsonCfg, error)
- func (cgrJsn CgrJsonCfg) ChargerServJsonCfg() (*ChargerSJsonCfg, error)
- func (self CgrJsonCfg) DNSAgentJsonCfg() (da *DNSAgentJsonCfg, err error)
- func (self CgrJsonCfg) DbJsonCfg(section string) (*DbJsonCfg, error)
- func (self CgrJsonCfg) DiameterAgentJsonCfg() (*DiameterAgentJsonCfg, error)
- func (self CgrJsonCfg) DispatcherSJsonCfg() (*DispatcherSJsonCfg, error)
- func (self CgrJsonCfg) ERsJsonCfg() (erSCfg *ERsJsonCfg, err error)
- func (jsnCfg CgrJsonCfg) FilterSJsonCfg() (*FilterSJsonCfg, error)
- func (self CgrJsonCfg) FreeswitchAgentJsonCfg() (*FreeswitchAgentJsonCfg, error)
- func (self CgrJsonCfg) GeneralJsonCfg() (*GeneralJsonCfg, error)
- func (self CgrJsonCfg) HttpAgentJsonCfg() (*[]*HttpAgentJsonCfg, error)
- func (self CgrJsonCfg) HttpJsonCfg() (*HTTPJsonCfg, error)
- func (self CgrJsonCfg) KamAgentJsonCfg() (*KamAgentJsonCfg, error)
- func (self CgrJsonCfg) ListenJsonCfg() (*ListenJsonCfg, error)
- func (self CgrJsonCfg) LoaderCfgJson() (*LoaderCfgJson, error)
- func (self CgrJsonCfg) LoaderJsonCfg() ([]*LoaderJsonCfg, error)
- func (self CgrJsonCfg) MailerJsonCfg() (*MailerJsonCfg, error)
- func (self CgrJsonCfg) MigratorCfgJson() (*MigratorCfgJson, error)
- func (self CgrJsonCfg) RPCConnJsonCfg() (map[string]*RPCConnsJson, error)
- func (self CgrJsonCfg) RadiusAgentJsonCfg() (*RadiusAgentJsonCfg, error)
- func (self CgrJsonCfg) RalsJsonCfg() (*RalsJsonCfg, error)
- func (self CgrJsonCfg) ResourceSJsonCfg() (*ResourceSJsonCfg, error)
- func (self CgrJsonCfg) SchedulerJsonCfg() (*SchedulerJsonCfg, error)
- func (self CgrJsonCfg) SessionSJsonCfg() (*SessionSJsonCfg, error)
- func (self CgrJsonCfg) StatSJsonCfg() (*StatServJsonCfg, error)
- func (self CgrJsonCfg) SupplierSJsonCfg() (*SupplierSJsonCfg, error)
- func (self CgrJsonCfg) SureTaxJsonCfg() (*SureTaxJsonCfg, error)
- func (self CgrJsonCfg) ThresholdSJsonCfg() (*ThresholdSJsonCfg, error)
- func (self CgrJsonCfg) TlsCfgJson() (*TlsJsonCfg, error)
- type ChargerSCfg
- type ChargerSJsonCfg
- type ConfigReloadWithArgDispatcher
- type DNSAgentCfg
- type DNSAgentJsonCfg
- type DataDbCfg
- type DbJsonCfg
- type DiameterAgentCfg
- type DiameterAgentJsonCfg
- type DispatcherSCfg
- type DispatcherSJsonCfg
- type ERsCfg
- type ERsJsonCfg
- type EventReaderCfg
- type EventReaderJsonCfg
- type FCTemplate
- func FCTemplatesFromFCTemplatesJsonCfg(jsnCfgFlds []*FcTemplateJsonCfg, separator string) ([]*FCTemplate, error)
- func InflateTemplates(fcts []*FCTemplate, msgTpls map[string][]*FCTemplate) ([]*FCTemplate, error)
- func NewFCTemplateFromFCTemplateJsonCfg(jsnCfg *FcTemplateJsonCfg, separator string) (*FCTemplate, error)
- type FWVProvider
- type FcTemplateJsonCfg
- type FilterSCfg
- type FilterSJsonCfg
- type FreeswitchAgentJsonCfg
- type FsAgentCfg
- type FsConnCfg
- type FsConnJsonCfg
- type GeneralCfg
- type GeneralJsonCfg
- type HTTPCfg
- type HTTPJsonCfg
- type HttpAgentCfg
- type HttpAgentCfgs
- type HttpAgentJsonCfg
- type ItemOpt
- type ItemOptJson
- type JSONReloadWithArgDispatcher
- type KamAgentCfg
- type KamAgentJsonCfg
- type KamConnCfg
- type KamConnJsonCfg
- type ListenCfg
- type ListenJsonCfg
- type LoaderCfgJson
- type LoaderCgrCfg
- type LoaderDataType
- type LoaderJsonCfg
- type LoaderJsonDataType
- type LoaderSCfg
- type LoaderSCfgs
- type MailerCfg
- type MailerJsonCfg
- type MigratorCfgJson
- type MigratorCgrCfg
- type NMItem
- func (nmi *NMItem) Empty() bool
- func (nmi *NMItem) Field(path utils.PathItems) (val utils.NMInterface, err error)
- func (nmi *NMItem) Interface() any
- func (nmi *NMItem) Len() int
- func (nmi *NMItem) Remove(path utils.PathItems) (err error)
- func (nmi *NMItem) Set(path utils.PathItems, val utils.NMInterface) (added bool, err error)
- func (nmi *NMItem) String() string
- func (nmi *NMItem) Type() utils.NMType
- type ObjectDP
- type OsipsConnJsonCfg
- type RPCConn
- type RPCConnsJson
- type RSRParser
- func (prsr *RSRParser) AttrName() string
- func (prsr *RSRParser) Compile() (err error)
- func (prsr *RSRParser) ParseDataProvider(dP utils.DataProvider, separator string) (out string, err error)
- func (prsr *RSRParser) ParseDataProviderAsFloat64(dP utils.DataProvider, separator string) (float64, error)
- func (prsr *RSRParser) ParseDataProviderWithInterfaces(dP utils.DataProvider, separator string) (out string, err error)
- func (prsr *RSRParser) ParseValue(value any) (out string, err error)
- func (prsr *RSRParser) RegexpMatched() bool
- type RSRParsers
- func NewRSRParsers(parsersRules string, allFiltersMatch bool, rsrSeparator string) (prsrs RSRParsers, err error)
- func NewRSRParsersFromSlice(parsersRules []string, allFiltersMatch bool) (prsrs RSRParsers, err error)
- func NewRSRParsersMustCompile(parsersRules string, allFiltersMatch bool, rsrSeparator string) (prsrs RSRParsers)
- func (prsrs RSRParsers) Compile() (err error)
- func (prsrs RSRParsers) GetRule() (out string)
- func (prsrs RSRParsers) ParseDataProvider(dP utils.DataProvider, separator string) (out string, err error)
- func (prsrs RSRParsers) ParseDataProviderWithInterfaces(dP utils.DataProvider, separator string) (out string, err error)
- func (prsrs RSRParsers) ParseValue(value any) (out string, err error)
- type RadiusAgentCfg
- type RadiusAgentJsonCfg
- type RalsCfg
- type RalsJsonCfg
- type RemoteHost
- type RemoteHostJson
- type ReqProcessorJsnCfg
- type RequestProcessor
- type ResourceSConfig
- type ResourceSJsonCfg
- type SchedulerCfg
- type SchedulerJsonCfg
- type SessionSCfg
- type SessionSJsonCfg
- type SliceDP
- type StatSCfg
- type StatServJsonCfg
- type StorDbCfg
- type StringWithArgDispatcher
- type SupplierSCfg
- type SupplierSJsonCfg
- type SureTaxCfg
- type SureTaxJsonCfg
- type ThresholdSCfg
- type ThresholdSJsonCfg
- type TlsCfg
- type TlsJsonCfg
- type XMLElement
- type XmlProvider
Constants ¶
const ( GENERAL_JSN = "general" CACHE_JSN = "caches" LISTEN_JSN = "listen" HTTP_JSN = "http" DATADB_JSN = "data_db" STORDB_JSN = "stor_db" FilterSjsn = "filters" RALS_JSN = "rals" SCHEDULER_JSN = "schedulers" CDRS_JSN = "cdrs" CDRE_JSN = "cdre" SessionSJson = "sessions" FreeSWITCHAgentJSN = "freeswitch_agent" KamailioAgentJSN = "kamailio_agent" AsteriskAgentJSN = "asterisk_agent" DA_JSN = "diameter_agent" RA_JSN = "radius_agent" HttpAgentJson = "http_agent" ATTRIBUTE_JSN = "attributes" RESOURCES_JSON = "resources" STATS_JSON = "stats" THRESHOLDS_JSON = "thresholds" SupplierSJson = "suppliers" LoaderJson = "loaders" MAILER_JSN = "mailer" SURETAX_JSON = "suretax" DispatcherSJson = "dispatchers" CgrLoaderCfgJson = "loader" CgrMigratorCfgJson = "migrator" ChargerSCfgJson = "chargers" TlsCfgJson = "tls" AnalyzerCfgJson = "analyzers" ApierS = "apiers" DNSAgentJson = "dns_agent" ERsJson = "ers" RPCConnsJsonName = "rpc_conns" )
const CGRATES_CFG_JSON = `` /* 51186-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ElementText ¶
ElementText will process the node to extract the elementName's text out of it (only first one found) returns utils.ErrNotFound if the element is not found in the node Make the method exportable until we remove the ers
func NMAsCGREvent ¶ added in v0.10.1
func NMAsCGREvent(nM *utils.OrderedNavigableMap, tnt string, pathSep string) (cgrEv *utils.CGREvent)
NMAsCGREvent builds a CGREvent considering Time as time.Now() and Event as linear map[string]any with joined paths treats particular case when the value of map is []*NMItem - used in agents/AgentRequest
func NewFWVProvider ¶
func NewFWVProvider(record string) (dP utils.DataProvider)
NewfwvProvider constructs a utils.DataProvider
func NewObjectDP ¶
func NewObjectDP(obj any, prfxSls []string) (dP utils.DataProvider)
NewObjectDP constructs a DataProvider
func NewRjReader ¶
creates a new rjReader from a io.Reader
func NewRjReaderFromBytes ¶
func NewRjReaderFromBytes(b []byte) *rjReader
creates a new rjReader from a slice of bytes
func NewSliceDP ¶
func NewSliceDP(record []string) (dP utils.DataProvider)
NewSliceDP constructs a utils.DataProvider
func NewXmlProvider ¶
func NewXmlProvider(req *xmlquery.Node, cdrPath utils.HierarchyPath) (dP utils.DataProvider)
NewXmlProvider constructs a utils.DataProvider
func SetCgrConfig ¶
func SetCgrConfig(cfg *CGRConfig)
SetCgrConfig is used to set system configuration from other places
Types ¶
type AnalyzerSCfg ¶
type AnalyzerSCfg struct {
Enabled bool
}
AttributeSCfg is the configuration of attribute service
func (*AnalyzerSCfg) AsMapInterface ¶ added in v0.10.1
func (alS *AnalyzerSCfg) AsMapInterface() map[string]any
type AnalyzerSJsonCfg ¶
type AnalyzerSJsonCfg struct {
Enabled *bool
}
Analyzer service json config section
type ApierCfg ¶
type ApierCfg struct {
Enabled bool
CachesConns []string // connections towards Cache
SchedulerConns []string // connections towards Scheduler
AttributeSConns []string // connections towards AttributeS
}
ApierCfg is the configuration of Apier service
func (*ApierCfg) AsMapInterface ¶ added in v0.10.1
type ApierJsonCfg ¶
type AstConnJsonCfg ¶
type AsteriskAgentCfg ¶
type AsteriskAgentCfg struct {
Enabled bool
SessionSConns []string
CreateCDR bool
AsteriskConns []*AsteriskConnCfg
}
func (*AsteriskAgentCfg) AsMapInterface ¶ added in v0.10.1
func (aCfg *AsteriskAgentCfg) AsMapInterface() map[string]any
type AsteriskAgentJsonCfg ¶
type AsteriskAgentJsonCfg struct {
Enabled *bool
Sessions_conns *[]string
Create_cdr *bool
Asterisk_conns *[]*AstConnJsonCfg
}
type AsteriskConnCfg ¶
type AsteriskConnCfg struct {
Alias string
Address string
User string
Password string
ConnectAttempts int
Reconnects int
}
func NewDefaultAsteriskConnCfg ¶
func NewDefaultAsteriskConnCfg() *AsteriskConnCfg
Uses stored defaults so we can pre-populate by loading from JSON config
func (*AsteriskConnCfg) AsMapInterface ¶ added in v0.10.1
func (aConnCfg *AsteriskConnCfg) AsMapInterface() map[string]any
type AttributeSCfg ¶
type AttributeSCfg struct {
Enabled bool
IndexedSelects bool
StringIndexedFields *[]string
PrefixIndexedFields *[]string
ProcessRuns int
NestedFields bool
}
AttributeSCfg is the configuration of attribute service
func (*AttributeSCfg) AsMapInterface ¶ added in v0.10.1
func (alS *AttributeSCfg) AsMapInterface() map[string]any
type AttributeSJsonCfg ¶
type AttributeSJsonCfg struct {
Enabled *bool
Indexed_selects *bool
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
Process_runs *int
}
Attribute service config section
type CGRConfig ¶
type CGRConfig struct {
MaxCallDuration time.Duration // The maximum call duration (used by responder when querying DerivedCharging) // ToDo: export it in configuration file
DataFolderPath string // Path towards data folder, for tests internal usage, not loading out of .json options
ConfigPath string // Path towards config
CdreProfiles map[string]*CdreCfg // Cdre config profiles
ConfigReloads map[string]chan struct{} // Signals to specific entities that a config reload should occur
// contains filtered or unexported fields
}
Holds system configuration, defaults are overwritten with values from config file if found
func CgrConfig ¶
func CgrConfig() *CGRConfig
CgrConfig is used to retrieve system configuration from other packages
func NewCGRConfigFromPath ¶
Reads all .json files out of a folder/subfolders and loads them up in lexical order
func NewDefaultCGRConfig ¶
func (*CGRConfig) AnalyzerSCfg ¶
func (cfg *CGRConfig) AnalyzerSCfg() *AnalyzerSCfg
AnalyzerSCfg returns the config for AnalyzerS
func (*CGRConfig) AsMapInterface ¶ added in v0.10.1
func (*CGRConfig) AsteriskAgentCfg ¶
func (cfg *CGRConfig) AsteriskAgentCfg() *AsteriskAgentCfg
AsteriskAgentCfg returns the config for AsteriskAgent
func (*CGRConfig) AttributeSCfg ¶
func (cfg *CGRConfig) AttributeSCfg() *AttributeSCfg
AttributeSCfg returns the config for AttributeS
func (*CGRConfig) ChargerSCfg ¶
func (cfg *CGRConfig) ChargerSCfg() *ChargerSCfg
ChargerSCfg returns the config for ChargerS
func (*CGRConfig) CheckConfigSanity ¶
Exported in cgr-engine
func (*CGRConfig) DNSAgentCfg ¶
func (cfg *CGRConfig) DNSAgentCfg() *DNSAgentCfg
DNSAgentCfg returns the config for DNS Agent
func (*CGRConfig) DiameterAgentCfg ¶
func (cfg *CGRConfig) DiameterAgentCfg() *DiameterAgentCfg
DiameterAgentCfg returns the config for Diameter Agent
func (*CGRConfig) DispatcherSCfg ¶
func (cfg *CGRConfig) DispatcherSCfg() *DispatcherSCfg
DispatcherSCfg returns the config for DispatcherS
func (*CGRConfig) FilterSCfg ¶
func (cfg *CGRConfig) FilterSCfg() *FilterSCfg
FilterSCfg returns the config for FilterS
func (*CGRConfig) FsAgentCfg ¶
func (cfg *CGRConfig) FsAgentCfg() *FsAgentCfg
FsAgentCfg returns the config for FsAgent
func (*CGRConfig) GeneralCfg ¶
func (cfg *CGRConfig) GeneralCfg() *GeneralCfg
GeneralCfg returns the General config section
func (*CGRConfig) GetReloadChan ¶
GetReloadChan returns the reload chanel for the given section
func (*CGRConfig) HttpAgentCfg ¶
func (cfg *CGRConfig) HttpAgentCfg() []*HttpAgentCfg
HttpAgentCfg returns the config for HttpAgent
func (*CGRConfig) KamAgentCfg ¶
func (cfg *CGRConfig) KamAgentCfg() *KamAgentCfg
KamAgentCfg returns the config for KamAgent
func (*CGRConfig) LazySanityCheck ¶
func (cfg *CGRConfig) LazySanityCheck()
func (*CGRConfig) LoaderCfg ¶
func (cfg *CGRConfig) LoaderCfg() LoaderSCfgs
LoaderCfg returns the Loader Service
func (*CGRConfig) LoaderCgrCfg ¶
func (cfg *CGRConfig) LoaderCgrCfg() *LoaderCgrCfg
LoaderCgrCfg returns the config for cgr-loader
func (*CGRConfig) MigratorCgrCfg ¶
func (cfg *CGRConfig) MigratorCgrCfg() *MigratorCgrCfg
MigratorCgrCfg returns the config for Migrator
func (*CGRConfig) RadiusAgentCfg ¶
func (cfg *CGRConfig) RadiusAgentCfg() *RadiusAgentCfg
RadiusAgentCfg returns the config for Radius Agent
func (*CGRConfig) ResourceSCfg ¶
func (cfg *CGRConfig) ResourceSCfg() *ResourceSConfig
ResourceSCfg returns the config for ResourceS
func (*CGRConfig) SchedulerCfg ¶
func (cfg *CGRConfig) SchedulerCfg() *SchedulerCfg
SchedulerCfg returns the config for Scheduler
func (*CGRConfig) SessionSCfg ¶
func (cfg *CGRConfig) SessionSCfg() *SessionSCfg
SessionSCfg returns the config for SessionS
func (*CGRConfig) SupplierSCfg ¶
func (cfg *CGRConfig) SupplierSCfg() *SupplierSCfg
SupplierSCfg returns the config for SupplierS
func (*CGRConfig) SureTaxCfg ¶
func (cfg *CGRConfig) SureTaxCfg() *SureTaxCfg
SureTaxCfg use locking to retrieve the configuration, possibility later for runtime reload
func (*CGRConfig) ThresholdSCfg ¶
func (cfg *CGRConfig) ThresholdSCfg() *ThresholdSCfg
ThresholdSCfg returns the config for ThresholdS
func (*CGRConfig) V1GetConfigSection ¶
func (cfg *CGRConfig) V1GetConfigSection(args *StringWithArgDispatcher, reply *map[string]any) (err error)
V1GetConfigSection will retrieve from CGRConfig a section
func (*CGRConfig) V1ReloadConfigFromJSON ¶
func (cfg *CGRConfig) V1ReloadConfigFromJSON(args *JSONReloadWithArgDispatcher, reply *string) (err error)
V1ReloadConfigFromJSON reloads the sections of configz
func (*CGRConfig) V1ReloadConfigFromPath ¶
func (cfg *CGRConfig) V1ReloadConfigFromPath(args *ConfigReloadWithArgDispatcher, reply *string) (err error)
V1ReloadConfigFromPath reloads the configuration
type CacheCfg ¶
type CacheCfg map[string]*CacheParamCfg
CacheCfg used to store the cache config
func (CacheCfg) AddTmpCaches ¶
func (cCfg CacheCfg) AddTmpCaches()
AddTmpCaches adds all the temotrary caches configuration needed
func (*CacheCfg) AsMapInterface ¶ added in v0.10.1
func (CacheCfg) AsTransCacheConfig ¶
func (cCfg CacheCfg) AsTransCacheConfig() (tcCfg map[string]*ltcache.CacheConfig)
AsTransCacheConfig transforms the cache config in ltcache config
type CacheJsonCfg ¶
type CacheJsonCfg map[string]*CacheParamJsonCfg
type CacheParamCfg ¶
CacheParamCfg represents the config of a single cache partition
func (*CacheParamCfg) AsMapInterface ¶ added in v0.10.1
func (cParam *CacheParamCfg) AsMapInterface() map[string]any
type CacheParamJsonCfg ¶
type CdreCfg ¶
type CdreCfg struct {
ExportFormat string
ExportPath string
Filters []string
Tenant string
AttributeSContext string
Synchronous bool
Attempts int
FieldSeparator rune
Fields []*FCTemplate
}
One instance of CdrExporter
func (*CdreCfg) AsMapInterface ¶ added in v0.10.1
type CdreJsonCfg ¶
type CdreJsonCfg struct {
Export_format *string
Export_path *string
Filters *[]string
Tenant *string
Attributes_context *string
Synchronous *bool
Attempts *int
Field_separator *string
Fields *[]*FcTemplateJsonCfg
}
Cdre config section
type CdrsCfg ¶
type CdrsCfg struct {
Enabled bool // Enable CDR Server service
ExtraFields []*utils.RSRField // Extra fields to store in CDRs
ExtraFieldsAliases map[string]string
StoreCdrs bool // store cdrs in storDb
SMCostRetries int
ChargerSConns []string
RaterConns []string
AttributeSConns []string
ThresholdSConns []string
StatSConns []string
OnlineCDRExports []string // list of CDRE templates to use for real-time CDR exports
}
func (*CdrsCfg) AsMapInterface ¶ added in v0.10.1
type CdrsJsonCfg ¶
type CdrsJsonCfg struct {
Enabled *bool
Extra_fields *[]string
Extra_fields_aliases *map[string]string
Store_cdrs *bool
Session_cost_retries *int
Chargers_conns *[]string
Rals_conns *[]string
Attributes_conns *[]string
Thresholds_conns *[]string
Stats_conns *[]string
Online_cdr_exports *[]string
}
Cdrs config section
type CgrJsonCfg ¶
type CgrJsonCfg map[string]*json.RawMessage
Main object holding the loaded config as section raw messages
func NewCgrJsonCfgFromBytes ¶
func NewCgrJsonCfgFromBytes(buf []byte) (cgrJsonCfg *CgrJsonCfg, err error)
Loads the json config out of io.Reader, eg other sources than file, maybe over http
func (CgrJsonCfg) AnalyzerCfgJson ¶
func (self CgrJsonCfg) AnalyzerCfgJson() (*AnalyzerSJsonCfg, error)
func (CgrJsonCfg) ApierCfgJson ¶
func (self CgrJsonCfg) ApierCfgJson() (*ApierJsonCfg, error)
func (CgrJsonCfg) AsteriskAgentJsonCfg ¶
func (self CgrJsonCfg) AsteriskAgentJsonCfg() (*AsteriskAgentJsonCfg, error)
func (CgrJsonCfg) AttributeServJsonCfg ¶
func (cgrJsn CgrJsonCfg) AttributeServJsonCfg() (*AttributeSJsonCfg, error)
func (CgrJsonCfg) CacheJsonCfg ¶
func (self CgrJsonCfg) CacheJsonCfg() (*CacheJsonCfg, error)
func (CgrJsonCfg) CdreJsonCfgs ¶
func (self CgrJsonCfg) CdreJsonCfgs() (map[string]*CdreJsonCfg, error)
func (CgrJsonCfg) CdrsJsonCfg ¶
func (self CgrJsonCfg) CdrsJsonCfg() (*CdrsJsonCfg, error)
func (CgrJsonCfg) ChargerServJsonCfg ¶
func (cgrJsn CgrJsonCfg) ChargerServJsonCfg() (*ChargerSJsonCfg, error)
func (CgrJsonCfg) DNSAgentJsonCfg ¶
func (self CgrJsonCfg) DNSAgentJsonCfg() (da *DNSAgentJsonCfg, err error)
func (CgrJsonCfg) DiameterAgentJsonCfg ¶
func (self CgrJsonCfg) DiameterAgentJsonCfg() (*DiameterAgentJsonCfg, error)
func (CgrJsonCfg) DispatcherSJsonCfg ¶
func (self CgrJsonCfg) DispatcherSJsonCfg() (*DispatcherSJsonCfg, error)
func (CgrJsonCfg) ERsJsonCfg ¶
func (self CgrJsonCfg) ERsJsonCfg() (erSCfg *ERsJsonCfg, err error)
func (CgrJsonCfg) FilterSJsonCfg ¶
func (jsnCfg CgrJsonCfg) FilterSJsonCfg() (*FilterSJsonCfg, error)
func (CgrJsonCfg) FreeswitchAgentJsonCfg ¶
func (self CgrJsonCfg) FreeswitchAgentJsonCfg() (*FreeswitchAgentJsonCfg, error)
func (CgrJsonCfg) GeneralJsonCfg ¶
func (self CgrJsonCfg) GeneralJsonCfg() (*GeneralJsonCfg, error)
func (CgrJsonCfg) HttpAgentJsonCfg ¶
func (self CgrJsonCfg) HttpAgentJsonCfg() (*[]*HttpAgentJsonCfg, error)
func (CgrJsonCfg) HttpJsonCfg ¶
func (self CgrJsonCfg) HttpJsonCfg() (*HTTPJsonCfg, error)
func (CgrJsonCfg) KamAgentJsonCfg ¶
func (self CgrJsonCfg) KamAgentJsonCfg() (*KamAgentJsonCfg, error)
func (CgrJsonCfg) ListenJsonCfg ¶
func (self CgrJsonCfg) ListenJsonCfg() (*ListenJsonCfg, error)
func (CgrJsonCfg) LoaderCfgJson ¶
func (self CgrJsonCfg) LoaderCfgJson() (*LoaderCfgJson, error)
func (CgrJsonCfg) LoaderJsonCfg ¶
func (self CgrJsonCfg) LoaderJsonCfg() ([]*LoaderJsonCfg, error)
func (CgrJsonCfg) MailerJsonCfg ¶
func (self CgrJsonCfg) MailerJsonCfg() (*MailerJsonCfg, error)
func (CgrJsonCfg) MigratorCfgJson ¶
func (self CgrJsonCfg) MigratorCfgJson() (*MigratorCfgJson, error)
func (CgrJsonCfg) RPCConnJsonCfg ¶
func (self CgrJsonCfg) RPCConnJsonCfg() (map[string]*RPCConnsJson, error)
func (CgrJsonCfg) RadiusAgentJsonCfg ¶
func (self CgrJsonCfg) RadiusAgentJsonCfg() (*RadiusAgentJsonCfg, error)
func (CgrJsonCfg) RalsJsonCfg ¶
func (self CgrJsonCfg) RalsJsonCfg() (*RalsJsonCfg, error)
func (CgrJsonCfg) ResourceSJsonCfg ¶
func (self CgrJsonCfg) ResourceSJsonCfg() (*ResourceSJsonCfg, error)
func (CgrJsonCfg) SchedulerJsonCfg ¶
func (self CgrJsonCfg) SchedulerJsonCfg() (*SchedulerJsonCfg, error)
func (CgrJsonCfg) SessionSJsonCfg ¶
func (self CgrJsonCfg) SessionSJsonCfg() (*SessionSJsonCfg, error)
func (CgrJsonCfg) StatSJsonCfg ¶
func (self CgrJsonCfg) StatSJsonCfg() (*StatServJsonCfg, error)
func (CgrJsonCfg) SupplierSJsonCfg ¶
func (self CgrJsonCfg) SupplierSJsonCfg() (*SupplierSJsonCfg, error)
func (CgrJsonCfg) SureTaxJsonCfg ¶
func (self CgrJsonCfg) SureTaxJsonCfg() (*SureTaxJsonCfg, error)
func (CgrJsonCfg) ThresholdSJsonCfg ¶
func (self CgrJsonCfg) ThresholdSJsonCfg() (*ThresholdSJsonCfg, error)
func (CgrJsonCfg) TlsCfgJson ¶
func (self CgrJsonCfg) TlsCfgJson() (*TlsJsonCfg, error)
type ChargerSCfg ¶
type ChargerSCfg struct {
Enabled bool
IndexedSelects bool
AttributeSConns []string
StringIndexedFields *[]string
PrefixIndexedFields *[]string
NestedFields bool
}
SupplierSCfg is the configuration of supplier service
func (*ChargerSCfg) AsMapInterface ¶ added in v0.10.1
func (cS *ChargerSCfg) AsMapInterface() map[string]any
type ChargerSJsonCfg ¶
type ChargerSJsonCfg struct {
Enabled *bool
Indexed_selects *bool
Attributes_conns *[]string
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
}
ChargerSJsonCfg service config section
type DNSAgentCfg ¶
type DNSAgentCfg struct {
Enabled bool
Listen string
ListenNet string // udp or tcp
SessionSConns []string
Timezone string
RequestProcessors []*RequestProcessor
}
func (*DNSAgentCfg) AsMapInterface ¶ added in v0.10.1
func (da *DNSAgentCfg) AsMapInterface(separator string) map[string]any
type DNSAgentJsonCfg ¶
type DNSAgentJsonCfg struct {
Enabled *bool
Listen *string
Listen_net *string
Sessions_conns *[]string
Timezone *string
Request_processors *[]*ReqProcessorJsnCfg
}
DNSAgentJsonCfg
type DataDbCfg ¶
type DataDbCfg struct {
DataDbType string
DataDbHost string // The host to connect to. Values that start with / are for UNIX domain sockets.
DataDbPort string // The port to bind to.
DataDbName string // The name of the database to connect to.
DataDbUser string // The user to sign in as.
DataDbPass string // The user's password.
DataDbSentinelName string
QueryTimeout time.Duration
RmtConns []string // Remote DataDB connIDs
RplConns []string // Replication connIDs
RplFiltered bool
Items map[string]*ItemOpt
}
DataDbCfg Database config
func (*DataDbCfg) AsMapInterface ¶ added in v0.10.1
type DbJsonCfg ¶
type DbJsonCfg struct {
Db_type *string
Db_host *string
Db_port *int
Db_name *string
Db_user *string
Db_password *string
Max_open_conns *int // Used only in case of storDb
Max_idle_conns *int
Conn_max_lifetime *int // Used only in case of storDb
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Redis_sentinel *string
Query_timeout *string
Sslmode *string // Used only in case of storDb
Remote_conns *[]string
Replication_conns *[]string
Items *map[string]*ItemOptJson
Replication_filtered *bool
}
Database config
type DiameterAgentCfg ¶
type DiameterAgentCfg struct {
Enabled bool // enables the diameter agent: <true|false>
ListenNet string // sctp or tcp
Listen string // address where to listen for diameter requests <x.y.z.y:1234>
DictionariesPath string
SessionSConns []string
OriginHost string
OriginRealm string
VendorId int
ProductName string
ConcurrentReqs int // limit the maximum number of requests processed
SyncedConnReqs bool
ASRTemplate string
Templates map[string][]*FCTemplate
RequestProcessors []*RequestProcessor
}
func (*DiameterAgentCfg) AsMapInterface ¶ added in v0.10.1
func (ds *DiameterAgentCfg) AsMapInterface(separator string) map[string]any
type DiameterAgentJsonCfg ¶
type DiameterAgentJsonCfg struct {
Enabled *bool
Listen *string
Listen_net *string
Dictionaries_path *string
Sessions_conns *[]string
Origin_host *string
Origin_realm *string
Vendor_id *int
Product_name *string
Concurrent_requests *int
Synced_conn_requests *bool
Asr_template *string
Templates map[string][]*FcTemplateJsonCfg
Request_processors *[]*ReqProcessorJsnCfg
}
DiameterAgent configuration
type DispatcherSCfg ¶
type DispatcherSCfg struct {
Enabled bool
IndexedSelects bool
StringIndexedFields *[]string
PrefixIndexedFields *[]string
AttributeSConns []string
NestedFields bool
}
DispatcherSCfg is the configuration of dispatcher service
func (*DispatcherSCfg) AsMapInterface ¶ added in v0.10.1
func (dps *DispatcherSCfg) AsMapInterface() map[string]any
type DispatcherSJsonCfg ¶
type ERsCfg ¶
type ERsCfg struct {
Enabled bool
SessionSConns []string
Readers []*EventReaderCfg
}
func (*ERsCfg) AsMapInterface ¶ added in v0.10.1
type ERsJsonCfg ¶
type ERsJsonCfg struct {
Enabled *bool
Sessions_conns *[]string
Readers *[]*EventReaderJsonCfg
}
EventReaderSJsonCfg contains the configuration of EventReaderService
type EventReaderCfg ¶
type EventReaderCfg struct {
ID string
Type string
RowLength int
FieldSep string
RunDelay time.Duration
ConcurrentReqs int
SourcePath string
ProcessedPath string
XmlRootPath utils.HierarchyPath
Tenant RSRParsers
Timezone string
Filters []string
Flags utils.FlagsWithParams
FailedCallsPrefix string // Used in case of flatstore CDRs to avoid searching for BYE records
PartialRecordCache time.Duration // Duration to cache partial records when not pairing
PartialCacheExpiryAction string
Fields []*FCTemplate
CacheDumpFields []*FCTemplate
}
func (*EventReaderCfg) AsMapInterface ¶ added in v0.10.1
func (er *EventReaderCfg) AsMapInterface(separator string) map[string]any
func (*EventReaderCfg) Clone ¶
func (er *EventReaderCfg) Clone() (cln *EventReaderCfg)
Clone itself into a new EventReaderCfg
type EventReaderJsonCfg ¶
type EventReaderJsonCfg struct {
Id *string
Type *string
Row_length *int
Field_separator *string
Run_delay *string
Concurrent_requests *int
Source_path *string
Processed_path *string
Xml_root_path *string
Tenant *string
Timezone *string
Filters *[]string
Flags *[]string
Failed_calls_prefix *string
Partial_record_cache *string
Partial_cache_expiry_action *string
Fields *[]*FcTemplateJsonCfg
Cache_dump_fields *[]*FcTemplateJsonCfg
}
EventReaderSJsonCfg is the configuration of a single EventReader
type FCTemplate ¶
type FCTemplate struct {
Tag string
Type string // Type of field
Path string // Field identifier
Filters []string // list of filter profiles
Value RSRParsers
Width int
Strip string
Padding string
Mandatory bool
AttributeID string // Used by NavigableMap when creating CGREvent/XMLElements
NewBranch bool // Used by NavigableMap when creating XMLElements
Timezone string
Blocker bool
BreakOnSuccess bool
Layout string // time format
CostShiftDigits int // Used for CDR
RoundingDecimals *int
MaskDestID string
MaskLen int
// contains filtered or unexported fields
}
func FCTemplatesFromFCTemplatesJsonCfg ¶
func FCTemplatesFromFCTemplatesJsonCfg(jsnCfgFlds []*FcTemplateJsonCfg, separator string) ([]*FCTemplate, error)
func InflateTemplates ¶
func InflateTemplates(fcts []*FCTemplate, msgTpls map[string][]*FCTemplate) ([]*FCTemplate, error)
InflateTemplates will replace the *template fields with template content out msgTpls
func NewFCTemplateFromFCTemplateJsonCfg ¶
func NewFCTemplateFromFCTemplateJsonCfg(jsnCfg *FcTemplateJsonCfg, separator string) (*FCTemplate, error)
func (*FCTemplate) AsMapInterface ¶ added in v0.10.1
func (fc *FCTemplate) AsMapInterface(separator string) (mp map[string]any)
func (*FCTemplate) Clone ¶
func (fc *FCTemplate) Clone() *FCTemplate
func (*FCTemplate) ComputePath ¶ added in v0.10.1
func (fc *FCTemplate) ComputePath()
ComputePath used in test to populate private fields used to store the path
func (*FCTemplate) GetPathItems ¶ added in v0.10.1
func (fc *FCTemplate) GetPathItems() utils.PathItems
GetPathItems returns the cached path as PathItems
func (*FCTemplate) GetPathSlice ¶ added in v0.10.1
func (fc *FCTemplate) GetPathSlice() []string
GetPathSlice returns the cached split of the path
type FWVProvider ¶
type FWVProvider struct {
// contains filtered or unexported fields
}
fwvProvider implements engine.utils.DataProvider so we can pass it to filters
func (*FWVProvider) FieldAsInterface ¶
func (fP *FWVProvider) FieldAsInterface(fldPath []string) (data any, err error)
FieldAsInterface is part of engine.utils.DataProvider interface
func (*FWVProvider) FieldAsString ¶
func (fP *FWVProvider) FieldAsString(fldPath []string) (data string, err error)
FieldAsString is part of engine.utils.DataProvider interface
func (*FWVProvider) RemoteHost ¶
func (fP *FWVProvider) RemoteHost() net.Addr
RemoteHost is part of engine.utils.DataProvider interface
func (*FWVProvider) String ¶
func (fP *FWVProvider) String() string
String is part of engine.utils.DataProvider interface when called, it will display the already parsed values out of cache
type FcTemplateJsonCfg ¶
type FcTemplateJsonCfg struct {
Tag *string
Type *string
Path *string
Attribute_id *string
Filters *[]string
Value *string
Width *int
Strip *string
Padding *string
Mandatory *bool
New_branch *bool
Timezone *string
Blocker *bool
Break_on_success *bool
Layout *string
Cost_shift_digits *int
Rounding_decimals *int
Mask_destinationd_id *string
Mask_length *int
}
type FilterSCfg ¶
func (*FilterSCfg) AsMapInterface ¶ added in v0.10.1
func (fSCfg *FilterSCfg) AsMapInterface() map[string]any
type FilterSJsonCfg ¶
Filters config
type FreeswitchAgentJsonCfg ¶
type FreeswitchAgentJsonCfg struct {
Enabled *bool
Sessions_conns *[]string
Subscribe_park *bool
Create_cdr *bool
Extra_fields *[]string
Empty_balance_context *string
Empty_balance_ann_file *string
Max_wait_connection *string
Event_socket_conns *[]*FsConnJsonCfg
}
FreeSWITCHAgent config section
type FsAgentCfg ¶
type FsAgentCfg struct {
Enabled bool
SessionSConns []string
SubscribePark bool
CreateCdr bool
ExtraFields RSRParsers
//MinDurLowBalance time.Duration
//LowBalanceAnnFile string
EmptyBalanceContext string
EmptyBalanceAnnFile string
MaxWaitConnection time.Duration
EventSocketConns []*FsConnCfg
}
func (*FsAgentCfg) AsMapInterface ¶ added in v0.10.1
func (fscfg *FsAgentCfg) AsMapInterface(separator string) map[string]any
type FsConnCfg ¶
One connection to FreeSWITCH server
func NewDfltFsConnConfig ¶
func NewDfltFsConnConfig() *FsConnCfg
Returns the first cached default value for a FreeSWITCHAgent connection
func (*FsConnCfg) AsMapInterface ¶ added in v0.10.1
type FsConnJsonCfg ¶
Represents one connection instance towards FreeSWITCH
type GeneralCfg ¶
type GeneralCfg struct {
NodeID string // Identifier for this engine instance
Logger string // dictates the way logs are displayed/stored
LogLevel int // system wide log level, nothing higher than this will be logged
HttpSkipTlsVerify bool // If enabled Http Client will accept any TLS certificate
RoundingDecimals int // Number of decimals to round end prices at
DBDataEncoding string // The encoding used to store object data in strings: <msgpack|json>
TpExportPath string // Path towards export folder for offline Tariff Plans
PosterAttempts int // Time to wait before writing the failed posts in a single file
FailedPostsDir string // Directory path where we store failed http requests
FailedPostsTTL time.Duration // Directory path where we store failed http requests
DefaultReqType string // Use this request type if not defined on top
DefaultCategory string // set default type of record
DefaultTenant string // set default tenant
DefaultTimezone string // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
DefaultCaching string
ConnectAttempts int // number of initial connection attempts before giving up
Reconnects int // number of recconect attempts in case of connection lost <-1 for infinite | nb>
ConnectTimeout time.Duration // timeout for RPC connection attempts
ReplyTimeout time.Duration // timeout replies if not reaching back
LockingTimeout time.Duration // locking mechanism timeout to avoid deadlocks
DigestSeparator string //
DigestEqual string //
RSRSep string // separator used to split RSRParser (by degault is used ";")
MaxParallelConns int // the maximum number of connections used by the *parallel strategy
ConcurrentRequests int
ConcurrentStrategy string
}
General config section
func (*GeneralCfg) AsMapInterface ¶ added in v0.10.1
func (gencfg *GeneralCfg) AsMapInterface() map[string]any
type GeneralJsonCfg ¶
type GeneralJsonCfg struct {
Node_id *string
Logger *string
Log_level *int
Http_skip_tls_verify *bool
Rounding_decimals *int
Dbdata_encoding *string
Tpexport_dir *string
Poster_attempts *int
Failed_posts_dir *string
Failed_posts_ttl *string
Default_request_type *string
Default_category *string
Default_tenant *string
Default_timezone *string
Default_caching *string
Connect_attempts *int
Reconnects *int
Connect_timeout *string
Reply_timeout *string
Locking_timeout *string
Digest_separator *string
Digest_equal *string
Rsr_separator *string
Max_parallel_conns *int
Concurrent_requests *int
Concurrent_strategy *string
}
General config section
type HTTPCfg ¶
type HTTPCfg struct {
HTTPJsonRPCURL string // JSON RPC relative URL ("" to disable)
HTTPWSURL string // WebSocket relative URL ("" to disable)
HTTPFreeswitchCDRsURL string // Freeswitch CDRS relative URL ("" to disable)
HTTPCDRsURL string // CDRS relative URL ("" to disable)
HTTPUseBasicAuth bool // Use basic auth for HTTP API
HTTPAuthUsers map[string]string // Basic auth user:password map (base64 passwords)
}
HTTP config section
func (*HTTPCfg) AsMapInterface ¶ added in v0.10.1
type HTTPJsonCfg ¶
type HTTPJsonCfg struct {
Json_rpc_url *string
Ws_url *string
Freeswitch_cdrs_url *string
Http_Cdrs *string
Use_basic_auth *bool
Auth_users *map[string]string
}
HTTP config section
type HttpAgentCfg ¶
type HttpAgentCfg struct {
ID string // identifier for the agent, so we can update it's processors
Url string
SessionSConns []string
RequestPayload string
ReplyPayload string
RequestProcessors []*RequestProcessor
}
func (*HttpAgentCfg) AsMapInterface ¶ added in v0.10.1
func (ca *HttpAgentCfg) AsMapInterface(separator string) map[string]any
type HttpAgentCfgs ¶
type HttpAgentCfgs []*HttpAgentCfg
func (*HttpAgentCfgs) AsMapInterface ¶ added in v0.10.1
func (hcfgs *HttpAgentCfgs) AsMapInterface(separator string) []map[string]any
type HttpAgentJsonCfg ¶
type HttpAgentJsonCfg struct {
Id *string
Url *string
Sessions_conns *[]string
Request_payload *string
Reply_payload *string
Request_processors *[]*ReqProcessorJsnCfg
}
Conecto Agent configuration section
type ItemOpt ¶
type ItemOpt struct {
Remote bool
Replicate bool
TTL time.Duration
Limit int
StaticTTL bool
// used for ArgDispatcher in case we send this to a dispatcher engine
RouteID string
APIKey string
}
func (*ItemOpt) AsMapInterface ¶ added in v0.10.1
type ItemOptJson ¶
type JSONReloadWithArgDispatcher ¶
type JSONReloadWithArgDispatcher struct {
*utils.ArgDispatcher
utils.TenantArg
JSON map[string]any
}
JSONReloadWithArgDispatcher the API params for V1ReloadConfigFromJSON
type KamAgentCfg ¶
type KamAgentCfg struct {
Enabled bool
SessionSConns []string
CreateCdr bool
EvapiConns []*KamConnCfg
Timezone string
}
SM-Kamailio config section
func (*KamAgentCfg) AsMapInterface ¶ added in v0.10.1
func (ka *KamAgentCfg) AsMapInterface() map[string]any
type KamAgentJsonCfg ¶
type KamAgentJsonCfg struct {
Enabled *bool
Sessions_conns *[]string
Create_cdr *bool
Evapi_conns *[]*KamConnJsonCfg
}
SM-Kamailio config section
type KamConnCfg ¶
Represents one connection instance towards Kamailio
func NewDfltKamConnConfig ¶
func NewDfltKamConnConfig() *KamConnCfg
Returns the first cached default value for a FreeSWITCHAgent connection
func (*KamConnCfg) AsMapInterface ¶ added in v0.10.1
func (kamCfg *KamConnCfg) AsMapInterface() map[string]any
type KamConnJsonCfg ¶
Represents one connection instance towards Kamailio
type ListenCfg ¶
type ListenCfg struct {
RPCJSONListen string // RPC JSON listening address
RPCGOBListen string // RPC GOB listening address
HTTPListen string // HTTP listening address
RPCJSONTLSListen string // RPC JSON TLS listening address
RPCGOBTLSListen string // RPC GOB TLS listening address
HTTPTLSListen string // HTTP TLS listening address
}
Listen config section
func (*ListenCfg) AsMapInterface ¶ added in v0.10.1
type ListenJsonCfg ¶
type ListenJsonCfg struct {
Rpc_json *string
Rpc_gob *string
Http *string
Rpc_json_tls *string
Rpc_gob_tls *string
Http_tls *string
}
Listen config section
type LoaderCfgJson ¶
type LoaderCgrCfg ¶
type LoaderCgrCfg struct {
TpID string
DataPath string
DisableReverse bool
FieldSeparator rune // The separator to use when reading csvs
CachesConns []string
SchedulerConns []string
}
func (*LoaderCgrCfg) AsMapInterface ¶ added in v0.10.1
func (ld *LoaderCgrCfg) AsMapInterface() map[string]any
type LoaderDataType ¶
type LoaderDataType struct {
Type string
Filename string
Fields []*FCTemplate
}
func NewDfltLoaderDataTypeConfig ¶
func NewDfltLoaderDataTypeConfig() *LoaderDataType
func (*LoaderDataType) AsMapInterface ¶ added in v0.10.1
func (lData *LoaderDataType) AsMapInterface(separator string) map[string]any
func (*LoaderDataType) Clone ¶
func (self *LoaderDataType) Clone() *LoaderDataType
Clone itself into a new LoaderDataType
type LoaderJsonCfg ¶
type LoaderJsonDataType ¶
type LoaderJsonDataType struct {
Type *string
File_name *string
Fields *[]*FcTemplateJsonCfg
}
type LoaderSCfg ¶
type LoaderSCfg struct {
Id string
Enabled bool
Tenant RSRParsers
DryRun bool
RunDelay time.Duration
LockFileName string
CacheSConns []string
FieldSeparator string
TpInDir string
TpOutDir string
Data []*LoaderDataType
}
func NewDfltLoaderSCfg ¶
func NewDfltLoaderSCfg() *LoaderSCfg
func (*LoaderSCfg) AsMapInterface ¶ added in v0.10.1
func (l *LoaderSCfg) AsMapInterface(separator string) map[string]any
func (*LoaderSCfg) Clone ¶
func (self *LoaderSCfg) Clone() *LoaderSCfg
Clone itself into a new LoadersConfig
type LoaderSCfgs ¶
type LoaderSCfgs []*LoaderSCfg
LoaderSCfgs to export some methods for LoaderS profiles
func (LoaderSCfgs) Enabled ¶
func (ldrs LoaderSCfgs) Enabled() bool
Enabled returns true if Loader Service is enabled
type MailerCfg ¶
type MailerCfg struct {
MailerServer string // The server to use when sending emails out
MailerAuthUser string // Authenticate to email server using this user
MailerAuthPass string // Authenticate to email server with this password
MailerFromAddr string // From address used when sending emails out
}
Mailer config section
func (*MailerCfg) AsMapInterface ¶ added in v0.10.1
type MailerJsonCfg ¶
type MailerJsonCfg struct {
Server *string
Auth_user *string
Auth_password *string
From_address *string
}
Mailer config section
type MigratorCfgJson ¶
type MigratorCfgJson struct {
Out_dataDB_type *string
Out_dataDB_host *string
Out_dataDB_port *string
Out_dataDB_name *string
Out_dataDB_user *string
Out_dataDB_password *string
Out_dataDB_encoding *string
Out_dataDB_redis_sentinel *string
Out_storDB_type *string
Out_storDB_host *string
Out_storDB_port *string
Out_storDB_name *string
Out_storDB_user *string
Out_storDB_password *string
Users_filters *[]string
}
type MigratorCgrCfg ¶
type MigratorCgrCfg struct {
OutDataDBType string
OutDataDBHost string
OutDataDBPort string
OutDataDBName string
OutDataDBUser string
OutDataDBPassword string
OutDataDBEncoding string
OutDataDBRedisSentinel string
OutStorDBType string
OutStorDBHost string
OutStorDBPort string
OutStorDBName string
OutStorDBUser string
OutStorDBPassword string
UsersFilters []string
}
func (*MigratorCgrCfg) AsMapInterface ¶ added in v0.10.1
func (mg *MigratorCgrCfg) AsMapInterface() map[string]any
type NMItem ¶
type NMItem struct {
Path []string // path in map
Data any // value of the element
Config *FCTemplate // so we can store additional configuration
}
NMItem is an item in the NavigableMap
func (*NMItem) Field ¶ added in v0.10.1
Field not implemented only used in order to implement the NM interface
func (*NMItem) Len ¶ added in v0.10.1
Len not implemented only used in order to implement the NM interface
func (*NMItem) Remove ¶ added in v0.10.1
Remove not implemented only used in order to implement the NM interface
type ObjectDP ¶
type ObjectDP struct {
// contains filtered or unexported fields
}
func (*ObjectDP) FieldAsInterface ¶
FieldAsInterface is part of engine.utils.DataProvider interface
func (*ObjectDP) FieldAsString ¶
FieldAsString is part of engine.utils.DataProvider interface
func (*ObjectDP) RemoteHost ¶
RemoteHost is part of engine.utils.DataProvider interface
type OsipsConnJsonCfg ¶
Represents one connection instance towards OpenSIPS
type RPCConn ¶
type RPCConn struct {
Strategy string
PoolSize int
Conns []*RemoteHost
}
func NewDfltRPCConn ¶
func NewDfltRPCConn() *RPCConn
func (*RPCConn) AsMapInterface ¶ added in v0.10.1
type RPCConnsJson ¶
type RPCConnsJson struct {
Strategy *string
PoolSize *int
Conns *[]*RemoteHostJson
}
type RSRParser ¶
type RSRParser struct {
Rules string // Rules container holding the string rules, public so it can be stored
AllFiltersMatch bool // all filters must match policy
// contains filtered or unexported fields
}
RSRParser is a parser for data coming from various sources
func NewRSRParser ¶
func NewRSRParserMustCompile ¶
func (*RSRParser) ParseDataProvider ¶
func (*RSRParser) ParseDataProviderAsFloat64 ¶ added in v0.10.3
func (prsr *RSRParser) ParseDataProviderAsFloat64(dP utils.DataProvider, separator string) (float64, error)
ParseDataProviderAsFloat64 retrieves a field from the provided DataProvider and attempts to parse it as a float64.
func (*RSRParser) ParseDataProviderWithInterfaces ¶
func (*RSRParser) ParseValue ¶
ParseValue will parse the value out considering converters and filters
func (*RSRParser) RegexpMatched ¶
RegexpMatched will investigate whether we had at least one regexp match through the rules
type RSRParsers ¶
type RSRParsers []*RSRParser
RSRParsers is a set of RSRParser
func NewRSRParsers ¶
func NewRSRParsers(parsersRules string, allFiltersMatch bool, rsrSeparator string) (prsrs RSRParsers, err error)
func NewRSRParsersFromSlice ¶
func NewRSRParsersFromSlice(parsersRules []string, allFiltersMatch bool) (prsrs RSRParsers, err error)
func NewRSRParsersMustCompile ¶
func NewRSRParsersMustCompile(parsersRules string, allFiltersMatch bool, rsrSeparator string) (prsrs RSRParsers)
func (RSRParsers) Compile ¶
func (prsrs RSRParsers) Compile() (err error)
func (RSRParsers) GetRule ¶ added in v0.10.1
func (prsrs RSRParsers) GetRule() (out string)
func (RSRParsers) ParseDataProvider ¶
func (prsrs RSRParsers) ParseDataProvider(dP utils.DataProvider, separator string) (out string, err error)
func (RSRParsers) ParseDataProviderWithInterfaces ¶
func (prsrs RSRParsers) ParseDataProviderWithInterfaces(dP utils.DataProvider, separator string) (out string, err error)
func (RSRParsers) ParseValue ¶
func (prsrs RSRParsers) ParseValue(value any) (out string, err error)
ParseValue will parse the value out considering converters and filters
type RadiusAgentCfg ¶
type RadiusAgentCfg struct {
Enabled bool
ListenNet string // udp or tcp
ListenAuth string
ListenAcct string
ClientSecrets map[string]string
ClientDictionaries map[string]string
SessionSConns []string
RequestProcessors []*RequestProcessor
}
func (*RadiusAgentCfg) AsMapInterface ¶ added in v0.10.1
func (ra *RadiusAgentCfg) AsMapInterface(separator string) map[string]any
type RadiusAgentJsonCfg ¶
type RadiusAgentJsonCfg struct {
Enabled *bool
Listen_net *string
Listen_auth *string
Listen_acct *string
Client_secrets *map[string]string
Client_dictionaries *map[string]string
Sessions_conns *[]string
Timezone *string
Request_processors *[]*ReqProcessorJsnCfg
}
Radius Agent configuration section
type RalsCfg ¶
type RalsCfg struct {
Enabled bool // start standalone server (no balancer)
ThresholdSConns []string // address where to reach ThresholdS config
StatSConns []string
RpSubjectPrefixMatching bool // enables prefix matching for the rating profile subject
RemoveExpired bool
MaxComputedUsage map[string]time.Duration
BalanceRatingSubject map[string]string
MaxIncrements int
}
Rater config section
func (*RalsCfg) AsMapInterface ¶ added in v0.10.1
type RalsJsonCfg ¶
type RalsJsonCfg struct {
Enabled *bool
Thresholds_conns *[]string
Stats_conns *[]string
CacheS_conns *[]string
Rp_subject_prefix_matching *bool
Remove_expired *bool
Max_computed_usage *map[string]string
Max_increments *int
Balance_rating_subject *map[string]string
}
Rater config section
type RemoteHost ¶
One connection to Rater
func NewDfltRemoteHost ¶
func NewDfltRemoteHost() *RemoteHost
Returns the first cached default value for a RemoteHost connection
func (*RemoteHost) AsMapInterface ¶ added in v0.10.1
func (rh *RemoteHost) AsMapInterface() map[string]any
type RemoteHostJson ¶
type RemoteHostJson struct {
Id *string
Address *string
Transport *string
Synchronous *bool
Tls *bool
}
Represents one connection instance towards a rater/cdrs server
type ReqProcessorJsnCfg ¶
type ReqProcessorJsnCfg struct {
ID *string
Filters *[]string
Tenant *string
Timezone *string
Flags *[]string
Request_fields *[]*FcTemplateJsonCfg
Reply_fields *[]*FcTemplateJsonCfg
}
type RequestProcessor ¶
type RequestProcessor struct {
ID string
Tenant RSRParsers
Filters []string
Flags utils.FlagsWithParams
Timezone string
RequestFields []*FCTemplate
ReplyFields []*FCTemplate
}
RequestProcessor is the request processor configuration
func (*RequestProcessor) AsMapInterface ¶ added in v0.10.1
func (rp *RequestProcessor) AsMapInterface(separator string) map[string]any
type ResourceSConfig ¶
type ResourceSConfig struct {
Enabled bool
IndexedSelects bool
ThresholdSConns []string
StoreInterval time.Duration // Dump regularly from cache into dataDB
StringIndexedFields *[]string
PrefixIndexedFields *[]string
NestedFields bool
}
func (*ResourceSConfig) AsMapInterface ¶ added in v0.10.1
func (rlcfg *ResourceSConfig) AsMapInterface() map[string]any
type ResourceSJsonCfg ¶
type ResourceSJsonCfg struct {
Enabled *bool
Indexed_selects *bool
Thresholds_conns *[]string
Store_interval *string
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
}
ResourceLimiter service config section
type SchedulerCfg ¶
func (*SchedulerCfg) AsMapInterface ¶ added in v0.10.1
func (schdcfg *SchedulerCfg) AsMapInterface() map[string]any
type SchedulerJsonCfg ¶
Scheduler config section
type SessionSCfg ¶
type SessionSCfg struct {
Enabled bool
ListenBijson string
ChargerSConns []string
RALsConns []string
ResSConns []string
ThreshSConns []string
StatSConns []string
SupplSConns []string
AttrSConns []string
CDRsConns []string
ReplicationConns []string
DebitInterval time.Duration
StoreSCosts bool
SessionTTL time.Duration
SessionTTLMaxDelay *time.Duration
SessionTTLLastUsed *time.Duration
SessionTTLUsage *time.Duration
SessionTTLLastUsage *time.Duration
SessionIndexes utils.StringMap
ClientProtocol float64
ChannelSyncInterval time.Duration
TerminateAttempts int
AlterableFields utils.StringSet
DefaultUsage map[string]time.Duration
}
func (*SessionSCfg) AsMapInterface ¶ added in v0.10.1
func (scfg *SessionSCfg) AsMapInterface() map[string]any
func (*SessionSCfg) GetDefaultUsage ¶ added in v0.10.3
func (scfg *SessionSCfg) GetDefaultUsage(tor string) time.Duration
type SessionSJsonCfg ¶
type SessionSJsonCfg struct {
Enabled *bool
Listen_bijson *string
Chargers_conns *[]string
Rals_conns *[]string
Resources_conns *[]string
Thresholds_conns *[]string
Stats_conns *[]string
Suppliers_conns *[]string
Cdrs_conns *[]string
Replication_conns *[]string
Attributes_conns *[]string
Debit_interval *string
Store_session_costs *bool
Session_ttl *string
Session_ttl_max_delay *string
Session_ttl_last_used *string
Session_ttl_usage *string
Session_ttl_last_usage *string
Session_indexes *[]string
Client_protocol *float64
Channel_sync_interval *string
Terminate_attempts *int
Alterable_fields *[]string
Default_usage *map[string]string
}
SM-Generic config section
type SliceDP ¶
type SliceDP struct {
// contains filtered or unexported fields
}
SliceDP implements engine.utils.DataProvider so we can pass it to filters
func (*SliceDP) FieldAsInterface ¶
FieldAsInterface is part of engine.utils.DataProvider interface
func (*SliceDP) FieldAsString ¶
FieldAsString is part of engine.utils.DataProvider interface
func (*SliceDP) RemoteHost ¶
RemoteHost is part of engine.utils.DataProvider interface
type StatSCfg ¶
type StatSCfg struct {
Enabled bool
IndexedSelects bool
StoreInterval time.Duration // Dump regularly from cache into dataDB
StoreUncompressedLimit int
ThresholdSConns []string
StringIndexedFields *[]string
PrefixIndexedFields *[]string
NestedFields bool
}
func (*StatSCfg) AsMapInterface ¶ added in v0.10.1
type StatServJsonCfg ¶
type StatServJsonCfg struct {
Enabled *bool
Indexed_selects *bool
Store_interval *string
Store_uncompressed_limit *int
Thresholds_conns *[]string
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
}
Stat service config section
type StorDbCfg ¶
type StorDbCfg struct {
Type string // Should reflect the database type used to store logs
Host string // The host to connect to. Values that start with / are for UNIX domain sockets.
Port string // Th e port to bind to.
Name string // The name of the database to connect to.
User string // The user to sign in as.
Password string // The user's password.
MaxOpenConns int // Maximum database connections opened
MaxIdleConns int // Maximum idle connections to keep opened
ConnMaxLifetime int
StringIndexedFields []string
PrefixIndexedFields []string
QueryTimeout time.Duration
SSLMode string // for PostgresDB used to change default sslmode
Items map[string]*ItemOpt
}
StorDbCfg StroreDb config
func (*StorDbCfg) AsMapInterface ¶ added in v0.10.1
type StringWithArgDispatcher ¶
type StringWithArgDispatcher struct {
*utils.ArgDispatcher
utils.TenantArg
Section string
}
ToDo: move this structure in utils as is used in other packages
type SupplierSCfg ¶
type SupplierSCfg struct {
Enabled bool
IndexedSelects bool
StringIndexedFields *[]string
PrefixIndexedFields *[]string
AttributeSConns []string
ResourceSConns []string
StatSConns []string
RALsConns []string
DefaultRatio int
NestedFields bool
}
SupplierSCfg is the configuration of supplier service
func (*SupplierSCfg) AsMapInterface ¶ added in v0.10.1
func (spl *SupplierSCfg) AsMapInterface() map[string]any
type SupplierSJsonCfg ¶
type SupplierSJsonCfg struct {
Enabled *bool
Indexed_selects *bool
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
Attributes_conns *[]string
Resources_conns *[]string
Stats_conns *[]string
Rals_conns *[]string
Default_ratio *int
}
Supplier service config section
type SureTaxCfg ¶
type SureTaxCfg struct {
Url string
ClientNumber string
ValidationKey string
BusinessUnit string
Timezone *time.Location // Convert the time of the events to this timezone before sending request out
IncludeLocalCost bool
ReturnFileCode string
ResponseGroup string
ResponseType string
RegulatoryCode string
ClientTracking RSRParsers // Concatenate all of them to get value
CustomerNumber RSRParsers
OrigNumber RSRParsers
TermNumber RSRParsers
BillToNumber RSRParsers
Zipcode RSRParsers
Plus4 RSRParsers
P2PZipcode RSRParsers
P2PPlus4 RSRParsers
Units RSRParsers
UnitType RSRParsers
TaxIncluded RSRParsers
TaxSitusRule RSRParsers
TransTypeCode RSRParsers
SalesTypeCode RSRParsers
TaxExemptionCodeList RSRParsers
}
SureTax configuration object
func (*SureTaxCfg) AsMapInterface ¶ added in v0.10.1
func (st *SureTaxCfg) AsMapInterface(separator string) map[string]any
type SureTaxJsonCfg ¶
type SureTaxJsonCfg struct {
Url *string
Client_number *string
Validation_key *string
Business_unit *string
Timezone *string
Include_local_cost *bool
Return_file_code *string
Response_group *string
Response_type *string
Regulatory_code *string
Client_tracking *string
Customer_number *string
Orig_number *string
Term_number *string
Bill_to_number *string
Zipcode *string
Plus4 *string
P2PZipcode *string
P2PPlus4 *string
Units *string
Unit_type *string
Tax_included *string
Tax_situs_rule *string
Trans_type_code *string
Sales_type_code *string
Tax_exemption_code_list *string
}
SureTax config section
type ThresholdSCfg ¶
type ThresholdSCfg struct {
Enabled bool
IndexedSelects bool
StoreInterval time.Duration // Dump regularly from cache into dataDB
StringIndexedFields *[]string
PrefixIndexedFields *[]string
NestedFields bool
}
func (*ThresholdSCfg) AsMapInterface ¶ added in v0.10.1
func (t *ThresholdSCfg) AsMapInterface() map[string]any
type ThresholdSJsonCfg ¶
type ThresholdSJsonCfg struct {
Enabled *bool
Indexed_selects *bool
Store_interval *string
String_indexed_fields *[]string
Prefix_indexed_fields *[]string
Nested_fields *bool // applies when indexed fields is not defined
}
Threshold service config section
type TlsCfg ¶
type TlsCfg struct {
ServerCerificate string
ServerKey string
ServerPolicy int
ServerName string
ClientCerificate string
ClientKey string
CaCertificate string
}
AttributeSCfg is the configuration of attribute service
func (*TlsCfg) AsMapInterface ¶ added in v0.10.1
type TlsJsonCfg ¶
type XMLElement ¶
type XMLElement struct {
XMLName xml.Name
Value string `xml:",chardata"`
Attributes []*xml.Attr `xml:",attr"`
Elements []*XMLElement `xml:"omitempty"`
}
XMLElement is specially crafted to be automatically marshalled by encoding/xml
func NMAsXMLElements ¶ added in v0.10.1
func NMAsXMLElements(nm *utils.OrderedNavigableMap) (ents []*XMLElement, err error)
NMAsXMLElements returns the values as []*XMLElement which can be later marshaled considers each value returned by .Values() in the form of []*NMItem, otherwise errors
type XmlProvider ¶
type XmlProvider struct {
// contains filtered or unexported fields
}
XmlProvider implements engine.utils.DataProvider, allowing it to be passed to filters. An instance of XmlProvider is created for each element retrieved from xmlquery.QueryAll.
func (*XmlProvider) FieldAsInterface ¶
func (xP *XmlProvider) FieldAsInterface(fldPath []string) (data any, err error)
FieldAsInterface is part of engine.utils.DataProvider interface
func (*XmlProvider) FieldAsString ¶
func (xP *XmlProvider) FieldAsString(fldPath []string) (data string, err error)
FieldAsString is part of engine.utils.DataProvider interface
func (*XmlProvider) RemoteHost ¶
func (xP *XmlProvider) RemoteHost() net.Addr
RemoteHost is part of engine.utils.DataProvider interface
func (*XmlProvider) String ¶
func (xP *XmlProvider) String() string
String is part of engine.utils.DataProvider interface when called, it will display the already parsed values out of cache
Source Files
¶
- analyzerscfg.go
- apiercfg.go
- attributescfg.go
- cachecfg.go
- cdrecfg.go
- cdrscfg.go
- chargerscfg.go
- config.go
- config_defaults.go
- config_json.go
- configsanity.go
- datadbcfg.go
- diametercfg.go
- dispatchercfg.go
- dnsagntcfg.go
- erscfg.go
- fctemplate.go
- filterscfg.go
- fwvdp.go
- generalcfg.go
- httpagntcfg.go
- httpcfg.go
- kamagentcfg.go
- libconfig.go
- libconfig_json.go
- listencfg.go
- loadercgrcfg.go
- loaderscfg.go
- mailercfg.go
- migratorcfg.go
- navigablemap.go
- objdp.go
- radiuscfg.go
- ralscfg.go
- resourcescfg.go
- rjreader.go
- rpcconn.go
- rsrparser.go
- schedulercfg.go
- slicedp.go
- smconfig.go
- statscfg.go
- stordbcfg.go
- supplierscfg.go
- suretaxcfg.go
- thresholdscfg.go
- tlscfg.go
- xmldp.go