Documentation
¶
Index ¶
- Constants
- Variables
- func APIErrorHandler(errIn error) (err error)
- func APIerRPCCall(inst interface{}, serviceMethod string, args interface{}, reply interface{}) error
- func AsMapStringIface(item interface{}) (map[string]interface{}, error)
- func Avg(values []float64) float64
- func AvgNegative(values []float64) float64
- func BoolPointer(b bool) *bool
- func CapitalizedMessage(errMessage string) (capStr string)
- func CastIfToString(iface interface{}) (strVal string, casts bool)
- func CastRPCErr(err error) error
- func Clone(a, b interface{}) error
- func ConcatenatedKey(keyVals ...string) string
- func ConvertMapValStrIf(inMap map[string]string) map[string]interface{}
- func CopyHour(src, dest time.Time) time.Time
- func DaysInMonth(year int, month time.Month) float64
- func DaysInYear(year int) float64
- func Difference(items ...interface{}) (diff interface{}, err error)
- func DurationPointer(d time.Duration) *time.Duration
- func EqualTo(item, oItem interface{}) (eq bool, err error)
- func ErrEnvNotFound(key string) error
- func ErrHasPrefix(err error, prfx string) (has bool)
- func ErrNotConvertibleTF(from, to string) error
- func ErrPathNotReachable(path string) error
- func ErrPrefix(err error, reason string) error
- func ErrPrefixNotErrNotImplemented(reason string) error
- func ErrPrefixNotFound(reason string) error
- func FallbackSubjKeys(tenant, tor, fallbackSubjects string) []string
- func Fib() func() int
- func FirstNonEmpty(vals ...string) string
- func Float64Pointer(f float64) *float64
- func FmtFieldWidth(fieldID, source string, width int, strip, padding string, mandatory bool) (string, error)
- func FromMapStringInterface(m map[string]interface{}, in interface{}) error
- func FromMapStringInterfaceValue(m map[string]interface{}, v reflect.Value) (interface{}, error)
- func FromMapStringString(m map[string]string, in interface{})
- func GenUUID() string
- func GetBasicType(item interface{}) interface{}
- func GetCGRVersion() (vers string, err error)
- func GetEndOfMonth(ref time.Time) time.Time
- func GetMapExtraFields(in interface{}, extraFields string) map[string]string
- func GetPathIndex(spath string) (opath string, idx *int)
- func GetStartTime() string
- func GetUniformType(item interface{}) (interface{}, error)
- func GetUrlRawArguments(dialURL string) (out map[string]string)
- func GreaterThan(item, oItem interface{}, orEqual bool) (gte bool, err error)
- func IfaceAsBool(itm interface{}) (b bool, err error)
- func IfaceAsDuration(itm interface{}) (d time.Duration, err error)
- func IfaceAsFloat64(itm interface{}) (f float64, err error)
- func IfaceAsInt64(itm interface{}) (i int64, err error)
- func IfaceAsSliceString(fld interface{}) (out []string, err error)
- func IfaceAsString(fld interface{}) (out string)
- func IfaceAsTInt64(itm interface{}) (i int64, err error)
- func IfaceAsTime(itm interface{}, timezone string) (t time.Time, err error)
- func InfieldJoin(vals ...string) string
- func InfieldSplit(val string) []string
- func Int64Pointer(i int64) *int64
- func IntPointer(i int) *int
- func IsNetworkError(err error) bool
- func IsSliceMember(ss []string, s string) bool
- func LogFull(v interface{})
- func LogStack()
- func LongExecTimeDetector(logID string, maxDur time.Duration) (endchan chan struct{})
- func MapKeys(m map[string]string) []string
- func MapStringStringPointer(mp map[string]string) *map[string]string
- func MapStringToInt64(in map[string]string) (out map[string]int64, err error)
- func MaskSuffix(dest string, maskLen int) string
- func MergeMapsStringIface(mps ...map[string]interface{}) (outMp map[string]interface{})
- func MinDuration(d1, d2 time.Duration) time.Duration
- func MirrorMap(mapIn map[string]string) map[string]string
- func MissingMapFields(s map[string]interface{}, mandatories []string) []string
- func MissingMapKeys(inMap map[string]string, requiredKeys []string) []string
- func MissingStructFields(s interface{}, mandatories []string) []string
- func NewBiJSONrpcClient(addr string, handlers map[string]interface{}) (*rpc2.Client, error)
- func NewCustomJSONServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
- func NewErrAttributeS(err error) error
- func NewErrDispatcherS(err error) error
- func NewErrFldStringCast(fldName string, valIface interface{}) error
- func NewErrMandatoryIeMissing(fields ...string) error
- func NewErrNotConnected(serv string) error
- func NewErrRALs(err error) error
- func NewErrResourceS(err error) error
- func NewErrServerError(err error) error
- func NewErrServiceNotOperational(serv string) error
- func NewErrStringCast(valIface interface{}) error
- func NewErrSupplierS(err error) error
- func NewRPCRequest(r io.Reader) *rpcRequest
- func Newlogger(loggertype, id string) (err error)
- func NonemptyStructFields(s interface{}) map[string]interface{}
- func ParseDurationWithNanosecs(durStr string) (d time.Duration, err error)
- func ParseDurationWithSecs(durStr string) (d time.Duration, err error)
- func ParseTimeDetectLayout(tmStr string, timezone string) (time.Time, error)
- func ParseZeroRatingSubject(tor, rateSubj string, defaultRateSubj map[string]string) (time.Duration, error)
- func PrefixSliceItems(slc []string, prfx string) (out []string)
- func RPCCall(inst interface{}, serviceMethod string, args interface{}, reply interface{}) error
- func RandomInteger(min, max int) int
- func ReflectFieldAsString(intf interface{}, fldName, extraFieldsLabel string) (string, error)
- func ReflectFieldInterface(intf interface{}, fldName, extraFieldsLabel string) (retIf interface{}, err error)
- func ReflectFieldMethodInterface(obj interface{}, fldName string) (retIf interface{}, err error)
- func RegisterRpcParams(name string, obj interface{})
- func ReverseString(s string) string
- func Round(x float64, prec int, method string) float64
- func RoundDuration(whole, amount time.Duration) time.Duration
- func SetMapExtraFields(in interface{}, values map[string]string, extraFields string)
- func Sha1(attrs ...string) string
- func SizeFmt(num float64, suffix string) string
- func SliceHasMember(ss []string, s string) bool
- func SliceMemberHasPrefix(ss []string, prfx string) bool
- func SliceStringToIface(slc []string) (ifc []interface{})
- func SliceWithoutMember(ss []string, s string) []string
- func SplitConcatenatedKey(key string) []string
- func SplitPrefix(prefix string, minLength int) []string
- func StringPointer(str string) *string
- func StringToInterface(s string) interface{}
- func StripSlicePrefix(slc []string, nrItems int) []string
- func Sum(items ...interface{}) (sum interface{}, err error)
- func TimeIs0h(t time.Time) bool
- func TimePointer(t time.Time) *time.Time
- func ToIJSON(v interface{}) string
- func ToJSON(v interface{}) string
- func ToMapMapStringInterface(in interface{}) map[string]interface{}
- func ToMapStringString(in interface{}) map[string]string
- func UUIDSha1Prefix() string
- func Unzip(src, dest string) error
- func UpdateStructWithIfaceMap(s interface{}, mp map[string]interface{}) (err error)
- func UpdateStructWithStrMap(s interface{}, m map[string]string) []string
- func WarnExecTime(startTime time.Time, logID string, maxDur time.Duration)
- type ActivationInterval
- type ApierTPTiming
- type ArgDispatcher
- type ArgRSv1ResourceUsage
- type ArgsCache
- type ArgsCacheKeys
- type ArgsComputeFilterIndexIDs
- type ArgsComputeFilterIndexes
- type ArgsGetCacheItem
- type ArgsGetCacheItemIDs
- type ArgsGetCacheItemIDsWithArgDispatcher
- type ArgsGetCacheItemWithArgDispatcher
- type ArgsGetGroup
- type ArgsGetGroupWithArgDispatcher
- type AttrCacheIDsWithArgDispatcher
- type AttrDirExportTP
- type AttrDisconnectSession
- type AttrExecuteAction
- type AttrExpFileCdrs
- type AttrGetAccount
- type AttrGetAccounts
- type AttrGetCallCost
- type AttrGetCdrs
- type AttrGetRatingProfile
- type AttrImportTPFromFolder
- type AttrLoadTpFromFolder
- type AttrReloadCache
- type AttrReloadCacheWithArgDispatcher
- type AttrRemoteLock
- type AttrRemoveAccount
- type AttrSetAccount
- type AttrSetActions
- type AttrSetBalance
- type AttrSetDestination
- type AttrSetRatingProfile
- type AttrTPRatingProfileIds
- type BiRPCClient
- type BiRPCInternalClient
- type BiRPCServer
- type CDRsFilter
- type CGRError
- type CGREvent
- func (ev *CGREvent) CheckMandatoryFields(fldNames []string) error
- func (ev *CGREvent) Clone() (clned *CGREvent)
- func (ev *CGREvent) ExtractArgs(dispatcherFlag, consumeSupplierPaginator bool) (ca ExtractedArgs)
- func (ev *CGREvent) FieldAsDuration(fldName string) (d time.Duration, err error)
- func (ev *CGREvent) FieldAsFloat64(fldName string) (f float64, err error)
- func (ev *CGREvent) FieldAsString(fldName string) (val string, err error)
- func (ev *CGREvent) FieldAsTime(fldName string, timezone string) (t time.Time, err error)
- func (ev *CGREvent) HasField(fldName string) (has bool)
- func (ev *CGREvent) TenantID() string
- type CGREventWithArgDispatcher
- type CGREvents
- type CacheFileInfo
- type CacheKeys
- type CachedRPCResponse
- type CgrIORecordWriter
- type CgrRecordWriter
- type Counter
- type DataConverter
- func NewDataConverter(params string) (conv DataConverter, err error)
- func NewDataConverterMustCompile(params string) (conv DataConverter)
- func NewDivideConverter(constructParams string) (hdlr DataConverter, err error)
- func NewDurationConverter(params string) (hdlr DataConverter, err error)
- func NewDurationNanosecondsConverter(params string) (hdlr DataConverter, err error)
- func NewDurationSecondsConverter(params string) (hdlr DataConverter, err error)
- func NewMultiplyConverter(constructParams string) (hdlr DataConverter, err error)
- func NewPhoneNumberConverter(params string) (pbDC DataConverter, err error)
- func NewRoundConverter(params string) (hdlr DataConverter, err error)
- type DataConverters
- type DestinationRate
- type DivideConverter
- type DurationConverter
- type DurationNanosecondsConverter
- type DurationSecondsConverter
- type ExportedFileCdrs
- type ExportedTPStats
- type ExtractedArgs
- type FieldMultiplyFactor
- type FlagsWithParams
- type GetFilterIndexesArg
- type HierarchyPath
- type Int64Slice
- type LoadInstance
- type LoggerInterface
- type MatchFilterIndexArg
- type MethodParameters
- type MetricWithFilters
- type MonthDays
- func (md MonthDays) Contains(monthDay int) (result bool)
- func (md MonthDays) Equals(oMD MonthDays) bool
- func (md MonthDays) Len() int
- func (md MonthDays) Less(j, i int) bool
- func (md *MonthDays) Parse(input, sep string)
- func (md MonthDays) Serialize(sep string) string
- func (md MonthDays) Sort()
- func (md MonthDays) Swap(i, j int)
- type Months
- func (m Months) Contains(month time.Month) (result bool)
- func (m Months) Equals(oM Months) bool
- func (m Months) IsComplete() bool
- func (m Months) Len() int
- func (m Months) Less(j, i int) bool
- func (m *Months) Parse(input, sep string)
- func (m Months) Serialize(sep string) string
- func (m Months) Sort()
- func (m Months) Swap(i, j int)
- type MultiplyConverter
- type NetAddr
- type Paginator
- type PaginatorWithSearch
- type PhoneNumberConverter
- type RPCCDRsFilter
- type RPCCDRsFilterWithArgDispatcher
- type RSRField
- type RSRFields
- type RSRFilter
- type RSRFilters
- type RateSlot
- type RatingPlanCostArg
- type ReSearchReplace
- type RoundConverter
- type RpcParams
- type SMCostFilter
- type Server
- func (s *Server) BiRPCRegister(rcvr interface{})
- func (s *Server) BiRPCRegisterName(method string, handlerFunc interface{})
- func (s *Server) RegisterHttpFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (s *Server) RegisterHttpHandler(pattern string, handler http.Handler)
- func (s *Server) RegisterProfiler(addr string)
- func (s *Server) RpcRegister(rcvr interface{})
- func (s *Server) RpcRegisterName(name string, rcvr interface{})
- func (s *Server) ServeBiJSON(addr string, onConn func(*rpc2.Client), onDis func(*rpc2.Client)) (err error)
- func (s *Server) ServeGOB(addr string)
- func (s *Server) ServeGOBTLS(addr, serverCrt, serverKey, caCert string, serverPolicy int, serverName string)
- func (s *Server) ServeHTTP(addr string, jsonRPCURL string, wsRPCURL string, useBasicAuth bool, ...)
- func (s *Server) ServeHTTPTLS(addr, serverCrt, serverKey, caCert string, serverPolicy int, serverName string, ...)
- func (s *Server) ServeJSON(addr string)
- func (s *Server) ServeJSONTLS(addr, serverCrt, serverKey, caCert string, serverPolicy int, serverName string)
- func (s *Server) SetDispatched()
- func (s *Server) StopBiRPC()
- type SessionFilter
- type SetFilterIndexesArg
- type StdLogger
- func (sl *StdLogger) Alert(m string) (err error)
- func (sl *StdLogger) Close() (err error)
- func (sl *StdLogger) Crit(m string) (err error)
- func (sl *StdLogger) Debug(m string) (err error)
- func (sl *StdLogger) Emerg(m string) (err error)
- func (sl *StdLogger) Err(m string) (err error)
- func (sl *StdLogger) GetSyslog() *syslog.Writer
- func (sl *StdLogger) Info(m string) (err error)
- func (sl *StdLogger) Notice(m string) (err error)
- func (sl *StdLogger) SetLogLevel(level int)
- func (sl *StdLogger) SetSyslog(l *syslog.Writer)
- func (sl *StdLogger) Warning(m string) (err error)
- func (sl *StdLogger) Write(p []byte) (n int, err error)
- type StringMap
- func (sm StringMap) Clone() StringMap
- func (sm StringMap) Copy(o StringMap)
- func (sm StringMap) Equal(om StringMap) bool
- func (sm StringMap) GetOne() string
- func (sm StringMap) GetSlice() (result []string)
- func (sm StringMap) HasKey(key string) (has bool)
- func (sm StringMap) Includes(om StringMap) bool
- func (sm StringMap) IsEmpty() bool
- func (sm StringMap) Join(mps ...StringMap)
- func (sm StringMap) Slice() []string
- func (sm StringMap) String() string
- type StringSet
- func (s *StringSet) Add(val string)
- func (s *StringSet) AddSlice(dataSlice []string)
- func (s *StringSet) AsSlice() []string
- func (s *StringSet) Data() map[string]struct{}
- func (s *StringSet) Has(val string) bool
- func (s *StringSet) Intersect(s2 *StringSet)
- func (s *StringSet) Remove(val string)
- func (s *StringSet) Size() int
- type TPAccountActions
- type TPAction
- type TPActionPlan
- type TPActionTiming
- type TPActionTrigger
- type TPActionTriggers
- type TPActions
- type TPActivationInterval
- type TPAttribute
- type TPAttributeProfile
- type TPChargerProfile
- type TPDestination
- type TPDestinationRate
- type TPDispatcherHost
- type TPDispatcherHostConn
- type TPDispatcherHostProfile
- type TPDispatcherProfile
- type TPDistinctIds
- type TPFilter
- type TPFilterProfile
- type TPRate
- type TPRatingActivation
- type TPRatingPlan
- type TPRatingPlanBinding
- type TPRatingProfile
- type TPResourceProfile
- type TPSharedGroup
- type TPSharedGroups
- type TPStatProfile
- type TPSupplier
- type TPSupplierProfile
- type TPThresholdProfile
- type TPTiming
- type TPTntID
- type TenantAccount
- type TenantArg
- type TenantArgWithPaginator
- type TenantID
- type TenantIDWithArgDispatcher
- type TenantIDWithCache
- type TenantWithArgDispatcher
- type TimeInterval
- type UsageInterval
- type ValueFormula
- type WeekDays
- func (wd WeekDays) Contains(weekDay time.Weekday) (result bool)
- func (wd WeekDays) Equals(oWD WeekDays) bool
- func (wd WeekDays) Len() int
- func (wd WeekDays) Less(j, i int) bool
- func (wd *WeekDays) Parse(input, sep string)
- func (wd WeekDays) Serialize(sep string) string
- func (wd WeekDays) Sort()
- func (wd WeekDays) Swap(i, j int)
- type Years
Constants ¶
const ( CGRateS = "CGRateS" VERSION = "v0.10.0" DIAMETER_FIRMWARE_REVISION = 918 REDIS_MAX_CONNS = 10 CGRATES = "cgrates" POSTGRES = "postgres" MYSQL = "mysql" MONGO = "mongo" REDIS = "redis" INTERNAL = "internal" DataManager = "DataManager" LOCALHOST = "127.0.0.1" PREPAID = "prepaid" META_PREPAID = "*prepaid" POSTPAID = "postpaid" META_POSTPAID = "*postpaid" PSEUDOPREPAID = "pseudoprepaid" META_PSEUDOPREPAID = "*pseudoprepaid" META_RATED = "*rated" META_NONE = "*none" META_NOW = "*now" ROUNDING_UP = "*up" ROUNDING_MIDDLE = "*middle" ROUNDING_DOWN = "*down" ANY = "*any" MetaAll = "*all" ZERO = "*zero" ASAP = "*asap" COMMENT_CHAR = '#' CSV_SEP = ',' FALLBACK_SEP = ';' INFIELD_SEP = ";" MetaPipe = "*|" FIELDS_SEP = "," InInFieldSep = ":" STATIC_HDRVAL_SEP = "::" REGEXP_PREFIX = "~" FILTER_VAL_START = "(" FILTER_VAL_END = ")" JSON = "json" MSGPACK = "msgpack" CSV_LOAD = "CSVLOAD" CGRID = "CGRID" ToR = "ToR" OrderID = "OrderID" OriginID = "OriginID" InitialOriginID = "InitialOriginID" OriginIDPrefix = "OriginIDPrefix" Source = "Source" OriginHost = "OriginHost" RequestType = "RequestType" Direction = "Direction" Tenant = "Tenant" Category = "Category" Context = "Context" Contexts = "Contexts" Account = "Account" Subject = "Subject" Destination = "Destination" SetupTime = "SetupTime" AnswerTime = "AnswerTime" Usage = "Usage" Value = "Value" LastUsed = "LastUsed" PDD = "PDD" SUPPLIER = "Supplier" RunID = "RunID" MetaReqRunID = "*req.RunID" COST = "Cost" CostDetails = "CostDetails" RATED = "rated" Partial = "Partial" PreRated = "PreRated" STATIC_VALUE_PREFIX = "^" CSV = "csv" FWV = "fwv" MetaPartialCSV = "*partial_csv" DRYRUN = "dry_run" META_COMBIMED = "*combimed" MetaMongo = "*mongo" MetaPostgres = "*postgres" MetaInternal = "*internal" MetaLocalHost = "*localhost" ZERO_RATING_SUBJECT_PREFIX = "*zero" OK = "OK" MetaFileXML = "*file_xml" CDRE = "cdre" MASK_CHAR = "*" CONCATENATED_KEY_SEP = ":" UNIT_TEST = "UNIT_TEST" HDR_VAL_SEP = "/" MONETARY = "*monetary" SMS = "*sms" MMS = "*mms" GENERIC = "*generic" DATA = "*data" VOICE = "*voice" MAX_COST_FREE = "*free" MAX_COST_DISCONNECT = "*disconnect" SECONDS = "seconds" META_OUT = "*out" META_ANY = "*any" ASR = "ASR" ACD = "ACD" TASKS_KEY = "tasks" ACTION_PLAN_PREFIX = "apl_" AccountActionPlansPrefix = "aap_" ACTION_TRIGGER_PREFIX = "atr_" RATING_PLAN_PREFIX = "rpl_" RATING_PROFILE_PREFIX = "rpf_" ACTION_PREFIX = "act_" SHARED_GROUP_PREFIX = "shg_" ACCOUNT_PREFIX = "acc_" DESTINATION_PREFIX = "dst_" REVERSE_DESTINATION_PREFIX = "rds_" DERIVEDCHARGERS_PREFIX = "dcs_" USERS_PREFIX = "usr_" ResourcesPrefix = "res_" ResourceProfilesPrefix = "rsp_" ThresholdPrefix = "thd_" TimingsPrefix = "tmg_" FilterPrefix = "ftr_" CDR_STATS_PREFIX = "cst_" VERSION_PREFIX = "ver_" StatQueueProfilePrefix = "sqp_" SupplierProfilePrefix = "spp_" AttributeProfilePrefix = "alp_" ChargerProfilePrefix = "cpp_" DispatcherProfilePrefix = "dpp_" DispatcherHostPrefix = "dph_" ThresholdProfilePrefix = "thp_" StatQueuePrefix = "stq_" LoadIDPrefix = "lid_" LOADINST_KEY = "load_history" CREATE_CDRS_TABLES_SQL = "create_cdrs_tables.sql" CREATE_TARIFFPLAN_TABLES_SQL = "create_tariffplan_tables.sql" TEST_SQL = "TEST_SQL" META_CONSTANT = "*constant" META_FILLER = "*filler" META_HANDLER = "*handler" MetaHTTPPost = "*http_post" MetaHTTPjson = "*http_json" MetaHTTPjsonCDR = "*http_json_cdr" MetaHTTPjsonMap = "*http_json_map" MetaAMQPjsonCDR = "*amqp_json_cdr" MetaAMQPjsonMap = "*amqp_json_map" MetaAMQPV1jsonMap = "*amqpv1_json_map" MetaSQSjsonMap = "*sqs_json_map" MetaKafkajsonMap = "*kafka_json_map" MetaSQL = "*sql" MetaMySQL = "*mysql" MetaS3jsonMap = "*s3_json_map" CONFIG_PATH = "/etc/cgrates/" DISCONNECT_CAUSE = "DisconnectCause" MetaFlatstore = "*flatstore" MetaRating = "*rating" NOT_AVAILABLE = "N/A" CALL = "call" EXTRA_FIELDS = "ExtraFields" META_SURETAX = "*sure_tax" MetaDynamic = "*dynamic" COUNTER_EVENT = "*event" COUNTER_BALANCE = "*balance" EVENT_NAME = "EventName" // action trigger threshold types TRIGGER_MIN_EVENT_COUNTER = "*min_event_counter" TRIGGER_MAX_EVENT_COUNTER = "*max_event_counter" TRIGGER_MAX_BALANCE_COUNTER = "*max_balance_counter" TRIGGER_MIN_BALANCE = "*min_balance" TRIGGER_MAX_BALANCE = "*max_balance" TRIGGER_BALANCE_EXPIRED = "*balance_expired" HIERARCHY_SEP = ">" META_COMPOSED = "*composed" META_USAGE_DIFFERENCE = "*usage_difference" MetaDifference = "*difference" MetaVariable = "*variable" MetaCCUsage = "*cc_usage" MetaValueExponent = "*value_exponent" NegativePrefix = "!" MatchStartPrefix = "^" MatchGreaterThanOrEqual = ">=" MatchLessThanOrEqual = "<=" MatchGreaterThan = ">" MatchLessThan = "<" MatchEndPrefix = "$" MetaRaw = "*raw" CreatedAt = "CreatedAt" UpdatedAt = "UpdatedAt" HandlerArgSep = "|" NodeID = "NodeID" ActiveGoroutines = "ActiveGoroutines" MemoryUsage = "MemoryUsage" RunningSince = "RunningSince" GoVersion = "GoVersion" SessionTTL = "SessionTTL" SessionTTLMaxDelay = "SessionTTLMaxDelay" SessionTTLLastUsed = "SessionTTLLastUsed" SessionTTLUsage = "SessionTTLUsage" HandlerSubstractUsage = "*substract_usage" XML = "xml" MetaGOB = "*gob" MetaJSON = "*json" MetaMSGPACK = "*msgpack" MetaDateTime = "*datetime" MetaMaskedDestination = "*masked_destination" MetaUnixTimestamp = "*unix_timestamp" MetaPostCDR = "*post_cdr" MetaDumpToFile = "*dump_to_file" NonTransactional = "" DataDB = "data_db" StorDB = "stor_db" NotFoundCaps = "NOT_FOUND" ServerErrorCaps = "SERVER_ERROR" MandatoryIEMissingCaps = "MANDATORY_IE_MISSING" UnsupportedCachePrefix = "unsupported cache prefix" CDRSCtx = "cdrs" MandatoryInfoMissing = "mandatory information missing" UnsupportedServiceIDCaps = "UNSUPPORTED_SERVICE_ID" ServiceManager = "service_manager" ServiceAlreadyRunning = "service already running" RunningCaps = "RUNNING" StoppedCaps = "STOPPED" SchedulerNotRunningCaps = "SCHEDULLER_NOT_RUNNING" MetaScheduler = "*scheduler" MetaSessionsCosts = "*sessions_costs" MetaRALs = "*rals" MetaRerate = "*rerate" MetaRefund = "*refund" MetaStats = "*stats" MetaResponder = "*responder" MetaCore = "*core" MetaServiceManager = "*servicemanager" MetaChargers = "*chargers" MetaConfig = "*config" MetaDispatchers = "*dispatchers" MetaDispatcherHosts = "*dispatcher_hosts" MetaFilters = "*filters" MetaCDRs = "*cdrs" MetaCaches = "*caches" MetaGuardian = "*guardians" MetaContinue = "*continue" Migrator = "migrator" UnsupportedMigrationTask = "unsupported migration task" NoStorDBConnection = "not connected to StorDB" UndefinedVersion = "undefined version" TxtSuffix = ".txt" JSNSuffix = ".json" GOBSuffix = ".gob" FormSuffix = ".form" XMLSuffix = ".xml" CSVSuffix = ".csv" FWVSuffix = ".fwv" CONTENT_JSON = "json" CONTENT_FORM = "form" CONTENT_TEXT = "text" FileLockPrefix = "file_" ActionsPoster = "act" CDRPoster = "cdr" MetaFileCSV = "*file_csv" MetaFileFWV = "*file_fwv" MetaFScsv = "*freeswitch_csv" Accounts = "Accounts" AccountService = "AccountS" Actions = "Actions" ActionPlans = "ActionPlans" ActionTriggers = "ActionTriggers" TimingIDs = "TimingIDs" Timings = "Timings" Rates = "Rates" DestinationRates = "DestinationRates" RatingPlans = "RatingPlans" RatingProfiles = "RatingProfiles" AccountActions = "AccountActions" Resources = "Resources" Stats = "Stats" Filters = "Filters" DispatcherProfiles = "DispatcherProfiles" DispatcherHosts = "DispatcherHosts" MetaEveryMinute = "*every_minute" MetaHourly = "*hourly" ID = "ID" Thresholds = "Thresholds" Suppliers = "Suppliers" Attributes = "Attributes" Chargers = "Chargers" Dispatchers = "Dispatchers" StatS = "Stats" LoadIDsVrs = "LoadIDs" RALService = "RALs" CostSource = "CostSource" ExtraInfo = "ExtraInfo" Meta = "*" MetaSysLog = "*syslog" MetaStdLog = "*stdout" EventType = "EventType" EventSource = "EventSource" AccountID = "AccountID" ResourceID = "ResourceID" TotalUsage = "TotalUsage" StatID = "StatID" BalanceType = "BalanceType" BalanceID = "BalanceID" BalanceDestinationIds = "BalanceDestinationIds" BalanceWeight = "BalanceWeight" BalanceExpirationDate = "BalanceExpirationDate" BalanceTimingTags = "BalanceTimingTags" BalanceRatingSubject = "BalanceRatingSubject" BalanceCategories = "BalanceCategories" BalanceBlocker = "BalanceBlocker" BalanceDisabled = "BalanceDisabled" Units = "Units" AccountUpdate = "AccountUpdate" BalanceUpdate = "BalanceUpdate" StatUpdate = "StatUpdate" ResourceUpdate = "ResourceUpdate" CDR = "CDR" CDRs = "CDRs" ExpiryTime = "ExpiryTime" AllowNegative = "AllowNegative" Disabled = "Disabled" Action = "Action" MetaNow = "*now" SessionSCosts = "SessionSCosts" Timing = "Timing" RQF = "RQF" Resource = "Resource" User = "User" Subscribers = "Subscribers" DerivedChargersV = "DerivedChargers" Destinations = "Destinations" ReverseDestinations = "ReverseDestinations" RatingPlan = "RatingPlan" RatingProfile = "RatingProfile" MetaRatingPlans = "*rating_plans" MetaRatingProfiles = "*rating_profiles" MetaUsers = "*users" MetaSubscribers = "*subscribers" MetaDerivedChargersV = "*derivedchargers" MetaStorDB = "*stordb" MetaDataDB = "*datadb" MetaWeight = "*weight" MetaLC = "*lc" MetaHC = "*hc" MetaQOS = "*qos" MetaReas = "*reas" MetaReds = "*reds" Weight = "Weight" Cost = "Cost" DestinationIDs = "DestinationIDs" RatingSubject = "RatingSubject" Categories = "Categories" Blocker = "Blocker" RatingPlanID = "RatingPlanID" StartTime = "StartTime" AccountSummary = "AccountSummary" RatingFilters = "RatingFilters" RatingFilter = "RatingFilter" Accounting = "Accounting" Rating = "Rating" Charges = "Charges" CompressFactor = "CompressFactor" Increments = "Increments" Balance = "Balance" BalanceSummaries = "BalanceSummaries" Type = "Type" YearsFieldName = "Years" MonthsFieldName = "Months" MonthDaysFieldName = "MonthDays" WeekDaysFieldName = "WeekDays" GroupIntervalStart = "GroupIntervalStart" RateIncrement = "RateIncrement" RateUnit = "RateUnit" BalanceUUID = "BalanceUUID" RatingID = "RatingID" ExtraChargeID = "ExtraChargeID" ConnectFee = "ConnectFee" RoundingMethod = "RoundingMethod" RoundingDecimals = "RoundingDecimals" MaxCostStrategy = "MaxCostStrategy" TimingID = "TimingID" RatesID = "RatesID" RatingFiltersID = "RatingFiltersID" AccountingID = "AccountingID" MetaSessionS = "*sessions" MetaDefault = "*default" Error = "Error" MetaCgreq = "*cgreq" MetaCgrep = "*cgrep" MetaCGRAReq = "*cgrareq" CGR_ACD = "cgr_acd" FilterIDs = "FilterIDs" FieldName = "FieldName" Path = "Path" MetaRound = "*round" Pong = "Pong" MetaEventCost = "*event_cost" MetaSuppliersEventCost = "*suppliers_event_cost" MetaSuppliersIgnoreErrors = "*suppliers_ignore_errors" Freeswitch = "freeswitch" Kamailio = "kamailio" Opensips = "opensips" Asterisk = "asterisk" SchedulerS = "SchedulerS" MetaMultiply = "*multiply" MetaDivide = "*divide" MetaUrl = "*url" MetaXml = "*xml" ApiKey = "apikey" MetaReq = "*req" MetaVars = "*vars" MetaRep = "*rep" MetaExp = "*exp" MetaHdr = "*hdr" MetaTrl = "*trl" CGROriginHost = "cgr_originhost" MetaInitiate = "*initiate" MetaUpdate = "*update" MetaTerminate = "*terminate" MetaEvent = "*event" MetaMessage = "*message" MetaDryRun = "*dryrun" Event = "Event" EmptyString = "" DynamicDataPrefix = "~" AttrValueSep = "=" ANDSep = "&" PipeSep = "|" MetaApp = "*app" MetaAppID = "*appid" MetaCmd = "*cmd" MetaEnv = "*env:" // use in config for describing enviormant variables MetaTemplate = "*template" MetaCCA = "*cca" MetaErr = "*err" OriginRealm = "OriginRealm" ProductName = "ProductName" IdxStart = "[" IdxEnd = "]" MetaLog = "*log" MetaRemoteHost = "*remote_host" RemoteHost = "RemoteHost" Local = "local" TCP = "tcp" CGRDebitInterval = "CGRDebitInterval" Version = "Version" MetaTenant = "*tenant" ResourceUsage = "ResourceUsage" MetaDuration = "*duration" MetaLibPhoneNumber = "*libphonenumber" MetaReload = "*reload" MetaLoad = "*load" MetaRemove = "*remove" MetaStore = "*store" MetaClear = "*clear" MetaExport = "*export" LoadIDs = "load_ids" DNSAgent = "DNSAgent" TLSNoCaps = "tls" MetaRouteID = "*route_id" MetaApiKey = "*api_key" UsageID = "UsageID" Rcode = "Rcode" Replacement = "Replacement" Regexp = "Regexp" Order = "Order" Preference = "Preference" Flags = "Flags" Service = "Service" MetaSuppliersLimit = "*suppliers_limit" MetaSuppliersOffset = "*suppliers_offset" ApierV = "ApierV" MetaApier = "*apier" MetaAnalyzer = "*analyzer" CGREventString = "CGREvent" MetaTextPlain = "*text_plain" MetaIgnoreErrors = "*ignore_errors" MetaRelease = "*release" MetaAllocate = "*allocate" MetaAuthorize = "*authorize" MetaInit = "*init" MetaRatingPlanCost = "*rating_plan_cost" RatingPlanIDs = "RatingPlanIDs" ERs = "ERs" Ratio = "Ratio" Load = "Load" Slash = "/" UUID = "UUID" ActionsID = "ActionsID" MetaAct = "*act" DestinationPrefix = "DestinationPrefix" DestinationID = "DestinationID" ExportTemplate = "ExportTemplate" ExportFormat = "ExportFormat" Synchronous = "Synchronous" Attempts = "Attempts" FieldSeparator = "FieldSeparator" ExportPath = "ExportPath" ExportID = "ExportID" ExportFileName = "ExportFileName" GroupID = "GroupID" ThresholdType = "ThresholdType" ThresholdValue = "ThresholdValue" Recurrent = "Recurrent" Executed = "Executed" MinSleep = "MinSleep" ActivationDate = "ActivationDate" ExpirationDate = "ExpirationDate" MinQueuedItems = "MinQueuedItems" OrderIDStart = "OrderIDStart" OrderIDEnd = "OrderIDEnd" MinCost = "MinCost" MaxCost = "MaxCost" MetaLoaders = "*loaders" TmpSuffix = ".tmp" MetaDiamreq = "*diamreq" )
const ( Move = "move" Migrate = "migrate" )
Migrator Action
const ( MetaAccounts = "*accounts" MetaAccountActionPlans = "*account_action_plans" MetaReverseDestinations = "*reverse_destinations" MetaActionPlans = "*action_plans" MetaActionTriggers = "*action_triggers" MetaActions = "*actions" MetaResourceProfile = "*resource_profiles" MetaStatQueueProfiles = "*statqueue_profiles" MetaStatQueues = "*statqueues" MetaThresholdProfiles = "*threshold_profiles" MetaSupplierProfiles = "*supplier_profiles" MetaAttributeProfiles = "*attribute_profiles" MetaFilterIndexes = "*filter_indexes" MetaDispatcherProfiles = "*dispatcher_profiles" MetaChargerProfiles = "*charger_profiles" MetaThresholds = "*thresholds" MetaSuppliers = "*suppliers" MetaAttributes = "*attributes" MetaLoadIDs = "*load_ids" )
Meta Items
const ( MetaASR = "*asr" MetaACD = "*acd" MetaTCD = "*tcd" MetaACC = "*acc" MetaTCC = "*tcc" MetaPDD = "*pdd" MetaDDC = "*ddc" MetaSum = "*sum" MetaAverage = "*average" MetaDistinct = "*distinct" )
MetaMetrics
const ( SessionS = "SessionS" AttributeS = "AttributeS" SupplierS = "SupplierS" ResourceS = "ResourceS" StatService = "StatS" FilterS = "FilterS" ThresholdS = "ThresholdS" DispatcherS = "DispatcherS" LoaderS = "LoaderS" ChargerS = "ChargerS" CacheS = "CacheS" AnalyzerS = "AnalyzerS" CDRServer = "CDRServer" ResponderS = "ResponderS" GuardianS = "GuardianS" ApierS = "ApierS" )
Services
const ( SessionsLow = "sessions" AttributesLow = "attributes" ChargerSLow = "chargers" SuppliersLow = "suppliers" ResourcesLow = "resources" StatServiceLow = "stats" ThresholdsLow = "thresholds" DispatcherSLow = "dispatchers" AnalyzerSLow = "analyzers" SchedulerSLow = "schedulers" LoaderSLow = "loaders" RALsLow = "rals" ReplicatorLow = "replicator" ApierSLow = "apiers" )
Lower service names
const ( LOG = "*log" RESET_TRIGGERS = "*reset_triggers" SET_RECURRENT = "*set_recurrent" UNSET_RECURRENT = "*unset_recurrent" ALLOW_NEGATIVE = "*allow_negative" DENY_NEGATIVE = "*deny_negative" RESET_ACCOUNT = "*reset_account" REMOVE_ACCOUNT = "*remove_account" SET_BALANCE = "*set_balance" REMOVE_BALANCE = "*remove_balance" TOPUP_RESET = "*topup_reset" TOPUP = "*topup" DEBIT_RESET = "*debit_reset" DEBIT = "*debit" RESET_COUNTERS = "*reset_counters" ENABLE_ACCOUNT = "*enable_account" DISABLE_ACCOUNT = "*disable_account" HttpPost = "*http_post" HttpPostAsync = "*http_post_async" MAIL_ASYNC = "*mail_async" UNLIMITED = "*unlimited" CDRLOG = "*cdrlog" SET_DDESTINATIONS = "*set_ddestinations" TRANSFER_MONETARY_DEFAULT = "*transfer_monetary_default" CGR_RPC = "*cgr_rpc" TopUpZeroNegative = "*topup_zero_negative" SetExpiry = "*set_expiry" MetaPublishAccount = "*publish_account" MetaPublishBalance = "*publish_balance" MetaRemoveSessionCosts = "*remove_session_costs" MetaRemoveExpired = "*remove_expired" MetaPostEvent = "*post_event" MetaCDRAccount = "*cdr_account" )
Actions
const ( MetaSetVersions = "*set_versions" MetaEnsureIndexes = "*ensure_indexes" MetaTpRatingPlans = "*tp_rating_plans" MetaTpFilters = "*tp_filters" MetaTpDestinationRates = "*tp_destination_rates" MetaTpActionTriggers = "*tp_action_triggers" MetaTpAccountActions = "*tp_account_actions" MetaTpActionPlans = "*tp_action_plans" MetaTpActions = "*tp_actions" MetaTpThresholds = "*tp_thresholds" MetaTpSuppliers = "*tp_suppliers" MetaTpStats = "*tp_stats" MetaTpRatingProfiles = "*tp_rating_profiles" MetaTpResources = "*tp_resources" MetaTpRates = "*tp_rates" MetaTpTimings = "*tp_timings" MetaTpDestinations = "*tp_destinations" MetaTpChargers = "*tp_chargers" MetaTpDispatchers = "*tp_dispatchers" MetaDurationSeconds = "*duration_seconds" MetaDurationNanoseconds = "*duration_nanoseconds" CapAttributes = "Attributes" CapResourceMessage = "ResourceMessage" CapResourceAllocation = "ResourceAllocation" CapMaxUsage = "MaxUsage" CapSuppliers = "Suppliers" CapThresholds = "Thresholds" CapStatQueues = "StatQueues" )
Migrator Metas
const ( TpRatingPlans = "TpRatingPlans" TpFilters = "TpFilters" TpDestinationRates = "TpDestinationRates" TpActionTriggers = "TpActionTriggers" TpAccountActionsV = "TpAccountActions" TpActionPlans = "TpActionPlans" TpActions = "TpActions" TpThresholds = "TpThresholds" TpSuppliers = "TpSuppliers" TpStats = "TpStats" TpRatingProfiles = "TpRatingProfiles" TpResources = "TpResources" TpRates = "TpRates" TpTiming = "TpTiming" TpResource = "TpResource" TpDestinations = "TpDestinations" TpRatingPlan = "TpRatingPlan" TpRatingProfile = "TpRatingProfile" TpChargers = "TpChargers" TpDispatchers = "TpDispatchers" )
const ( MetaFirst = "*first" MetaRandom = "*random" MetaBroadcast = "*broadcast" MetaRoundRobin = "*round_robin" MetaRatio = "*ratio" ThresholdSv1 = "ThresholdSv1" StatSv1 = "StatSv1" ResourceSv1 = "ResourceSv1" SupplierSv1 = "SupplierSv1" AttributeSv1 = "AttributeSv1" SessionSv1 = "SessionSv1" ChargerSv1 = "ChargerSv1" MetaAuth = "*auth" APIKey = "APIKey" RouteID = "RouteID" APIMethods = "APIMethods" NestingSep = "." ArgDispatcherField = "ArgDispatcher" )
Dispatcher Const
const ( MetaNot = "*not" MetaString = "*string" MetaPrefix = "*prefix" MetaSuffix = "*suffix" MetaEmpty = "*empty" MetaExists = "*exists" MetaTimings = "*timings" MetaRSR = "*rsr" MetaStatS = "*stats" MetaDestinations = "*destinations" MetaLessThan = "*lt" MetaLessOrEqual = "*lte" MetaGreaterThan = "*gt" MetaGreaterOrEqual = "*gte" MetaResources = "*resources" MetaEqual = "*eq" MetaNotString = "*notstring" MetaNotPrefix = "*notprefix" MetaNotSuffix = "*notsuffix" MetaNotEmpty = "*notempty" MetaNotExists = "*notexists" MetaNotTimings = "*nottimings" MetaNotRSR = "*notrsr" MetaNotStatS = "*notstats" MetaNotDestinations = "*notdestinations" MetaNotResources = "*notresources" MetaNotEqual = "*noteq" MetaEC = "*ec" )
Filter types
const ( ReplicatorSv1 = "ReplicatorSv1" ReplicatorSv1Ping = "ReplicatorSv1.Ping" ReplicatorSv1GetAccount = "ReplicatorSv1.GetAccount" ReplicatorSv1GetDestination = "ReplicatorSv1.GetDestination" ReplicatorSv1GetReverseDestination = "ReplicatorSv1.GetReverseDestination" ReplicatorSv1GetStatQueue = "ReplicatorSv1.GetStatQueue" ReplicatorSv1GetFilter = "ReplicatorSv1.GetFilter" ReplicatorSv1GetThreshold = "ReplicatorSv1.GetThreshold" ReplicatorSv1GetThresholdProfile = "ReplicatorSv1.GetThresholdProfile" ReplicatorSv1GetStatQueueProfile = "ReplicatorSv1.GetStatQueueProfile" ReplicatorSv1GetTiming = "ReplicatorSv1.GetTiming" ReplicatorSv1GetResource = "ReplicatorSv1.GetResource" ReplicatorSv1GetResourceProfile = "ReplicatorSv1.GetResourceProfile" ReplicatorSv1GetActionTriggers = "ReplicatorSv1.GetActionTriggers" ReplicatorSv1GetActions = "ReplicatorSv1.GetActions" ReplicatorSv1GetActionPlan = "ReplicatorSv1.GetActionPlan" ReplicatorSv1GetAllActionPlans = "ReplicatorSv1.GetAllActionPlans" ReplicatorSv1GetAccountActionPlans = "ReplicatorSv1.GetAccountActionPlans" ReplicatorSv1GetRatingPlan = "ReplicatorSv1.GetRatingPlan" ReplicatorSv1GetRatingProfile = "ReplicatorSv1.GetRatingProfile" ReplicatorSv1GetSupplierProfile = "ReplicatorSv1.GetSupplierProfile" ReplicatorSv1GetAttributeProfile = "ReplicatorSv1.GetAttributeProfile" ReplicatorSv1GetChargerProfile = "ReplicatorSv1.GetChargerProfile" ReplicatorSv1GetDispatcherProfile = "ReplicatorSv1.GetDispatcherProfile" ReplicatorSv1GetDispatcherHost = "ReplicatorSv1.GetDispatcheHost" ReplicatorSv1GetItemLoadIDs = "ReplicatorSv1.GetItemLoadIDs" ReplicatorSv1GetFilterIndexes = "ReplicatorSv1.GetFilterIndexes" ReplicatorSv1MatchFilterIndex = "ReplicatorSv1.MatchFilterIndex" ReplicatorSv1SetThresholdProfile = "ReplicatorSv1.SetThresholdProfile" ReplicatorSv1SetThreshold = "ReplicatorSv1.SetThreshold" ReplicatorSv1SetFilterIndexes = "ReplicatorSv1.SetFilterIndexes" ReplicatorSv1Account = "ReplicatorSv1.SetAccount" ReplicatorSv1SetDestination = "ReplicatorSv1.SetDestination" ReplicatorSv1SetReverseDestination = "ReplicatorSv1.SetReverseDestination" ReplicatorSv1SetStatQueue = "ReplicatorSv1.SetStatQueue" ReplicatorSv1SetFilter = "ReplicatorSv1.SetFilter" ReplicatorSv1SetStatQueueProfile = "ReplicatorSv1.SetStatQueueProfile" ReplicatorSv1SetTiming = "ReplicatorSv1.SetTiming" ReplicatorSv1SetResource = "ReplicatorSv1.SetResource" ReplicatorSv1SetResourceProfile = "ReplicatorSv1.SetResourceProfile" ReplicatorSv1SetActionTriggers = "ReplicatorSv1.SetActionTriggers" ReplicatorSv1SetActions = "ReplicatorSv1.SetActions" ReplicatorSv1SetActionPlan = "ReplicatorSv1.SetActionPlan" ReplicatorSv1SetAccountActionPlans = "ReplicatorSv1.SetAccountActionPlans" ReplicatorSv1SetRatingPlan = "ReplicatorSv1.SetRatingPlan" ReplicatorSv1SetRatingProfile = "ReplicatorSv1.SetRatingProfile" ReplicatorSv1SetSupplierProfile = "ReplicatorSv1.SetSupplierProfile" ReplicatorSv1SetAttributeProfile = "ReplicatorSv1.SetAttributeProfile" ReplicatorSv1SetChargerProfile = "ReplicatorSv1.SetChargerProfile" ReplicatorSv1SetDispatcherProfile = "ReplicatorSv1.SetDispatcherProfile" ReplicatorSv1SetDispatcherHost = "ReplicatorSv1.SetDispatcherHost" ReplicatorSv1SetLoadIDs = "ReplicatorSv1.SetLoadIDs" ReplicatorSv1RemoveThreshold = "ReplicatorSv1.RemoveThreshold" ReplicatorSv1RemoveDestination = "ReplicatorSv1.RemoveDestination" ReplicatorSv1RemoveAccount = "ReplicatorSv1.RemoveAccount" ReplicatorSv1RemoveStatQueue = "ReplicatorSv1.RemoveStatQueue" ReplicatorSv1RemoveFilter = "ReplicatorSv1.RemoveFilter" ReplicatorSv1RemoveThresholdProfile = "ReplicatorSv1.RemoveThresholdProfile" ReplicatorSv1RemoveStatQueueProfile = "ReplicatorSv1.RemoveStatQueueProfile" ReplicatorSv1RemoveTiming = "ReplicatorSv1.RemoveTiming" ReplicatorSv1RemoveResource = "ReplicatorSv1.RemoveResource" ReplicatorSv1RemoveResourceProfile = "ReplicatorSv1.RemoveResourceProfile" ReplicatorSv1RemoveActionTriggers = "ReplicatorSv1.RemoveActionTriggers" ReplicatorSv1RemoveActions = "ReplicatorSv1.RemoveActions" ReplicatorSv1RemoveActionPlan = "ReplicatorSv1.RemoveActionPlan" ReplicatorSv1RemAccountActionPlans = "ReplicatorSv1.RemAccountActionPlans" ReplicatorSv1RemoveRatingPlan = "ReplicatorSv1.RemoveRatingPlan" ReplicatorSv1RemoveRatingProfile = "ReplicatorSv1.RemoveRatingProfile" ReplicatorSv1RemoveSupplierProfile = "ReplicatorSv1.RemoveSupplierProfile" ReplicatorSv1RemoveAttributeProfile = "ReplicatorSv1.RemoveAttributeProfile" ReplicatorSv1RemoveChargerProfile = "ReplicatorSv1.RemoveChargerProfile" ReplicatorSv1RemoveDispatcherProfile = "ReplicatorSv1.RemoveDispatcherProfile" ReplicatorSv1RemoveDispatcherHost = "ReplicatorSv1.RemoveDispatcherHost" )
ReplicatorSv1 APIs
const ( APIerSv1 = "APIerSv1" APIerSv1ComputeFilterIndexes = "APIerSv1.ComputeFilterIndexes" APIerSv1ComputeFilterIndexIDs = "APIerSv1.ComputeFilterIndexIDs" APIerSv1Ping = "APIerSv1.Ping" APIerSv1SetDispatcherProfile = "APIerSv1.SetDispatcherProfile" APIerSv1GetDispatcherProfile = "APIerSv1.GetDispatcherProfile" APIerSv1GetDispatcherProfileIDs = "APIerSv1.GetDispatcherProfileIDs" APIerSv1RemoveDispatcherProfile = "APIerSv1.RemoveDispatcherProfile" APIerSv1SetDispatcherHost = "APIerSv1.SetDispatcherHost" APIerSv1GetDispatcherHost = "APIerSv1.GetDispatcherHost" APIerSv1GetDispatcherHostIDs = "APIerSv1.GetDispatcherHostIDs" APIerSv1RemoveDispatcherHost = "APIerSv1.RemoveDispatcherHost" APIerSv1GetEventCost = "APIerSv1.GetEventCost" APIerSv1LoadTariffPlanFromFolder = "APIerSv1.LoadTariffPlanFromFolder" APIerSv1GetCost = "APIerSv1.GetCost" APIerSv1SetBalance = "APIerSv1.SetBalance" APIerSv1GetFilter = "APIerSv1.GetFilter" APIerSv1GetFilterIndexes = "APIerSv1.GetFilterIndexes" APIerSv1RemoveFilterIndexes = "APIerSv1.RemoveFilterIndexes" APIerSv1RemoveFilter = "APIerSv1.RemoveFilter" APIerSv1SetFilter = "APIerSv1.SetFilter" APIerSv1GetFilterIDs = "APIerSv1.GetFilterIDs" APIerSv1GetRatingProfile = "APIerSv1.GetRatingProfile" APIerSv1RemoveRatingProfile = "APIerSv1.RemoveRatingProfile" APIerSv1SetRatingProfile = "APIerSv1.SetRatingProfile" APIerSv1GetRatingProfileIDs = "APIerSv1.GetRatingProfileIDs" APIerSv1SetDataDBVersions = "APIerSv1.SetDataDBVersions" APIerSv1SetStorDBVersions = "APIerSv1.SetStorDBVersions" APIerSv1GetAccountActionPlan = "APIerSv1.GetAccountActionPlan" APIerSv1ComputeActionPlanIndexes = "APIerSv1.ComputeActionPlanIndexes" APIerSv1GetActions = "APIerSv1.GetActions" APIerSv1GetActionPlan = "APIerSv1.GetActionPlan" APIerSv1GetActionPlanIDs = "APIerSv1.GetActionPlanIDs" APIerSv1GetRatingPlanIDs = "APIerSv1.GetRatingPlanIDs" APIerSv1GetRatingPlan = "APIerSv1.GetRatingPlan" APIerSv1RemoveRatingPlan = "APIerSv1.RemoveRatingPlan" APIerSv1GetDestination = "APIerSv1.GetDestination" APIerSv1GetReverseDestination = "APIerSv1.GetReverseDestination" APIerSv1AddBalance = "APIerSv1.AddBalance" APIerSv1DebitBalance = "APIerSv1.DebitBalance" APIerSv1SetAccount = "APIerSv1.SetAccount" APIerSv1GetAccountsCount = "APIerSv1.GetAccountsCount" APIerSv1GetDataDBVersions = "APIerSv1.GetDataDBVersions" APIerSv1GetStorDBVersions = "APIerSv1.GetStorDBVersions" APIerSv1GetCDRs = "APIerSv1.GetCDRs" APIerSv1GetTPAccountActions = "APIerSv1.GetTPAccountActions" APIerSv1SetTPAccountActions = "APIerSv1.SetTPAccountActions" APIerSv1GetTPAccountActionsByLoadId = "APIerSv1.GetTPAccountActionsByLoadId" APIerSv1GetTPAccountActionLoadIds = "APIerSv1.GetTPAccountActionLoadIds" APIerSv1GetTPAccountActionIds = "APIerSv1.GetTPAccountActionIds" APIerSv1RemoveTPAccountActions = "APIerSv1.RemoveTPAccountActions" APIerSv1GetTPActionPlan = "APIerSv1.GetTPActionPlan" APIerSv1SetTPActionPlan = "APIerSv1.SetTPActionPlan" APIerSv1GetTPActionPlanIds = "APIerSv1.GetTPActionPlanIds" APIerSv1SetTPActionTriggers = "APIerSv1.SetTPActionTriggers" APIerSv1GetTPActionTriggers = "APIerSv1.GetTPActionTriggers" APIerSv1RemoveTPActionTriggers = "APIerSv1.RemoveTPActionTriggers" APIerSv1GetTPActionTriggerIds = "APIerSv1.GetTPActionTriggerIds" APIerSv1GetTPActions = "APIerSv1.GetTPActions" APIerSv1RemoveTPActionPlan = "APIerSv1.RemoveTPActionPlan" APIerSv1GetTPAttributeProfile = "APIerSv1.GetTPAttributeProfile" APIerSv1SetTPAttributeProfile = "APIerSv1.SetTPAttributeProfile" APIerSv1GetTPAttributeProfileIds = "APIerSv1.GetTPAttributeProfileIds" APIerSv1RemoveTPAttributeProfile = "APIerSv1.RemoveTPAttributeProfile" APIerSv1GetTPCharger = "APIerSv1.GetTPCharger" APIerSv1SetTPCharger = "APIerSv1.SetTPCharger" APIerSv1RemoveTPCharger = "APIerSv1.RemoveTPCharger" APIerSv1GetTPChargerIDs = "APIerSv1.GetTPChargerIDs" APIerSv1SetTPFilterProfile = "APIerSv1.SetTPFilterProfile" APIerSv1GetTPFilterProfile = "APIerSv1.GetTPFilterProfile" APIerSv1GetTPFilterProfileIds = "APIerSv1.GetTPFilterProfileIds" APIerSv1RemoveTPFilterProfile = "APIerSv1.RemoveTPFilterProfile" APIerSv1GetTPDestination = "APIerSv1.GetTPDestination" APIerSv1SetTPDestination = "APIerSv1.SetTPDestination" APIerSv1GetTPDestinationIDs = "APIerSv1.GetTPDestinationIDs" APIerSv1RemoveTPDestination = "APIerSv1.RemoveTPDestination" APIerSv1GetTPResource = "APIerSv1.GetTPResource" APIerSv1SetTPResource = "APIerSv1.SetTPResource" APIerSv1RemoveTPResource = "APIerSv1.RemoveTPResource" APIerSv1SetTPRate = "APIerSv1.SetTPRate" APIerSv1GetTPRate = "APIerSv1.GetTPRate" APIerSv1RemoveTPRate = "APIerSv1.RemoveTPRate" APIerSv1GetTPRateIds = "APIerSv1.GetTPRateIds" APIerSv1SetTPThreshold = "APIerSv1.SetTPThreshold" APIerSv1GetTPThreshold = "APIerSv1.GetTPThreshold" APIerSv1GetTPThresholdIDs = "APIerSv1.GetTPThresholdIDs" APIerSv1RemoveTPThreshold = "APIerSv1.RemoveTPThreshold" APIerSv1SetTPStat = "APIerSv1.SetTPStat" APIerSv1GetTPStat = "APIerSv1.GetTPStat" APIerSv1RemoveTPStat = "APIerSv1.RemoveTPStat" APIerSv1GetTPDestinationRate = "APIerSv1.GetTPDestinationRate" APIerSv1SetTPSupplierProfile = "APIerSv1.SetTPSupplierProfile" APIerSv1GetTPSupplierProfile = "APIerSv1.GetTPSupplierProfile" APIerSv1GetTPSupplierProfileIDs = "APIerSv1.GetTPSupplierProfileIDs" APIerSv1RemoveTPSupplierProfile = "APIerSv1.RemoveTPSupplierProfile" APIerSv1GetTPDispatcherProfile = "APIerSv1.GetTPDispatcherProfile" APIerSv1SetTPDispatcherProfile = "APIerSv1.SetTPDispatcherProfile" APIerSv1RemoveTPDispatcherProfile = "APIerSv1.RemoveTPDispatcherProfile" APIerSv1GetTPDispatcherProfileIDs = "APIerSv1.GetTPDispatcherProfileIDs" APIerSv1ExportCDRs = "APIerSv1.ExportCDRs" APIerSv1GetTPRatingPlan = "APIerSv1.GetTPRatingPlan" APIerSv1SetTPRatingPlan = "APIerSv1.SetTPRatingPlan" APIerSv1GetTPRatingPlanIds = "APIerSv1.GetTPRatingPlanIds" APIerSv1RemoveTPRatingPlan = "APIerSv1.RemoveTPRatingPlan" APIerSv1SetTPActions = "APIerSv1.SetTPActions" APIerSv1GetTPActionIds = "APIerSv1.GetTPActionIds" APIerSv1RemoveTPActions = "APIerSv1.RemoveTPActions" APIerSv1SetActionPlan = "APIerSv1.SetActionPlan" APIerSv1ExecuteAction = "APIerSv1.ExecuteAction" APIerSv1SetTPRatingProfile = "APIerSv1.SetTPRatingProfile" APIerSv1GetTPRatingProfile = "APIerSv1.GetTPRatingProfile" APIerSv1RemoveTPRatingProfile = "APIerSv1.RemoveTPRatingProfile" APIerSv1SetTPDestinationRate = "APIerSv1.SetTPDestinationRate" APIerSv1GetTPRatingProfileLoadIds = "APIerSv1.GetTPRatingProfileLoadIds" APIerSv1GetTPRatingProfilesByLoadID = "APIerSv1.GetTPRatingProfilesByLoadID" APIerSv1GetTPRatingProfileIds = "APIerSv1.GetTPRatingProfileIds" APIerSv1GetTPDestinationRateIds = "APIerSv1.GetTPDestinationRateIds" APIerSv1RemoveTPDestinationRate = "APIerSv1.RemoveTPDestinationRate" APIerSv1ImportTariffPlanFromFolder = "APIerSv1.ImportTariffPlanFromFolder" APIerSv1ExportTPToFolder = "APIerSv1.ExportTPToFolder" APIerSv1LoadRatingPlan = "APIerSv1.LoadRatingPlan" APIerSv1LoadRatingProfile = "APIerSv1.LoadRatingProfile" APIerSv1LoadAccountActions = "APIerSv1.LoadAccountActions" APIerSv1SetActions = "APIerSv1.SetActions" APIerSv1AddTriggeredAction = "APIerSv1.AddTriggeredAction" APIerSv1GetAccountActionTriggers = "APIerSv1.GetAccountActionTriggers" APIerSv1AddAccountActionTriggers = "APIerSv1.AddAccountActionTriggers" APIerSv1ResetAccountActionTriggers = "APIerSv1.ResetAccountActionTriggers" APIerSv1SetAccountActionTriggers = "APIerSv1.SetAccountActionTriggers" APIerSv1RemoveAccountActionTriggers = "APIerSv1.RemoveAccountActionTriggers" APIerSv1GetScheduledActions = "APIerSv1.GetScheduledActions" APIerSv1RemoveActionTiming = "APIerSv1.RemoveActionTiming" APIerSv1ComputeReverseDestinations = "APIerSv1.ComputeReverseDestinations" APIerSv1ComputeAccountActionPlans = "APIerSv1.ComputeAccountActionPlans" APIerSv1SetDestination = "APIerSv1.SetDestination" APIerSv1GetDataCost = "APIerSv1.GetDataCost" APIerSv1ReplayFailedPosts = "APIerSv1.ReplayFailedPosts" APIerSv1RemoveAccount = "APIerSv1.RemoveAccount" APIerSv1DebitUsage = "APIerSv1.DebitUsage" APIerSv1GetCacheStats = "APIerSv1.GetCacheStats" APIerSv1ReloadCache = "APIerSv1.ReloadCache" APIerSv1GetActionTriggers = "APIerSv1.GetActionTriggers" APIerSv1SetActionTrigger = "APIerSv1.SetActionTrigger" APIerSv1RemoveActionPlan = "APIerSv1.RemoveActionPlan" APIerSv1RemoveActions = "APIerSv1.RemoveActions" APIerSv1RemoveBalances = "APIerSv1.RemoveBalances" APIerSv1ReloadCdrcConfig = "APIerSv1.ReloadCdrcConfig" APIerSv1ReloadCdreConfig = "APIerSv1.ReloadCdreConfig" APIerSv1GetLoadHistory = "APIerSv1.GetLoadHistory" APIerSv1GetLoadIDs = "APIerSv1.GetLoadIDs" APIerSv1GetLoadTimes = "APIerSv1.GetLoadTimes" APIerSv1ExecuteScheduledActions = "APIerSv1.ExecuteScheduledActions" APIerSv1RemoveActionTrigger = "APIerSv1.RemoveActionTrigger" APIerSv1GetAccount = "APIerSv1.GetAccount" )
APIerSv1 APIs
const ( APIerSv1SetTPTiming = "APIerSv1.SetTPTiming" APIerSv1GetTPTiming = "APIerSv1.GetTPTiming" APIerSv1RemoveTPTiming = "APIerSv1.RemoveTPTiming" APIerSv1GetTPTimingIds = "APIerSv1.GetTPTimingIds" APIerSv1LoadTariffPlanFromStorDb = "APIerSv1.LoadTariffPlanFromStorDb" APIerSv1RemoveTPFromFolder = "APIerSv1.RemoveTPFromFolder" )
APIerSv1 TP APIs
const ( APIerSv2 = "APIerSv2" APIerSv2LoadTariffPlanFromFolder = "APIerSv2.LoadTariffPlanFromFolder" APIerSv2GetCDRs = "APIerSv2.GetCDRs" APIerSv2GetAccount = "APIerSv2.GetAccount" APIerSv2GetAccounts = "APIerSv2.GetAccounts" APIerSv2SetAccount = "APIerSv2.SetAccount" APIerSv2CountCDRs = "APIerSv2.CountCDRs" APIerSv2SetBalance = "APIerSv2.SetBalance" APIerSv2SetActions = "APIerSv2.SetActions" APIerSv2RemoveTPTiming = "APIerSv2.RemoveTPTiming" APIerSv2GetTPDestination = "APIerSv2.GetTPDestination" APIerSv2SetTPDestination = "APIerSv2.SetTPDestination" APIerSv2RemoveTPDestination = "APIerSv2.RemoveTPDestination" APIerSv2GetTPDestinationIDs = "APIerSv2.GetTPDestinationIDs" APIerSv2GetTPTiming = "APIerSv2.GetTPTiming" APIerSv2SetTPTiming = "APIerSv2.SetTPTiming" APIerSv2SetAccountActionTriggers = "APIerSv2.SetAccountActionTriggers" APIerSv2GetAccountActionTriggers = "APIerSv2.GetAccountActionTriggers" APIerSv2SetActionPlan = "APIerSv2.SetActionPlan" APIerSv2GetActions = "APIerSv2.GetActions" APIerSv2GetDestinations = "APIerSv2.GetDestinations" APIerSv2GetCacheStats = "APIerSv2.GetCacheStats" APIerSv2ExecuteAction = "APIerSv2.ExecuteAction" APIerSv2ResetAccountActionTriggers = "APIerSv2.ResetAccountActionTriggers" APIerSv2RemoveActions = "APIerSv2.RemoveActions" )
APIerSv2 APIs
const ( ServiceManagerV1 = "ServiceManagerV1" ServiceManagerV1StartService = "ServiceManagerV1.StartService" ServiceManagerV1StopService = "ServiceManagerV1.StopService" ServiceManagerV1ServiceStatus = "ServiceManagerV1.ServiceStatus" ServiceManagerV1Ping = "ServiceManagerV1.Ping" )
const ( ConfigSv1 = "ConfigSv1" ConfigSv1GetJSONSection = "ConfigSv1.GetJSONSection" ConfigSv1ReloadConfigFromPath = "ConfigSv1.ReloadConfigFromPath" ConfigSv1ReloadConfigFromJSON = "ConfigSv1.ReloadConfigFromJSON" )
const ( RALsV1 = "RALsV1" RALsV1GetRatingPlansCost = "RALsV1.GetRatingPlansCost" RALsV1Ping = "RALsV1.Ping" )
const ( CoreS = "CoreS" CoreSv1 = "CoreSv1" CoreSv1Status = "CoreSv1.Status" CoreSv1Ping = "CoreSv1.Ping" )
const ( SupplierSv1GetSuppliers = "SupplierSv1.GetSuppliers" SupplierSv1GetSupplierProfilesForEvent = "SupplierSv1.GetSupplierProfilesForEvent" SupplierSv1Ping = "SupplierSv1.Ping" APIerSv1GetSupplierProfile = "APIerSv1.GetSupplierProfile" APIerSv1GetSupplierProfileIDs = "APIerSv1.GetSupplierProfileIDs" APIerSv1RemoveSupplierProfile = "APIerSv1.RemoveSupplierProfile" APIerSv1SetSupplierProfile = "APIerSv1.SetSupplierProfile" )
SupplierS APIs
const ( APIerSv1SetAttributeProfile = "APIerSv1.SetAttributeProfile" APIerSv1GetAttributeProfile = "APIerSv1.GetAttributeProfile" APIerSv1GetAttributeProfileIDs = "APIerSv1.GetAttributeProfileIDs" APIerSv1RemoveAttributeProfile = "APIerSv1.RemoveAttributeProfile" APIerSv2SetAttributeProfile = "APIerSv2.SetAttributeProfile" AttributeSv1GetAttributeForEvent = "AttributeSv1.GetAttributeForEvent" AttributeSv1ProcessEvent = "AttributeSv1.ProcessEvent" AttributeSv1Ping = "AttributeSv1.Ping" )
AttributeS APIs
const ( ChargerSv1Ping = "ChargerSv1.Ping" ChargerSv1GetChargersForEvent = "ChargerSv1.GetChargersForEvent" ChargerSv1ProcessEvent = "ChargerSv1.ProcessEvent" APIerSv1GetChargerProfile = "APIerSv1.GetChargerProfile" APIerSv1RemoveChargerProfile = "APIerSv1.RemoveChargerProfile" APIerSv1SetChargerProfile = "APIerSv1.SetChargerProfile" APIerSv1GetChargerProfileIDs = "APIerSv1.GetChargerProfileIDs" )
ChargerS APIs
const ( ThresholdSv1ProcessEvent = "ThresholdSv1.ProcessEvent" ThresholdSv1GetThreshold = "ThresholdSv1.GetThreshold" ThresholdSv1GetThresholdIDs = "ThresholdSv1.GetThresholdIDs" ThresholdSv1Ping = "ThresholdSv1.Ping" ThresholdSv1GetThresholdsForEvent = "ThresholdSv1.GetThresholdsForEvent" APIerSv1GetThresholdProfileIDs = "APIerSv1.GetThresholdProfileIDs" APIerSv1GetThresholdProfile = "APIerSv1.GetThresholdProfile" APIerSv1RemoveThresholdProfile = "APIerSv1.RemoveThresholdProfile" APIerSv1SetThresholdProfile = "APIerSv1.SetThresholdProfile" )
ThresholdS APIs
const ( StatSv1ProcessEvent = "StatSv1.ProcessEvent" StatSv1GetQueueIDs = "StatSv1.GetQueueIDs" StatSv1GetQueueStringMetrics = "StatSv1.GetQueueStringMetrics" StatSv1GetQueueFloatMetrics = "StatSv1.GetQueueFloatMetrics" StatSv1Ping = "StatSv1.Ping" StatSv1GetStatQueuesForEvent = "StatSv1.GetStatQueuesForEvent" APIerSv1GetStatQueueProfile = "APIerSv1.GetStatQueueProfile" APIerSv1RemoveStatQueueProfile = "APIerSv1.RemoveStatQueueProfile" APIerSv1SetStatQueueProfile = "APIerSv1.SetStatQueueProfile" APIerSv1GetStatQueueProfileIDs = "APIerSv1.GetStatQueueProfileIDs" )
StatS APIs
const ( ResourceSv1AuthorizeResources = "ResourceSv1.AuthorizeResources" ResourceSv1GetResourcesForEvent = "ResourceSv1.GetResourcesForEvent" ResourceSv1AllocateResources = "ResourceSv1.AllocateResources" ResourceSv1ReleaseResources = "ResourceSv1.ReleaseResources" ResourceSv1Ping = "ResourceSv1.Ping" ResourceSv1GetResource = "ResourceSv1.GetResource" APIerSv1SetResourceProfile = "APIerSv1.SetResourceProfile" APIerSv1RemoveResourceProfile = "APIerSv1.RemoveResourceProfile" APIerSv1GetResourceProfile = "APIerSv1.GetResourceProfile" APIerSv1GetResourceProfileIDs = "APIerSv1.GetResourceProfileIDs" )
ResourceS APIs
const ( SessionSv1AuthorizeEvent = "SessionSv1.AuthorizeEvent" SessionSv1AuthorizeEventWithDigest = "SessionSv1.AuthorizeEventWithDigest" SessionSv1InitiateSession = "SessionSv1.InitiateSession" SessionSv1InitiateSessionWithDigest = "SessionSv1.InitiateSessionWithDigest" SessionSv1UpdateSession = "SessionSv1.UpdateSession" SessionSv1SyncSessions = "SessionSv1.SyncSessions" SessionSv1TerminateSession = "SessionSv1.TerminateSession" SessionSv1ProcessCDR = "SessionSv1.ProcessCDR" SessionSv1ProcessMessage = "SessionSv1.ProcessMessage" SessionSv1ProcessEvent = "SessionSv1.ProcessEvent" SessionSv1DisconnectSession = "SessionSv1.DisconnectSession" SessionSv1GetActiveSessions = "SessionSv1.GetActiveSessions" SessionSv1GetActiveSessionsCount = "SessionSv1.GetActiveSessionsCount" SessionSv1ForceDisconnect = "SessionSv1.ForceDisconnect" SessionSv1GetPassiveSessions = "SessionSv1.GetPassiveSessions" SessionSv1GetPassiveSessionsCount = "SessionSv1.GetPassiveSessionsCount" SessionSv1SetPassiveSession = "SessionSv1.SetPassiveSession" SessionSv1Ping = "SessionSv1.Ping" SessionSv1GetActiveSessionIDs = "SessionSv1.GetActiveSessionIDs" SessionSv1RegisterInternalBiJSONConn = "SessionSv1.RegisterInternalBiJSONConn" SessionSv1ReplicateSessions = "SessionSv1.ReplicateSessions" SessionSv1ActivateSessions = "SessionSv1.ActivateSessions" SessionSv1DeactivateSessions = "SessionSv1.DeactivateSessions" SMGenericV1InitiateSession = "SMGenericV1.InitiateSession" )
SessionS APIs
const ( Responder = "Responder" ResponderDebit = "Responder.Debit" ResponderRefundIncrements = "Responder.RefundIncrements" ResponderGetMaxSessionTime = "Responder.GetMaxSessionTime" ResponderMaxDebit = "Responder.MaxDebit" ResponderRefundRounding = "Responder.RefundRounding" ResponderGetCost = "Responder.GetCost" ResponderShutdown = "Responder.Shutdown" ResponderPing = "Responder.Ping" )
Responder APIs
const ( DispatcherSv1Ping = "DispatcherSv1.Ping" DispatcherSv1GetProfileForEvent = "DispatcherSv1.GetProfileForEvent" DispatcherSv1Apier = "DispatcherSv1.Apier" DispatcherServicePing = "DispatcherService.Ping" )
DispatcherS APIs
const ( AnalyzerSv1 = "AnalyzerSv1" AnalyzerSv1Ping = "AnalyzerSv1.Ping" )
AnalyzerS APIs
const ( LoaderSv1 = "LoaderSv1" LoaderSv1Load = "LoaderSv1.Load" LoaderSv1Remove = "LoaderSv1.Remove" LoaderSv1Ping = "LoaderSv1.Ping" )
LoaderS APIs
const ( CacheSv1 = "CacheSv1" CacheSv1GetCacheStats = "CacheSv1.GetCacheStats" CacheSv1GetItemIDs = "CacheSv1.GetItemIDs" CacheSv1HasItem = "CacheSv1.HasItem" CacheSv1GetItemExpiryTime = "CacheSv1.GetItemExpiryTime" CacheSv1RemoveItem = "CacheSv1.RemoveItem" CacheSv1PrecacheStatus = "CacheSv1.PrecacheStatus" CacheSv1HasGroup = "CacheSv1.HasGroup" CacheSv1GetGroupItemIDs = "CacheSv1.GetGroupItemIDs" CacheSv1RemoveGroup = "CacheSv1.RemoveGroup" CacheSv1Clear = "CacheSv1.Clear" CacheSv1ReloadCache = "CacheSv1.ReloadCache" CacheSv1LoadCache = "CacheSv1.LoadCache" CacheSv1FlushCache = "CacheSv1.FlushCache" CacheSv1Ping = "CacheSv1.Ping" )
CacheS APIs
const ( GuardianSv1 = "GuardianSv1" GuardianSv1RemoteLock = "GuardianSv1.RemoteLock" GuardianSv1RemoteUnlock = "GuardianSv1.RemoteUnlock" GuardianSv1Ping = "GuardianSv1.Ping" )
GuardianS APIs
const ( CDRsV1 = "CDRsV1" CDRsV1GetCDRsCount = "CDRsV1.GetCDRsCount" CDRsV1RateCDRs = "CDRsV1.RateCDRs" CDRsV1GetCDRs = "CDRsV1.GetCDRs" CDRsV1ProcessCDR = "CDRsV1.ProcessCDR" CDRsV1ProcessExternalCDR = "CDRsV1.ProcessExternalCDR" CDRsV1StoreSessionCost = "CDRsV1.StoreSessionCost" CDRsV1ProcessEvent = "CDRsV1.ProcessEvent" CDRsV1Ping = "CDRsV1.Ping" CDRsV2 = "CDRsV2" CDRsV2StoreSessionCost = "CDRsV2.StoreSessionCost" CdrsV2ProcessExternalCdr = "CdrsV2.ProcessExternalCdr" CdrsV2ProcessCdr = "CdrsV2.ProcessCdr" )
Cdrs APIs
const ( SchedulerSv1 = "SchedulerSv1" SchedulerSv1Ping = "SchedulerSv1.Ping" SchedulerSv1Reload = "SchedulerSv1.Reload" )
Scheduler
const ( CGR_ACCOUNT = "cgr_account" CGR_SUPPLIER = "cgr_supplier" CGR_DESTINATION = "cgr_destination" CGR_SUBJECT = "cgr_subject" CGR_CATEGORY = "cgr_category" CGR_REQTYPE = "cgr_reqtype" CGR_TENANT = "cgr_tenant" CGR_PDD = "cgr_pdd" CGR_DISCONNECT_CAUSE = "cgr_disconnectcause" CGR_COMPUTELCR = "cgr_computelcr" CGR_SUPPLIERS = "cgr_suppliers" CGRFlags = "cgr_flags" )
cgr_ variables
const ( TimingsCsv = "Timings.csv" DestinationsCsv = "Destinations.csv" RatesCsv = "Rates.csv" DestinationRatesCsv = "DestinationRates.csv" RatingPlansCsv = "RatingPlans.csv" RatingProfilesCsv = "RatingProfiles.csv" ActionsCsv = "Actions.csv" ActionPlansCsv = "ActionPlans.csv" ActionTriggersCsv = "ActionTriggers.csv" AccountActionsCsv = "AccountActions.csv" ResourcesCsv = "Resources.csv" StatsCsv = "Stats.csv" ThresholdsCsv = "Thresholds.csv" FiltersCsv = "Filters.csv" SuppliersCsv = "Suppliers.csv" AttributesCsv = "Attributes.csv" ChargersCsv = "Chargers.csv" DispatcherProfilesCsv = "DispatcherProfiles.csv" DispatcherHostsCsv = "DispatcherHosts.csv" )
CSV file name
const ( TBLTPTimings = "tp_timings" TBLTPDestinations = "tp_destinations" TBLTPRates = "tp_rates" TBLTPDestinationRates = "tp_destination_rates" TBLTPRatingPlans = "tp_rating_plans" TBLTPRateProfiles = "tp_rating_profiles" TBLTPActions = "tp_actions" TBLTPActionPlans = "tp_action_plans" TBLTPActionTriggers = "tp_action_triggers" TBLTPAccountActions = "tp_account_actions" TBLTPResources = "tp_resources" TBLTPStats = "tp_stats" TBLTPThresholds = "tp_thresholds" TBLTPFilters = "tp_filters" SessionCostsTBL = "session_costs" CDRsTBL = "cdrs" TBLTPSuppliers = "tp_suppliers" TBLTPAttributes = "tp_attributes" TBLTPChargers = "tp_chargers" TBLVersions = "versions" OldSMCosts = "sm_costs" TBLTPDispatchers = "tp_dispatcher_profiles" TBLTPDispatcherHosts = "tp_dispatcher_hosts" )
Table Name
const ( CacheDestinations = "*destinations" CacheReverseDestinations = "*reverse_destinations" CacheRatingPlans = "*rating_plans" CacheRatingProfiles = "*rating_profiles" CacheActions = "*actions" CacheActionPlans = "*action_plans" CacheAccountActionPlans = "*account_action_plans" CacheActionTriggers = "*action_triggers" CacheResources = "*resources" CacheResourceProfiles = "*resource_profiles" CacheTimings = "*timings" CacheEventResources = "*event_resources" CacheStatQueueProfiles = "*statqueue_profiles" CacheStatQueues = "*statqueues" CacheThresholdProfiles = "*threshold_profiles" CacheThresholds = "*thresholds" CacheFilters = "*filters" CacheSupplierProfiles = "*supplier_profiles" CacheAttributeProfiles = "*attribute_profiles" CacheChargerProfiles = "*charger_profiles" CacheDispatcherProfiles = "*dispatcher_profiles" CacheDispatcherHosts = "*dispatcher_hosts" CacheDispatchers = "*dispatchers" CacheDispatcherRoutes = "*dispatcher_routes" CacheResourceFilterIndexes = "*resource_filter_indexes" CacheStatFilterIndexes = "*stat_filter_indexes" CacheThresholdFilterIndexes = "*threshold_filter_indexes" CacheSupplierFilterIndexes = "*supplier_filter_indexes" CacheAttributeFilterIndexes = "*attribute_filter_indexes" CacheChargerFilterIndexes = "*charger_filter_indexes" CacheDispatcherFilterIndexes = "*dispatcher_filter_indexes" CacheDiameterMessages = "*diameter_messages" CacheRPCResponses = "*rpc_responses" CacheClosedSessions = "*closed_sessions" MetaPrecaching = "*precaching" MetaReady = "*ready" CacheLoadIDs = "*load_ids" CacheAccounts = "*accounts" CacheRPCConnections = "*rpc_connections" CacheCDRIDs = "*cdr_ids" CacheRatingProfilesTmp = "*tmp_rating_profiles" )
Cache Name
const ( ResourceFilterIndexes = "rfi_" StatFilterIndexes = "sfi_" ThresholdFilterIndexes = "tfi_" SupplierFilterIndexes = "spi_" AttributeFilterIndexes = "afi_" ChargerFilterIndexes = "cfi_" DispatcherFilterIndexes = "dfi_" ActionPlanIndexes = "api_" )
Prefix for indexing
const ( KamailioAgent = "KamailioAgent" RadiusAgent = "RadiusAgent" DiameterAgent = "DiameterAgent" FreeSWITCHAgent = "FreeSWITCHAgent" AsteriskAgent = "AsteriskAgent" HTTPAgent = "HTTPAgent" )
Agents
const ( SQSPoster = "SQSPoster" S3Poster = "S3Poster" AWSRegion = "aws_region" AWSKey = "aws_key" AWSSecret = "aws_secret" KafkaTopic = "topic" KafkaGroupID = "group_id" KafkaMaxWait = "max_wait" )
Poster
const ( MetaGoogleAPI = "*gapi" GoogleConfigDirName = ".gapi" GoogleCredentialsFileName = "credentials.json" GoogleTokenFileName = "token.json" )
Google_API
const ( LOGLEVEL_EMERGENCY = iota LOGLEVEL_ALERT LOGLEVEL_CRITICAL LOGLEVEL_ERROR LOGLEVEL_WARNING LOGLEVEL_NOTICE LOGLEVEL_INFO LOGLEVEL_DEBUG )
log severities following rfc3164
const (
INCREMENTAL = "*incremental"
)
Variables ¶
var ( CDRExportFormats = NewStringSet([]string{DRYRUN, MetaFileCSV, MetaFileFWV, MetaHTTPjsonCDR, MetaHTTPjsonMap, MetaHTTPjson, MetaHTTPPost, MetaAMQPjsonCDR, MetaAMQPjsonMap, MetaAMQPV1jsonMap, MetaSQSjsonMap, MetaKafkajsonMap, MetaS3jsonMap}) MainCDRFields = NewStringSet([]string{CGRID, Source, OriginHost, OriginID, ToR, RequestType, Tenant, Category, Account, Subject, Destination, SetupTime, AnswerTime, Usage, COST, RATED, Partial, RunID, PreRated, CostSource, CostDetails, ExtraInfo, OrderID}) PostPaidRatedSlice = []string{META_POSTPAID, META_RATED} ItemList = NewStringSet([]string{MetaAccounts, MetaAttributes, MetaChargers, MetaDispatchers, MetaDispatcherHosts, MetaFilters, MetaResources, MetaStats, MetaThresholds, MetaSuppliers, }) AttrInlineTypes = NewStringSet([]string{META_CONSTANT, MetaVariable, META_COMPOSED, META_USAGE_DIFFERENCE, MetaSum, MetaValueExponent}) GitLastLog string // If set, it will be processed as part of versioning PosterTransportContentTypes = map[string]string{ MetaHTTPjsonCDR: CONTENT_JSON, MetaHTTPjsonMap: CONTENT_JSON, MetaHTTPjson: CONTENT_JSON, MetaHTTPPost: CONTENT_FORM, MetaAMQPjsonCDR: CONTENT_JSON, MetaAMQPjsonMap: CONTENT_JSON, MetaAMQPV1jsonMap: CONTENT_JSON, MetaSQSjsonMap: CONTENT_JSON, MetaKafkajsonMap: CONTENT_JSON, MetaS3jsonMap: CONTENT_JSON, } CDREFileSuffixes = map[string]string{ MetaHTTPjsonCDR: JSNSuffix, MetaHTTPjsonMap: JSNSuffix, MetaAMQPjsonCDR: JSNSuffix, MetaAMQPjsonMap: JSNSuffix, MetaAMQPV1jsonMap: JSNSuffix, MetaSQSjsonMap: JSNSuffix, MetaKafkajsonMap: JSNSuffix, MetaS3jsonMap: JSNSuffix, MetaHTTPPost: FormSuffix, MetaFileCSV: CSVSuffix, MetaFileFWV: FWVSuffix, } // CachePartitions enables creation of cache partitions CachePartitions = NewStringSet([]string{CacheDestinations, CacheReverseDestinations, CacheRatingPlans, CacheRatingProfiles, CacheActions, CacheActionPlans, CacheAccountActionPlans, CacheActionTriggers, CacheSharedGroups, CacheTimings, CacheResourceProfiles, CacheResources, CacheEventResources, CacheStatQueueProfiles, CacheStatQueues, CacheThresholdProfiles, CacheThresholds, CacheFilters, CacheSupplierProfiles, CacheAttributeProfiles, CacheChargerProfiles, CacheDispatcherProfiles, CacheDispatcherHosts, CacheResourceFilterIndexes, CacheStatFilterIndexes, CacheThresholdFilterIndexes, CacheSupplierFilterIndexes, CacheAttributeFilterIndexes, CacheChargerFilterIndexes, CacheDispatcherFilterIndexes, CacheDispatcherRoutes, CacheDiameterMessages, CacheRPCResponses, CacheClosedSessions, CacheCDRIDs, CacheLoadIDs, CacheRPCConnections, CacheRatingProfilesTmp}) CacheInstanceToPrefix = map[string]string{ CacheDestinations: DESTINATION_PREFIX, CacheReverseDestinations: REVERSE_DESTINATION_PREFIX, CacheRatingPlans: RATING_PLAN_PREFIX, CacheRatingProfiles: RATING_PROFILE_PREFIX, CacheActions: ACTION_PREFIX, CacheActionPlans: ACTION_PLAN_PREFIX, CacheAccountActionPlans: AccountActionPlansPrefix, CacheActionTriggers: ACTION_TRIGGER_PREFIX, CacheSharedGroups: SHARED_GROUP_PREFIX, CacheResourceProfiles: ResourceProfilesPrefix, CacheResources: ResourcesPrefix, CacheTimings: TimingsPrefix, CacheStatQueueProfiles: StatQueueProfilePrefix, CacheStatQueues: StatQueuePrefix, CacheThresholdProfiles: ThresholdProfilePrefix, CacheThresholds: ThresholdPrefix, CacheFilters: FilterPrefix, CacheSupplierProfiles: SupplierProfilePrefix, CacheAttributeProfiles: AttributeProfilePrefix, CacheChargerProfiles: ChargerProfilePrefix, CacheDispatcherProfiles: DispatcherProfilePrefix, CacheDispatcherHosts: DispatcherHostPrefix, CacheResourceFilterIndexes: ResourceFilterIndexes, CacheStatFilterIndexes: StatFilterIndexes, CacheThresholdFilterIndexes: ThresholdFilterIndexes, CacheSupplierFilterIndexes: SupplierFilterIndexes, CacheAttributeFilterIndexes: AttributeFilterIndexes, CacheChargerFilterIndexes: ChargerFilterIndexes, CacheDispatcherFilterIndexes: DispatcherFilterIndexes, CacheLoadIDs: LoadIDPrefix, CacheAccounts: ACCOUNT_PREFIX, } CachePrefixToInstance map[string]string // will be built on init PrefixToIndexCache = map[string]string{ ThresholdProfilePrefix: CacheThresholdFilterIndexes, ResourceProfilesPrefix: CacheResourceFilterIndexes, StatQueueProfilePrefix: CacheStatFilterIndexes, SupplierProfilePrefix: CacheSupplierFilterIndexes, AttributeProfilePrefix: CacheAttributeFilterIndexes, ChargerProfilePrefix: CacheChargerFilterIndexes, DispatcherProfilePrefix: CacheDispatcherFilterIndexes, } CacheIndexesToPrefix map[string]string // will be built on init // NonMonetaryBalances are types of balances which are not handled as monetary NonMonetaryBalances = NewStringSet([]string{VOICE, SMS, DATA, GENERIC}) // AccountableRequestTypes are the ones handled by Accounting subsystem AccountableRequestTypes = NewStringSet([]string{META_PREPAID, META_POSTPAID, META_PSEUDOPREPAID}) CacheDataDBPartitions = NewStringSet([]string{CacheDestinations, CacheReverseDestinations, CacheRatingPlans, CacheRatingProfiles, CacheActions, CacheActionPlans, CacheAccountActionPlans, CacheActionTriggers, CacheSharedGroups, CacheResourceProfiles, CacheResources, CacheTimings, CacheStatQueueProfiles, CacheStatQueues, CacheThresholdProfiles, CacheThresholds, CacheFilters, CacheSupplierProfiles, CacheAttributeProfiles, CacheChargerProfiles, CacheDispatcherProfiles, CacheDispatcherHosts, CacheResourceFilterIndexes, CacheStatFilterIndexes, CacheThresholdFilterIndexes, CacheSupplierFilterIndexes, CacheAttributeFilterIndexes, CacheChargerFilterIndexes, CacheDispatcherFilterIndexes, CacheLoadIDs, CacheAccounts}) // ProtectedSFlds are the fields that sessions should not alter ProtectedSFlds = NewStringSet([]string{CGRID, OriginHost, OriginID, Usage}) )
var ( PostgressSSLModeDisable = "disable" PostgressSSLModeAllow = "allow" PostgressSSLModePrefer = "prefer" PostgressSSLModeRequire = "require" PostgressSSLModeVerifyCa = "verify-ca" PostgressSSLModeVerifyFull = "verify-full" )
StorDB
var ( ErrNoMoreData = errors.New("NO_MORE_DATA") ErrNotImplemented = errors.New("NOT_IMPLEMENTED") ErrNotFound = errors.New("NOT_FOUND") ErrTimedOut = errors.New("TIMED_OUT") ErrServerError = errors.New("SERVER_ERROR") ErrMaxRecursionDepth = errors.New("MAX_RECURSION_DEPTH") ErrMandatoryIeMissing = errors.New("MANDATORY_IE_MISSING") ErrExists = errors.New("EXISTS") ErrBrokenReference = errors.New("BROKEN_REFERENCE") ErrParserError = errors.New("PARSER_ERROR") ErrInvalidPath = errors.New("INVALID_PATH") ErrInvalidKey = errors.New("INVALID_KEY") ErrRatingPlanNotFound = errors.New("RATING_PLAN_NOT_FOUND") ErrAccountNotFound = errors.New("ACCOUNT_NOT_FOUND") ErrAccountDisabled = errors.New("ACCOUNT_DISABLED") ErrInsufficientCredit = errors.New("INSUFFICIENT_CREDIT") ErrNotConvertible = errors.New("NOT_CONVERTIBLE") ErrNoActiveSession = errors.New("NO_ACTIVE_SESSION") ErrPartiallyExecuted = errors.New("PARTIALLY_EXECUTED") ErrMaxUsageExceeded = errors.New("MAX_USAGE_EXCEEDED") ErrFilterNotPassingNoCaps = errors.New("filter not passing") ErrNotConvertibleNoCaps = errors.New("not convertible") ErrMandatoryIeMissingNoCaps = errors.New("mandatory information missing") ErrUnknownApiKey = errors.New("UNKNOWN_API_KEY") ErrReqUnsynchronized = errors.New("REQ_UNSYNCHRONIZED") ErrUnsupporteServiceMethod = errors.New("UNSUPPORTED_SERVICE_METHOD") ErrDisconnected = errors.New("DISCONNECTED") ErrReplyTimeout = errors.New("REPLY_TIMEOUT") ErrSessionNotFound = errors.New("SESSION_NOT_FOUND") ErrJsonIncompleteComment = errors.New("JSON_INCOMPLETE_COMMENT") ErrCDRCNoProfileID = errors.New("CDRC_PROFILE_WITHOUT_ID") ErrCDRCNoInPath = errors.New("CDRC_PROFILE_WITHOUT_IN_PATH") ErrNotEnoughParameters = errors.New("NotEnoughParameters") ErrNotConnected = errors.New("NOT_CONNECTED") RalsErrorPrfx = "RALS_ERROR" DispatcherErrorPrefix = "DISPATCHER_ERROR" ErrUnsupportedFormat = errors.New("UNSUPPORTED_FORMAT") ErrNoDatabaseConn = errors.New("NO_DATA_BASE_CONNECTION") ErrMaxIncrementsExceeded = errors.New("MAX_INCREMENTS_EXCEEDED") ErrIndexOutOfBounds = errors.New("INDEX_OUT_OF_BOUNDS") ErrMap = map[string]error{ ErrNoMoreData.Error(): ErrNoMoreData, ErrNotImplemented.Error(): ErrNotImplemented, ErrNotFound.Error(): ErrNotFound, ErrTimedOut.Error(): ErrTimedOut, ErrServerError.Error(): ErrServerError, ErrMaxRecursionDepth.Error(): ErrMaxRecursionDepth, ErrExists.Error(): ErrExists, ErrBrokenReference.Error(): ErrBrokenReference, ErrParserError.Error(): ErrParserError, ErrInvalidPath.Error(): ErrInvalidPath, ErrInvalidKey.Error(): ErrInvalidKey, ErrUnauthorizedDestination.Error(): ErrUnauthorizedDestination, ErrRatingPlanNotFound.Error(): ErrRatingPlanNotFound, ErrInsufficientCredit.Error(): ErrInsufficientCredit, ErrNotConvertible.Error(): ErrNotConvertible, ErrResourceUnavailable.Error(): ErrResourceUnavailable, ErrResourceUnauthorized.Error(): ErrResourceUnauthorized, ErrNoActiveSession.Error(): ErrNoActiveSession, ErrPartiallyExecuted.Error(): ErrPartiallyExecuted, ErrMaxUsageExceeded.Error(): ErrMaxUsageExceeded, ErrFilterNotPassingNoCaps.Error(): ErrFilterNotPassingNoCaps, ErrNotConvertibleNoCaps.Error(): ErrNotConvertibleNoCaps, ErrUnauthorizedApi.Error(): ErrUnauthorizedApi, ErrUnknownApiKey.Error(): ErrUnknownApiKey, ErrReqUnsynchronized.Error(): ErrReqUnsynchronized, ErrUnsupporteServiceMethod.Error(): ErrUnsupporteServiceMethod, ErrDisconnected.Error(): ErrDisconnected, ErrReplyTimeout.Error(): ErrReplyTimeout, ErrSessionNotFound.Error(): ErrSessionNotFound, ErrJsonIncompleteComment.Error(): ErrJsonIncompleteComment, ErrCDRCNoProfileID.Error(): ErrCDRCNoProfileID, ErrCDRCNoInPath.Error(): ErrCDRCNoInPath, ErrNotEnoughParameters.Error(): ErrNotEnoughParameters, ErrUnsupportedFormat.Error(): ErrUnsupportedFormat, ErrNoDatabaseConn.Error(): ErrNoDatabaseConn, ErrMaxIncrementsExceeded.Error(): ErrMaxIncrementsExceeded, ErrIndexOutOfBounds.Error(): ErrIndexOutOfBounds, } )
var ValueFormulas = map[string]valueFormula{ INCREMENTAL: incrementalFormula, }
Functions ¶
func APIerRPCCall ¶
func APIerRPCCall(inst interface{}, serviceMethod string, args interface{}, reply interface{}) error
ApierRPCCall implements generic RPCCall for APIer instances
func AsMapStringIface ¶
AsMapStringIface converts an item (mostly struct) as map[string]interface{}
func AvgNegative ¶
func BoolPointer ¶
func CapitalizedMessage ¶
CapitalizeErrorMessage returns the capitalized version of an error, useful in APIs
func CastIfToString ¶
Returns the string representation of iface or error if not convertible
func CastRPCErr ¶
func Clone ¶
func Clone(a, b interface{}) error
Simple object cloner, b should be a pointer towards a value into which we want to decode
func ConcatenatedKey ¶
func ConvertMapValStrIf ¶
Converts map[string]string into map[string]interface{}
func DaysInYear ¶
func Difference ¶
func Difference(items ...interface{}) (diff interface{}, err error)
Difference attempts to sum multiple items returns the result or error if not comparable
func ErrEnvNotFound ¶
func ErrHasPrefix ¶
func ErrNotConvertibleTF ¶
func ErrPathNotReachable ¶
func ErrPrefixNotFound ¶
func FallbackSubjKeys ¶
Helper to return the subject fallback keys we need in dataDb
func FirstNonEmpty ¶
Returns first non empty string out of vals. Useful to extract defaults
func Float64Pointer ¶
func FmtFieldWidth ¶
func FmtFieldWidth(fieldID, source string, width int, strip, padding string, mandatory bool) (string, error)
Attributes
source - the base source width - the field width strip - if present it will specify the strip strategy, when missing strip will not be allowed padding - if present it will specify the padding strategy to use, left, right, zeroleft, zeroright
func FromMapStringInterface ¶
func FromMapStringInterfaceValue ¶
initial intent was to use it with *cgr_rpc but does not handle slice and structure fields
func FromMapStringString ¶
func GetBasicType ¶
func GetBasicType(item interface{}) interface{}
func GetCGRVersion ¶
func GetMapExtraFields ¶
func GetPathIndex ¶
GetPathIndex returns the path and index if index present path[index]=>path,index path=>path,nil
func GetStartTime ¶
func GetStartTime() string
GetStartTime return the Start time of engine (in UNIX format)
func GetUniformType ¶
func GetUniformType(item interface{}) (interface{}, error)
func GetUrlRawArguments ¶
func GreaterThan ¶
GreaterThan attempts to compare two items returns the result or error if not comparable
func IfaceAsBool ¶
func IfaceAsDuration ¶
func IfaceAsFloat64 ¶
func IfaceAsInt64 ¶
func IfaceAsSliceString ¶
IfaceAsSliceString is trying to convert the interface to a slice of strings
func IfaceAsString ¶
func IfaceAsString(fld interface{}) (out string)
func IfaceAsTInt64 ¶
same function as IfaceAsInt64 but if the value is float round it to int64 instead of returning error
func InfieldJoin ¶
func InfieldSplit ¶
func Int64Pointer ¶
func IntPointer ¶
func IsNetworkError ¶
IsNetworkError will decide if an error is network generated or RPC one used by Dispatcher to figure out whether it should try another connection
func LongExecTimeDetector ¶
endchan := LongExecTimeDetector("mesaj", 5*time.Second) defer func() { close(endchan) }()
func MapStringToInt64 ¶
func MaskSuffix ¶
Mask a number of characters in the suffix of the destination
func MergeMapsStringIface ¶
Used to merge multiple maps (eg: output of struct having ExtraFields)
func MinDuration ¶
returns the minimum duration between the two
func MissingMapFields ¶
MissingMapFields detects missing field values based on mandatory field names from a map[string]interface{}
func MissingMapKeys ¶
Returns mising keys in a map
func MissingStructFields ¶
Detects missing field values based on mandatory field names, s should be a pointer to a struct
func NewBiJSONrpcClient ¶
NewBiJSONrpcClient will create a bidirectional JSON client connection
func NewCustomJSONServerCodec ¶
func NewCustomJSONServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
NewCustomJSONServerCodec is used only when DispatcherS is active to handle APIer methods generically
func NewErrAttributeS ¶
func NewErrDispatcherS ¶
func NewErrFldStringCast ¶
func NewErrNotConnected ¶
func NewErrRALs ¶
func NewErrResourceS ¶
func NewErrServerError ¶
func NewErrStringCast ¶
func NewErrStringCast(valIface interface{}) error
func NewErrSupplierS ¶
func NewRPCRequest ¶
NewRPCRequest returns a new rpcRequest.
func NonemptyStructFields ¶
func NonemptyStructFields(s interface{}) map[string]interface{}
Detects nonempty struct fields, s should be a pointer to a struct Useful to not overwrite db fields with non defined params in api
func ParseDurationWithNanosecs ¶
Parses duration, considers s as time unit if not provided, seconds as float to specify subunits
func ParseDurationWithSecs ¶
Parses duration, considers s as time unit if not provided, seconds as float to specify subunits
func ParseTimeDetectLayout ¶
func ParseZeroRatingSubject ¶
func ParseZeroRatingSubject(tor, rateSubj string, defaultRateSubj map[string]string) (time.Duration, error)
ParseZeroRatingSubject will parse the subject in the balance returns duration if able to extract it from subject returns error if not able to parse duration (ie: if ratingSubject is standard one)
func PrefixSliceItems ¶
func RPCCall ¶
RPCCall is a generic method calling RPC on a struct instance serviceMethod is assumed to be in the form InstanceV1.Method where V1Method will become RPC method called on instance
func RandomInteger ¶
RandomInteger returns a random integer between min and max values
func ReflectFieldAsString ¶
ReflectFieldAsString parses intf and attepting to return the field as string or error otherwise Supports "ExtraFields" where additional fields are dynamically inserted in map with field name: extraFieldsLabel
func ReflectFieldInterface ¶
func ReflectFieldInterface(intf interface{}, fldName, extraFieldsLabel string) (retIf interface{}, err error)
ReflectFieldInterface parses intf attepting to return the field value or error otherwise Supports "ExtraFields" where additional fields are dynamically inserted in map with field name: extraFieldsLabel
func ReflectFieldMethodInterface ¶
ReflectFieldMethodInterface parses intf attepting to return the field value or error otherwise Supports "ExtraFields" where additional fields are dynamically inserted in map with field name: extraFieldsLabel
func RegisterRpcParams ¶
func RegisterRpcParams(name string, obj interface{})
func ReverseString ¶
func Round ¶
Round return rounded version of x with prec precision.
Special cases are:
Round(±0) = ±0 Round(±Inf) = ±Inf Round(NaN) = NaN
func RoundDuration ¶
returns a number equal or larger than the amount that exactly is divisible to whole
func SetMapExtraFields ¶
func SliceHasMember ¶
SliceHasMember searches within a *sorted* slice useful to search in shared vars (no slice sort)
func SliceMemberHasPrefix ¶
Iterates over slice members and returns true if one starts with prefix
func SliceStringToIface ¶
func SliceStringToIface(slc []string) (ifc []interface{})
SliceStringToIface converts slice of strings into a slice of interfaces
func SliceWithoutMember ¶
func SplitConcatenatedKey ¶
func SplitPrefix ¶
func StringPointer ¶
Utilities to provide pointers where we need to define ad-hoc
func StringToInterface ¶
func StringToInterface(s string) interface{}
StringToInterface will parse string into supported types if no other conversion possible, original string will be returned
func StripSlicePrefix ¶
StripSlicePrefix will strip a number of items from the beginning of the slice
func Sum ¶
func Sum(items ...interface{}) (sum interface{}, err error)
Sum attempts to sum multiple items returns the result or error if not comparable
func ToMapMapStringInterface ¶
func ToMapMapStringInterface(in interface{}) map[string]interface{}
Converts a struct to map[string]interface{}
func ToMapStringString ¶
Converts a struct to map[string]string
func UUIDSha1Prefix ¶
func UUIDSha1Prefix() string
UUIDSha1Prefix generates a prefix of the sha1 applied to an UUID prefix 8 is chosen since the probability of colision starts being minimal after 7 characters (see git commits)
func UpdateStructWithIfaceMap ¶
UpdateStructWithIfaceMap will update struct fields with values coming from map if map values are not matching the ones in struct convertion is being attempted ToDo: add here more fields
func UpdateStructWithStrMap ¶
Update struct with map fields, returns not matching map keys, s is a struct to be updated
func WarnExecTime ¶
WarnExecTime is used when we need to meassure the execution of specific functions and warn when the total duration is higher than expected should be usually called with defer, ie: defer WarnExecTime(time.Now(), "MyTestFunc", time.Duration(2*time.Second))
Types ¶
type ActivationInterval ¶
func (*ActivationInterval) IsActiveAtTime ¶
func (ai *ActivationInterval) IsActiveAtTime(atTime time.Time) bool
type ApierTPTiming ¶
type ApierTPTiming struct {
TPid string // Tariff plan id
ID string // Timing id
Years string // semicolon separated list of years this timing is valid on, *any supported
Months string // semicolon separated list of months this timing is valid on, *any supported
MonthDays string // semicolon separated list of month's days this timing is valid on, *any supported
WeekDays string // semicolon separated list of week day names this timing is valid on *any supported
Time string // String representing the time this timing starts on
}
type ArgDispatcher ¶
type ArgRSv1ResourceUsage ¶
type ArgsCache ¶
type ArgsCache struct {
DestinationIDs *[]string
ReverseDestinationIDs *[]string
RatingPlanIDs *[]string
RatingProfileIDs *[]string
ActionIDs *[]string
ActionPlanIDs *[]string
AccountActionPlanIDs *[]string
ActionTriggerIDs *[]string
ResourceProfileIDs *[]string
ResourceIDs *[]string
StatsQueueIDs *[]string
StatsQueueProfileIDs *[]string
ThresholdIDs *[]string
ThresholdProfileIDs *[]string
FilterIDs *[]string
SupplierProfileIDs *[]string
AttributeProfileIDs *[]string
ChargerProfileIDs *[]string
DispatcherProfileIDs *[]string
DispatcherHostIDs *[]string
DispatcherRoutesIDs *[]string
}
type ArgsCacheKeys ¶
type ArgsGetCacheItem ¶
type ArgsGetCacheItemIDs ¶
type ArgsGetCacheItemIDsWithArgDispatcher ¶
type ArgsGetCacheItemIDsWithArgDispatcher struct {
*ArgDispatcher
TenantArg
ArgsGetCacheItemIDs
}
type ArgsGetCacheItemWithArgDispatcher ¶
type ArgsGetCacheItemWithArgDispatcher struct {
*ArgDispatcher
TenantArg
ArgsGetCacheItem
}
type ArgsGetGroup ¶
type ArgsGetGroupWithArgDispatcher ¶
type ArgsGetGroupWithArgDispatcher struct {
*ArgDispatcher
TenantArg
ArgsGetGroup
}
type AttrCacheIDsWithArgDispatcher ¶
type AttrCacheIDsWithArgDispatcher struct {
*ArgDispatcher
TenantArg
CacheIDs []string
}
type AttrDirExportTP ¶
type AttrDirExportTP struct {
TPid *string
FileFormat *string // Format of the exported file <csv>
FieldSeparator *string // Separator used between fields
ExportPath *string // If provided it overwrites the configured export path
Compress *bool // If true the folder will be compressed after export performed
}
type AttrDisconnectSession ¶
Attributes to send on SessionDisconnect by SMG
type AttrExecuteAction ¶
type AttrExpFileCdrs ¶
type AttrExpFileCdrs struct {
CdrFormat *string // Cdr output file format <CdreCdrFormats>
FieldSeparator *string // Separator used between fields
ExportId *string // Optional exportid
ExportDir *string // If provided it overwrites the configured export directory
ExportFileName *string // If provided the output filename will be set to this
ExportTemplate *string // Exported fields template <""|fld1,fld2|*xml:instance_name>
CgrIds []string // If provided, it will filter based on the cgrids present in list
MediationRunIds []string // If provided, it will filter on mediation runid
TORs []string // If provided, filter on TypeOfRecord
CdrHosts []string // If provided, it will filter cdrhost
CdrSources []string // If provided, it will filter cdrsource
ReqTypes []string // If provided, it will fiter reqtype
Tenants []string // If provided, it will filter tenant
Categories []string // If provided, it will filter çategory
Accounts []string // If provided, it will filter account
Subjects []string // If provided, it will filter the rating subject
DestinationPrefixes []string // If provided, it will filter on destination prefix
OrderIdStart *int64 // Export from this order identifier
OrderIdEnd *int64 // Export smaller than this order identifier
TimeStart string // If provided, it will represent the starting of the CDRs interval (>=)
TimeEnd string // If provided, it will represent the end of the CDRs interval (<)
SkipErrors bool // Do not export errored CDRs
SkipRated bool // Do not export rated CDRs
SuppressCgrIds bool // Disable CgrIds reporting in reply/ExportedCgrIds and reply/UnexportedCgrIds
Paginator
}
func (*AttrExpFileCdrs) AsCDRsFilter ¶
func (aefc *AttrExpFileCdrs) AsCDRsFilter(timezone string) (*CDRsFilter, error)
type AttrGetAccount ¶
type AttrGetAccounts ¶
type AttrGetCallCost ¶
type AttrGetCdrs ¶
type AttrGetCdrs struct {
CgrIds []string // If provided, it will filter based on the cgrids present in list
MediationRunIds []string // If provided, it will filter on mediation runid
TORs []string // If provided, filter on TypeOfRecord
CdrHosts []string // If provided, it will filter cdrhost
CdrSources []string // If provided, it will filter cdrsource
ReqTypes []string // If provided, it will fiter reqtype
Tenants []string // If provided, it will filter tenant
Categories []string // If provided, it will filter çategory
Accounts []string // If provided, it will filter account
Subjects []string // If provided, it will filter the rating subject
DestinationPrefixes []string // If provided, it will filter on destination prefix
RatedAccounts []string // If provided, it will filter ratedaccount
RatedSubjects []string // If provided, it will filter the ratedsubject
OrderIdStart *int64 // Export from this order identifier
OrderIdEnd *int64 // Export smaller than this order identifier
TimeStart string // If provided, it will represent the starting of the CDRs interval (>=)
TimeEnd string // If provided, it will represent the end of the CDRs interval (<)
SkipErrors bool // Do not export errored CDRs
SkipRated bool // Do not export rated CDRs
OrderBy string // Ascendent/Descendent
Paginator
}
func (*AttrGetCdrs) AsCDRsFilter ¶
func (fltr *AttrGetCdrs) AsCDRsFilter(timezone string) (cdrFltr *CDRsFilter, err error)
type AttrGetRatingProfile ¶
type AttrGetRatingProfile struct {
Tenant string // Tenant's Id
Category string // TypeOfRecord
Subject string // Rating subject, usually the same as account
}
func (*AttrGetRatingProfile) GetID ¶
func (self *AttrGetRatingProfile) GetID() string
type AttrImportTPFromFolder ¶
type AttrImportTPFromFolder struct {
TPid string
FolderPath string
RunId string
CsvSeparator string
ArgDispatcher *ArgDispatcher
}
type AttrLoadTpFromFolder ¶
type AttrReloadCache ¶
type AttrReloadCache struct {
ArgsCache
FlushAll bool // If provided, cache flush will be executed before any action
}
Data used to do remote cache reloads via api
func InitAttrReloadCache ¶
func InitAttrReloadCache() (rpl AttrReloadCache)
InitAttrReloadCache initialize AttrReloadCache with empty string slice
type AttrReloadCacheWithArgDispatcher ¶
type AttrReloadCacheWithArgDispatcher struct {
*ArgDispatcher
TenantArg
AttrReloadCache
}
type AttrRemoteLock ¶
type AttrRemoveAccount ¶
type AttrSetAccount ¶
type AttrSetActions ¶
type AttrSetBalance ¶
type AttrSetDestination ¶
type AttrSetRatingProfile ¶
type AttrSetRatingProfile struct {
Tenant string // Tenant's Id
Category string // TypeOfRecord
Subject string // Rating subject, usually the same as account
Overwrite bool // Overwrite if exists
RatingPlanActivations []*TPRatingActivation // Activate rating plans at specific time
}
type AttrTPRatingProfileIds ¶
type BiRPCClient ¶
type BiRPCInternalClient ¶
type BiRPCInternalClient struct {
// contains filtered or unexported fields
}
Need separate client from the original RpcClientConnection since diretly passing the server is not enough without passing the client's reference
func NewBiRPCInternalClient ¶
func NewBiRPCInternalClient(serverConn BiRPCServer) *BiRPCInternalClient
func (*BiRPCInternalClient) Call ¶
func (clnt *BiRPCInternalClient) Call(serviceMethod string, args interface{}, reply interface{}) error
Part of rpcclient.ClientConnector interface
func (*BiRPCInternalClient) SetClientConn ¶
func (clnt *BiRPCInternalClient) SetClientConn(clntConn rpcclient.ClientConnector)
Used in case when clientConn is not available at init time (eg: SMGAsterisk who needs the biRPCConn at initialization)
type BiRPCServer ¶
type BiRPCServer interface {
Call(string, interface{}, interface{}) error // So we can use it also as rpcclient.ClientConnector
CallBiRPC(rpcclient.ClientConnector, string, interface{}, interface{}) error
}
Interface which the server needs to work as BiRPCServer
type CDRsFilter ¶
type CDRsFilter struct {
CGRIDs []string // If provided, it will filter based on the cgrids present in list
NotCGRIDs []string // Filter specific CgrIds out
RunIDs []string // If provided, it will filter on mediation runid
NotRunIDs []string // Filter specific runIds out
OriginIDs []string // If provided, it will filter on OriginIDs
NotOriginIDs []string // Filter specific OriginIDs out
OriginHosts []string // If provided, it will filter cdrhost
NotOriginHosts []string // Filter out specific cdr hosts
Sources []string // If provided, it will filter cdrsource
NotSources []string // Filter out specific CDR sources
ToRs []string // If provided, filter on TypeOfRecord
NotToRs []string // Filter specific TORs out
RequestTypes []string // If provided, it will fiter reqtype
NotRequestTypes []string // Filter out specific request types
Tenants []string // If provided, it will filter tenant
NotTenants []string // If provided, it will filter tenant
Categories []string // If provided, it will filter çategory
NotCategories []string // Filter out specific categories
Accounts []string // If provided, it will filter account
NotAccounts []string // Filter out specific Accounts
Subjects []string // If provided, it will filter the rating subject
NotSubjects []string // Filter out specific subjects
DestinationPrefixes []string // If provided, it will filter on destination prefix
NotDestinationPrefixes []string // Filter out specific destination prefixes
Costs []float64 // Query based on costs specified
NotCosts []float64 // Filter out specific costs out from result
ExtraFields map[string]string // Query based on extra fields content
NotExtraFields map[string]string // Filter out based on extra fields content
OrderIDStart *int64 // Export from this order identifier
OrderIDEnd *int64 // Export smaller than this order identifier
SetupTimeStart *time.Time // Start of interval, bigger or equal than configured
SetupTimeEnd *time.Time // End interval, smaller than setupTime
AnswerTimeStart *time.Time // Start of interval, bigger or equal than configured
AnswerTimeEnd *time.Time // End interval, smaller than answerTime
CreatedAtStart *time.Time // Start of interval, bigger or equal than configured
CreatedAtEnd *time.Time // End interval, smaller than
UpdatedAtStart *time.Time // Start of interval, bigger or equal than configured
UpdatedAtEnd *time.Time // End interval, smaller than
MinUsage string // Start of the usage interval (>=)
MaxUsage string // End of the usage interval (<)
MinCost *float64 // Start of the cost interval (>=)
MaxCost *float64 // End of the usage interval (<)
Unscoped bool // Include soft-deleted records in results
Count bool // If true count the items instead of returning data
OrderBy string // Can be ordered by OrderID,AnswerTime,SetupTime,Cost,Usage
Paginator
}
CDRsFilter is a filter used to get records out of storDB
type CGRError ¶
type CGRError struct {
// contains filtered or unexported fields
}
CGRError is a context based error returns always errorMessage but this can be switched based on methods called on it
func NewCGRError ¶
NewCGRError initialises a new CGRError
func (*CGRError) ActivateAPIError ¶
func (err *CGRError) ActivateAPIError()
func (*CGRError) ActivateLongError ¶
func (err *CGRError) ActivateLongError()
func (*CGRError) ActivateShortError ¶
func (err *CGRError) ActivateShortError()
type CGREvent ¶
type CGREvent struct {
Tenant string
ID string
Time *time.Time // event time
Event map[string]interface{}
}
CGREvent is a generic event processed by CGR services
func (*CGREvent) CheckMandatoryFields ¶
func (*CGREvent) ExtractArgs ¶
func (ev *CGREvent) ExtractArgs(dispatcherFlag, consumeSupplierPaginator bool) (ca ExtractedArgs)
ExtractArgs extracts the ArgDispatcher and SupplierPaginator from the received event
func (*CGREvent) FieldAsDuration ¶
FieldAsDuration returns a field as Duration instance
func (*CGREvent) FieldAsFloat64 ¶
FieldAsFloat64 returns a field as float64 instance
func (*CGREvent) FieldAsString ¶
FieldAsString returns a field as string instance
func (*CGREvent) FieldAsTime ¶
FieldAsTime returns a field as Time instance
type CGREventWithArgDispatcher ¶
type CGREventWithArgDispatcher struct {
*CGREvent
*ArgDispatcher
}
func NewCGREventWithArgDispatcher ¶
func NewCGREventWithArgDispatcher() *CGREventWithArgDispatcher
func (*CGREventWithArgDispatcher) Clone ¶
func (ev *CGREventWithArgDispatcher) Clone() (clned *CGREventWithArgDispatcher)
type CGREvents ¶
type CGREvents struct {
Tenant string
ID string
Time *time.Time // event time
Events []map[string]interface{}
}
CGREvents is a group of generic events processed by CGR services ie: derived CDRs
type CacheFileInfo ¶
type CacheFileInfo struct {
Encoding string
LoadInfo *LoadInstance
}
type CachedRPCResponse ¶
type CachedRPCResponse struct {
Result interface{}
Error error
}
CachedRPCResponse is used to cache a RPC response
type CgrIORecordWriter ¶
type CgrIORecordWriter struct {
// contains filtered or unexported fields
}
CgrIORecordWriter implements CgrRecordWriter
func NewCgrIORecordWriter ¶
func NewCgrIORecordWriter(w io.Writer) *CgrIORecordWriter
NewCgrIORecordWriter return CgrRecordWriter that will replace csv.Writer
func (*CgrIORecordWriter) Flush ¶
func (*CgrIORecordWriter) Flush()
Flush only to implement CgrRecordWriter ToDo: make sure we properly handle this method
func (*CgrIORecordWriter) Write ¶
func (rw *CgrIORecordWriter) Write(record []string) error
Write into the Writer the record
type CgrRecordWriter ¶
CgrRecordWriter is a writer for one line, compatible with csv.Writer interface on Write Used in TP exporter
type Counter ¶
func NewCounter ¶
type DataConverter ¶
type DataConverter interface {
Convert(interface{}) (interface{}, error)
}
DataConverter represents functions which should convert input into output
func NewDataConverter ¶
func NewDataConverter(params string) (conv DataConverter, err error)
NewDataConverter is a factory of converters
func NewDataConverterMustCompile ¶
func NewDataConverterMustCompile(params string) (conv DataConverter)
func NewDivideConverter ¶
func NewDivideConverter(constructParams string) (hdlr DataConverter, err error)
func NewDurationConverter ¶
func NewDurationConverter(params string) (hdlr DataConverter, err error)
func NewDurationNanosecondsConverter ¶
func NewDurationNanosecondsConverter(params string) ( hdlr DataConverter, err error)
func NewDurationSecondsConverter ¶
func NewDurationSecondsConverter(params string) (hdlr DataConverter, err error)
func NewMultiplyConverter ¶
func NewMultiplyConverter(constructParams string) (hdlr DataConverter, err error)
func NewPhoneNumberConverter ¶
func NewPhoneNumberConverter(params string) ( pbDC DataConverter, err error)
NewPhoneNumberConverter create a new phoneNumber converter If the format isn't specify by default we use NATIONAL Possible fromats are : E164(0) , INTERNATIONAL(1) , NATIONAL(2) ,RFC3966(3) Also ContryCode needs to be specified
func NewRoundConverter ¶
func NewRoundConverter(params string) (hdlr DataConverter, err error)
type DataConverters ¶
type DataConverters []DataConverter
DataConverters groups together multiple converters, executing optimized conversions
func (DataConverters) ConvertString ¶
func (dcs DataConverters) ConvertString(in string) (out string, err error)
ConvertString converts from and to string
type DestinationRate ¶
type DivideConverter ¶
type DivideConverter struct {
Value float64
}
DivideConverter divides input with value in params encapsulates the output as float64 value
func (*DivideConverter) Convert ¶
func (m *DivideConverter) Convert(in interface{}) (out interface{}, err error)
type DurationConverter ¶
type DurationConverter struct{}
DurationConverter converts duration into seconds encapsulated in float64
func (*DurationConverter) Convert ¶
func (mS *DurationConverter) Convert(in interface{}) ( out interface{}, err error)
type DurationNanosecondsConverter ¶
type DurationNanosecondsConverter struct{}
DurationNanosecondsConverter converts duration into nanoseconds encapsulated in int64
func (*DurationNanosecondsConverter) Convert ¶
func (mS *DurationNanosecondsConverter) Convert(in interface{}) ( out interface{}, err error)
type DurationSecondsConverter ¶
type DurationSecondsConverter struct{}
DurationSecondsConverter converts duration into seconds encapsulated in float64
func (*DurationSecondsConverter) Convert ¶
func (mS *DurationSecondsConverter) Convert(in interface{}) ( out interface{}, err error)
type ExportedFileCdrs ¶
type ExportedFileCdrs struct {
ExportedFilePath string // Full path to the newly generated export file
TotalRecords int // Number of CDRs to be exported
TotalCost float64 // Sum of all costs in exported CDRs
FirstOrderId, LastOrderId int64 // The order id of the last exported CDR
ExportedCgrIds []string // List of successfuly exported cgrids in the file
UnexportedCgrIds map[string]string // Map of errored CDRs, map key is cgrid, value will be the error string
}
type ExportedTPStats ¶
type ExtractedArgs ¶
type ExtractedArgs struct {
ArgDispatcher *ArgDispatcher
SupplierPaginator *Paginator
}
ExtractedArgs stores the extracted arguments from CGREvent
type FieldMultiplyFactor ¶
FieldMultiplyFactor defines multiply factors for different field values original defined for CDRE component
func (FieldMultiplyFactor) Clone ¶
func (fmp FieldMultiplyFactor) Clone() (cln FieldMultiplyFactor)
type FlagsWithParams ¶
FlagsWithParams should store a list of profiles for each subsystem
func FlagsWithParamsFromSlice ¶
func FlagsWithParamsFromSlice(s []string) (FlagsWithParams, error)
FlagsWithParamsFromSlice construct a FlagsWithParams from the given slice
func (FlagsWithParams) GetBool ¶
func (fWp FlagsWithParams) GetBool(key string) (b bool)
GetBool returns the flag as boolean
func (FlagsWithParams) HasKey ¶
func (fWp FlagsWithParams) HasKey(key string) (has bool)
HasKey returns if the key was mentioned in flags
func (FlagsWithParams) ParamsSlice ¶
func (fWp FlagsWithParams) ParamsSlice(subs string) (ps []string)
ParamsSlice returns the list of profiles for the subsystem
func (FlagsWithParams) SliceFlags ¶
func (fWp FlagsWithParams) SliceFlags() (sls []string)
SliceFlags converts from FlagsWithParams back to []string
type GetFilterIndexesArg ¶
type HierarchyPath ¶
type HierarchyPath []string
HierarchyPath is used in various places to represent various path hierarchies (eg: in Diameter groups, XML trees)
func ParseHierarchyPath ¶
func ParseHierarchyPath(path string, sep string) HierarchyPath
type Int64Slice ¶
type Int64Slice []int64
Sortable Int64Slice
func (Int64Slice) Len ¶
func (slc Int64Slice) Len() int
func (Int64Slice) Less ¶
func (slc Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (slc Int64Slice) Swap(i, j int)
type LoadInstance ¶
type LoggerInterface ¶
type LoggerInterface interface {
SetSyslog(log *syslog.Writer)
SetLogLevel(level int)
GetSyslog() *syslog.Writer
Close() error
Emerg(m string) error
Alert(m string) error
Crit(m string) error
Err(m string) error
Warning(m string) error
Notice(m string) error
Info(m string) error
Debug(m string) error
Write(p []byte) (n int, err error)
}
var Logger LoggerInterface
type MatchFilterIndexArg ¶
type MethodParameters ¶
type MethodParameters struct {
Method string
Parameters interface{}
}
type MetricWithFilters ¶
MetricWithFilters is used in TPStatProfile
type MonthDays ¶
type MonthDays []int
Defines month days series
type Months ¶
Defines months series
func (Months) IsComplete ¶
type MultiplyConverter ¶
type MultiplyConverter struct {
Value float64
}
MultiplyConverter multiplies input with value in params encapsulates the output as float64 value
func (*MultiplyConverter) Convert ¶
func (m *MultiplyConverter) Convert(in interface{}) (out interface{}, err error)
type Paginator ¶
type Paginator struct {
Limit *int // Limit the number of items returned
Offset *int // Offset of the first item returned (eg: use Limit*Page in case of PerPage items)
}
Paginate stuff around items returned
func (*Paginator) PaginateStringSlice ¶
type PaginatorWithSearch ¶
type PhoneNumberConverter ¶
type PhoneNumberConverter struct {
CountryCode string
Format phonenumbers.PhoneNumberFormat
}
PhoneNumberConverter converts
func (*PhoneNumberConverter) Convert ¶
func (lc *PhoneNumberConverter) Convert(in interface{}) (out interface{}, err error)
type RPCCDRsFilter ¶
type RPCCDRsFilter struct {
CGRIDs []string // If provided, it will filter based on the cgrids present in list
NotCGRIDs []string // Filter specific CgrIds out
RunIDs []string // If provided, it will filter on mediation runid
NotRunIDs []string // Filter specific runIds out
OriginIDs []string // If provided, it will filter on OriginIDs
NotOriginIDs []string // Filter specific OriginIDs out
OriginHosts []string // If provided, it will filter cdrhost
NotOriginHosts []string // Filter out specific cdr hosts
Sources []string // If provided, it will filter cdrsource
NotSources []string // Filter out specific CDR sources
ToRs []string // If provided, filter on TypeOfRecord
NotToRs []string // Filter specific TORs out
RequestTypes []string // If provided, it will fiter reqtype
NotRequestTypes []string // Filter out specific request types
Tenants []string // If provided, it will filter tenant
NotTenants []string // If provided, it will filter tenant
Categories []string // If provided, it will filter çategory
NotCategories []string // Filter out specific categories
Accounts []string // If provided, it will filter account
NotAccounts []string // Filter out specific Accounts
Subjects []string // If provided, it will filter the rating subject
NotSubjects []string // Filter out specific subjects
DestinationPrefixes []string // If provided, it will filter on destination prefix
NotDestinationPrefixes []string // Filter out specific destination prefixes
Costs []float64 // Query based on costs specified
NotCosts []float64 // Filter out specific costs out from result
ExtraFields map[string]string // Query based on extra fields content
NotExtraFields map[string]string // Filter out based on extra fields content
SetupTimeStart string // Start of interval, bigger or equal than configured
SetupTimeEnd string // End interval, smaller than setupTime
AnswerTimeStart string // Start of interval, bigger or equal than configured
AnswerTimeEnd string // End interval, smaller than answerTime
CreatedAtStart string // Start of interval, bigger or equal than configured
CreatedAtEnd string // End interval, smaller than
UpdatedAtStart string // Start of interval, bigger or equal than configured
UpdatedAtEnd string // End interval, smaller than
MinUsage string // Start of the usage interval (>=)
MaxUsage string // End of the usage interval (<)
OrderBy string // Ascendent/Descendent
ExtraArgs map[string]interface{} // it will contain optional arguments like: OrderIDStart,OrderIDEnd,MinCost and MaxCost
Paginator // Add pagination
}
RPCCDRsFilter is a filter used in Rpc calls RPCCDRsFilter is slightly different than CDRsFilter by using string instead of Time filters
func (*RPCCDRsFilter) AsCDRsFilter ¶
func (fltr *RPCCDRsFilter) AsCDRsFilter(timezone string) (cdrFltr *CDRsFilter, err error)
type RPCCDRsFilterWithArgDispatcher ¶
type RPCCDRsFilterWithArgDispatcher struct {
*RPCCDRsFilter
*ArgDispatcher
*TenantArg
}
type RSRField ¶
type RSRField struct {
Id string // Identifier
Rules string // Rules container holding the string rules to be able to restore it after DB
RSRules []*ReSearchReplace // Rules to use when processing field value
// contains filtered or unexported fields
}
func NewRSRField ¶
func NewRSRFieldMustCompile ¶
func (*RSRField) IsCompiled ¶
IsCompiled finds out whether this RSRField was already parsed or RAW state
func (*RSRField) RegexpMatched ¶
RegexpMatched will investigate whether we had a regexp match through the rules
type RSRFields ¶
type RSRFields []*RSRField
func ParseRSRFields ¶
Parses list of RSRFields, used for example as multiple filters in derived charging
func ParseRSRFieldsFromSlice ¶
type RSRFilter ¶
type RSRFilter struct {
// contains filtered or unexported fields
}
One filter rule
func NewRSRFilter ¶
NewRSRFilter instantiates a new RSRFilter, setting it's properties
func NewRSRFilterMustCompile ¶
NewRSRFilterMustCompile is used mostly in tests
func (*RSRFilter) FilterRule ¶
type RSRFilters ¶
type RSRFilters []*RSRFilter
func ParseRSRFilters ¶
func ParseRSRFilters(fldsStr, sep string) (RSRFilters, error)
func ParseRSRFiltersFromSlice ¶
func ParseRSRFiltersFromSlice(fltrStrs []string) (RSRFilters, error)
func (RSRFilters) FilterRules ¶
func (fltrs RSRFilters) FilterRules() (rls string)
type RateSlot ¶
type RateSlot struct {
ConnectFee float64 // ConnectFee applied once the call is answered
Rate float64 // Rate applied
RateUnit string // Number of billing units this rate applies to
RateIncrement string // This rate will apply in increments of duration
GroupIntervalStart string // Group position
// contains filtered or unexported fields
}
func NewRateSlot ¶
func NewRateSlot(connectFee, rate float64, rateUnit, rateIncrement, grpInterval string) (*RateSlot, error)
Needed so we make sure we always use SetDurations() on a newly created value
func (*RateSlot) GroupIntervalStartDuration ¶
func (*RateSlot) RateIncrementDuration ¶
func (*RateSlot) RateUnitDuration ¶
func (*RateSlot) SetDurations ¶
Used to set the durations we need out of strings
type RatingPlanCostArg ¶
type RatingPlanCostArg struct {
RatingPlanIDs []string
Destination string
SetupTime string
Usage string
*ArgDispatcher
}
type ReSearchReplace ¶
Regexp Search/Replace, used for example for field formatting
func (*ReSearchReplace) Process ¶
func (rsr *ReSearchReplace) Process(source string) string
type RoundConverter ¶
RoundConverter will round floats
func (*RoundConverter) Convert ¶
func (rnd *RoundConverter) Convert(in interface{}) (out interface{}, err error)
type RpcParams ¶
type RpcParams struct {
Object interface{}
InParam interface{}
OutParam interface{}
}
func GetRpcParams ¶
type SMCostFilter ¶
type SMCostFilter struct {
CGRIDs []string
NotCGRIDs []string
RunIDs []string
NotRunIDs []string
OriginHosts []string
NotOriginHosts []string
OriginIDs []string
NotOriginIDs []string
CostSources []string
NotCostSources []string
Usage UsageInterval
CreatedAt TimeInterval
}
func AppendToSMCostFilter ¶
func AppendToSMCostFilter(smcFilter *SMCostFilter, fieldType, fieldName string, values []string, timezone string) (smcf *SMCostFilter, err error)
type Server ¶
func (*Server) BiRPCRegister ¶
func (s *Server) BiRPCRegister(rcvr interface{})
func (*Server) BiRPCRegisterName ¶
Registers a new BiJsonRpc name
func (*Server) RegisterHttpFunc ¶
func (*Server) RegisterHttpHandler ¶
func (*Server) RegisterProfiler ¶
func (*Server) RpcRegister ¶
func (s *Server) RpcRegister(rcvr interface{})
func (*Server) RpcRegisterName ¶
func (*Server) ServeBiJSON ¶
func (s *Server) ServeBiJSON(addr string, onConn func(*rpc2.Client), onDis func(*rpc2.Client)) (err error)
ServeBiJSON create a gorutine to listen and serve as BiRPC server
func (*Server) ServeGOBTLS ¶
func (*Server) ServeHTTPTLS ¶
func (*Server) ServeJSONTLS ¶
func (*Server) SetDispatched ¶
func (s *Server) SetDispatched()
type SessionFilter ¶
type SessionFilter struct {
Limit *int
Filters []string
Tenant string
*ArgDispatcher
}
type SetFilterIndexesArg ¶
type StdLogger ¶
type StdLogger struct {
// contains filtered or unexported fields
}
Logs to standard output
func (*StdLogger) SetLogLevel ¶
SetLogLevel changes the log level
type StringMap ¶
func NewStringMap ¶
func ParseStringMap ¶
func StringMapFromSlice ¶
func StringMapPointer ¶
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
StringSet will manage data within a set
func NewStringSet ¶
NewStringSet returns a new StringSet
func (*StringSet) Data ¶
Data exports the internal map, so we can benefit for example of key iteration
type TPAccountActions ¶
type TPAccountActions struct {
TPid string // Tariff plan id
LoadId string // LoadId, used to group actions on a load
Tenant string // Tenant's Id
Account string // Account name
ActionPlanId string // Id of ActionPlan profile to use
ActionTriggersId string // Id of ActionTriggers profile to use
AllowNegative bool
Disabled bool
}
func (*TPAccountActions) GetId ¶
func (aa *TPAccountActions) GetId() string
func (*TPAccountActions) KeyId ¶
func (aa *TPAccountActions) KeyId() string
Returns the id used in some nosql dbs (eg: redis)
func (*TPAccountActions) SetAccountActionsId ¶
func (aa *TPAccountActions) SetAccountActionsId(id string) error
type TPAction ¶
type TPAction struct {
Identifier string // Identifier mapped in the code
BalanceId string // Balance identification string (account scope)
BalanceUuid string // Balance identification string (global scope)
BalanceType string // Type of balance the action will operate on
Units string // Number of units to add/deduct
ExpiryTime string // Time when the units will expire
Filter string // The condition on balances that is checked before the action
TimingTags string // Timing when balance is active
DestinationIds string // Destination profile id
RatingSubject string // Reference a rate subject defined in RatingProfiles
Categories string // category filter for balances
BalanceWeight string // Balance weight
ExtraParameters string
BalanceBlocker string
BalanceDisabled string
Weight float64 // Action's weight
}
type TPActionPlan ¶
type TPActionPlan struct {
TPid string // Tariff plan id
ID string // ActionPlan id
ActionPlan []*TPActionTiming // Set of ActionTiming bindings this profile will group
}
type TPActionTiming ¶
type TPActionTrigger ¶
type TPActionTrigger struct {
Id string // group id
UniqueID string // individual id
ThresholdType string // This threshold type
ThresholdValue float64 // Threshold
Recurrent bool // reset executed flag each run
MinSleep string // Minimum duration between two executions in case of recurrent triggers
ExpirationDate string // Trigger expiration
ActivationDate string // Trigger activation
BalanceId string // The id of the balance in the account
BalanceType string // Type of balance this trigger monitors
BalanceDestinationIds string // filter for balance
BalanceWeight string // filter for balance
BalanceExpirationDate string // filter for balance
BalanceTimingTags string // filter for balance
BalanceRatingSubject string // filter for balance
BalanceCategories string // filter for balance
BalanceBlocker string // filter for balance
BalanceDisabled string // filter for balance
ActionsId string // Actions which will execute on threshold reached
Weight float64 // weight
}
type TPActionTriggers ¶
type TPActionTriggers struct {
TPid string // Tariff plan id
ID string // action trigger id
ActionTriggers []*TPActionTrigger // Set of triggers grouped in this profile
}
type TPActivationInterval ¶
TPActivationInterval represents an activation interval for an item
func (*TPActivationInterval) AsActivationInterval ¶
func (tpAI *TPActivationInterval) AsActivationInterval(timezone string) (ai *ActivationInterval, err error)
AsActivationTime converts TPActivationInterval into ActivationInterval
type TPAttribute ¶
TPAttribute is used in TPAttributeProfile
type TPAttributeProfile ¶
type TPAttributeProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
Contexts []string // bind this TPAttribute to multiple context
Attributes []*TPAttribute
Blocker bool
Weight float64
}
TPAttributeProfile is used in APIs to manage remotely offline AttributeProfile
type TPChargerProfile ¶
type TPChargerProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
RunID string
AttributeIDs []string
Weight float64
}
TPChargerProfile is used in APIs to manage remotely offline ChargerProfile
type TPDestination ¶
type TPDestination struct {
TPid string // Tariff plan id
ID string // Destination id
Prefixes []string // Prefixes attached to this destination
}
TPDestination represents one destination in storDB
type TPDestinationRate ¶
type TPDestinationRate struct {
TPid string // Tariff plan id
ID string // DestinationRate profile id
DestinationRates []*DestinationRate // Set of destinationid-rateid bindings
}
type TPDispatcherHost ¶
type TPDispatcherHost struct {
TPid string
Tenant string
ID string
Conns []*TPDispatcherHostConn
}
TPDispatcherHost is used in APIs to manage remotely offline DispatcherHost
type TPDispatcherHostConn ¶
TPDispatcherHostConn is used in TPDispatcherHost
type TPDispatcherHostProfile ¶
type TPDispatcherHostProfile struct {
ID string
FilterIDs []string
Weight float64 // applied in case of multiple connections need to be ordered
Params []interface{} // additional parameters stored for a session
Blocker bool // no connection after this one
}
TPDispatcherHostProfile is used in TPDispatcherProfile
type TPDispatcherProfile ¶
type TPDispatcherProfile struct {
TPid string
Tenant string
ID string
Subsystems []string
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
Strategy string
StrategyParams []interface{} // ie for distribution, set here the pool weights
Weight float64
Hosts []*TPDispatcherHostProfile
}
TPDispatcherProfile is used in APIs to manage remotely offline DispatcherProfile
type TPDistinctIds ¶
type TPDistinctIds []string
Used to extract ids from stordb
func (TPDistinctIds) String ¶
func (tpdi TPDistinctIds) String() string
type TPFilter ¶
type TPFilter struct {
Type string // Filter type (*string, *timing, *rsr_filters, *cdr_stats)
Element string // Name of the field providing us the Values to check (used in case of some )
Values []string // Filter definition
}
TPFilter is used in TPFilterProfile
type TPFilterProfile ¶
type TPFilterProfile struct {
TPid string
Tenant string
ID string
Filters []*TPFilter
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
}
TPFilterProfile is used in APIs to manage remotely offline FilterProfile
type TPRatingActivation ¶
type TPRatingPlan ¶
type TPRatingPlan struct {
TPid string // Tariff plan id
ID string // RatingPlan profile id
RatingPlanBindings []*TPRatingPlanBinding // Set of destinationid-rateid bindings
}
type TPRatingPlanBinding ¶
type TPRatingPlanBinding struct {
DestinationRatesId string // The DestinationRate identity
TimingId string // The timing identity
Weight float64 // Binding priority taken into consideration when more DestinationRates are active on a time slot
// contains filtered or unexported fields
}
func (*TPRatingPlanBinding) SetTiming ¶
func (self *TPRatingPlanBinding) SetTiming(tm *TPTiming)
func (*TPRatingPlanBinding) Timing ¶
func (self *TPRatingPlanBinding) Timing() *TPTiming
type TPRatingProfile ¶
type TPRatingProfile struct {
TPid string // Tariff plan id
LoadId string // Gives ability to load specific RatingProfile based on load identifier, hence being able to keep history also in stordb
Tenant string // Tenant's Id
Category string // TypeOfRecord
Subject string // Rating subject, usually the same as account
RatingPlanActivations []*TPRatingActivation // Activate rate profiles at specific time
}
func (*TPRatingProfile) GetId ¶
func (rpf *TPRatingProfile) GetId() string
func (*TPRatingProfile) KeyId ¶
func (rpf *TPRatingProfile) KeyId() string
Used as key in nosql db (eg: redis)
func (*TPRatingProfile) SetRatingProfilesId ¶
func (rpf *TPRatingProfile) SetRatingProfilesId(id string) error
type TPResourceProfile ¶
type TPResourceProfile struct {
TPid string
Tenant string
ID string // Identifier of this limit
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active/expires
UsageTTL string
Limit string // Limit value
AllocationMessage string
Blocker bool // blocker flag to stop processing on filters matched
Stored bool
Weight float64 // Weight to sort the ResourceLimits
ThresholdIDs []string // Thresholds to check after changing Limit
}
TPResourceProfile is used in APIs to manage remotely offline ResourceProfile
type TPSharedGroup ¶
type TPSharedGroup struct {
}
type TPSharedGroups ¶
type TPSharedGroups struct {
}
type TPStatProfile ¶
type TPStatProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
ActivationInterval *TPActivationInterval
QueueLength int
TTL string
Metrics []*MetricWithFilters
Blocker bool // blocker flag to stop processing on filters matched
Stored bool
Weight float64
MinItems int
ThresholdIDs []string
}
TPStatProfile is used in APIs to manage remotely offline StatProfile
type TPSupplier ¶
type TPSupplier struct {
ID string // SupplierID
FilterIDs []string
AccountIDs []string
RatingPlanIDs []string // used when computing price
ResourceIDs []string // queried in some strategies
StatIDs []string // queried in some strategies
Weight float64
Blocker bool
SupplierParameters string
}
TPSupplier is used in TPSupplierProfile
type TPSupplierProfile ¶
type TPSupplierProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
Sorting string
SortingParameters []string
Suppliers []*TPSupplier
Weight float64
}
TPSupplierProfile is used in APIs to manage remotely offline SupplierProfile
type TPThresholdProfile ¶
type TPThresholdProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
MaxHits int
MinHits int
MinSleep string
Blocker bool // blocker flag to stop processing on filters matched
Weight float64 // Weight to sort the thresholds
ActionIDs []string
Async bool
}
TPThresholdProfile is used in APIs to manage remotely offline ThresholdProfile
type TPTiming ¶
type TenantAccount ¶
type TenantAccount struct {
Tenant, Account string
}
func NewTAFromAccountKey ¶
func NewTAFromAccountKey(accountKey string) (*TenantAccount, error)
type TenantArgWithPaginator ¶
type TenantID ¶
func NewTenantID ¶
type TenantIDWithArgDispatcher ¶
type TenantIDWithArgDispatcher struct {
*TenantID
*ArgDispatcher
}
type TenantIDWithCache ¶
func (*TenantIDWithCache) TenantID ¶
func (tID *TenantIDWithCache) TenantID() string
type TenantWithArgDispatcher ¶
type TenantWithArgDispatcher struct {
*TenantArg
*ArgDispatcher
}
type ValueFormula ¶
for computing a dynamic value for Value field
func ParseBalanceFilterValue ¶
func ParseBalanceFilterValue(tor string, val string) (*ValueFormula, error)
func (*ValueFormula) String ¶
func (vf *ValueFormula) String() string
type WeekDays ¶
Defines week days series