Documentation
¶
Overview ¶
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Index ¶
- Constants
- Variables
- func AESDecrypt(encrypted string, encKey string) (txt string, err error)
- func AESEncrypt(txt, encKey string) (encrypted string, err error)
- func APIErrorHandler(errIn error) (err error)
- func BoolGenerator() *boolGen
- func BoolPointer(b bool) *bool
- func CastRPCErr(err error) error
- func CheckInLineFilter(fltrs []string) (err error)
- func CloneDecimalBig(in *decimal.Big) *decimal.Big
- func CompilePath(spath string) (path []string)
- func CompilePathSlice(spath []string) (path []string)
- func ComputeHash(dataKeys ...string) (lns string, err error)
- func ConcatenatedKey(keyVals ...string) string
- func DPDynamicInterface(dnVal string, dP DataProvider) (any, error)
- func DPDynamicString(dnVal string, dP DataProvider) (string, error)
- func DecodeBase64JSON(data string, val any) (err error)
- func DecodeServerRequest(r io.Reader) (req *serverRequest, err error)
- func Difference(tm string, items ...any) (diff any, err error)
- func Divide(items ...any) (div any, err error)
- func DivideBig(x, y *decimal.Big) *decimal.Big
- func DivideBigWithReminder(x, y *decimal.Big) (q *decimal.Big, r *decimal.Big)
- func DurationPointer(d time.Duration) *time.Duration
- func EncodeBase64JSON(val any) (enc string, err error)
- func EqualTo(item, oItem any) (eq bool, err error)
- func ErrEnvNotFound(key 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 Fib() func() int
- func FibDuration(durationUnit, maxDuration time.Duration) func() time.Duration
- func FirstDurationNonEmpty(vals ...time.Duration) time.Duration
- func FirstIntNonEmpty(vals ...int) 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 GenUUID() string
- func GenerateDBItemOpts(apiKey, routeID, cache, rmtHost string) (mp map[string]any)
- func GetBasicType(item any) any
- func GetCGRVersion() (vers string, err error)
- func GetEndOfMonth(ref time.Time) time.Time
- func GetPaginateOpts(opts map[string]any) (limit, offset, maxItems int, err error)
- func GetPathIndex(spath string) (opath string, idx *int)
- func GetPathIndexString(spath string) (opath string, idx *string)
- func GetReaderFromPath(path string, timeout time.Duration) (r io.ReadCloser, err error)
- func GetRemoteIP(r *http.Request) (ip string, err error)
- func GetTrendLabel(tGrowth float64, tolerance float64) (lbl string)
- func GetUniformType(item any) (any, error)
- func GetUniqueCDRID(cgrEv *CGREvent) string
- func GetUrlRawArguments(dialURL string) (out map[string]string)
- func GreaterThan(item, oItem any, orEqual bool) (gte bool, err error)
- func HasPrefixSlice(prfxs []string, el string) bool
- func IPAllocationsLockKey(tnt, id string) string
- func IPProfileLockKey(tnt, id string) string
- func IfaceAsBig(itm any) (b *decimal.Big, err error)
- func IfaceAsBool(itm any) (b bool, err error)
- func IfaceAsDuration(itm any) (d time.Duration, err error)
- func IfaceAsFloat64(itm any) (f float64, err error)
- func IfaceAsInt(itm any) (i int, err error)
- func IfaceAsInt64(itm any) (i int64, err error)
- func IfaceAsString(fld any) (out string)
- func IfaceAsStringSlice(fld any) (ss []string, err error)
- func IfaceAsTInt64(itm any) (i int64, err error)
- func IfaceAsTime(itm any, timezone string) (t time.Time, err error)
- func InfieldSplit(val string) []string
- func Int64Pointer(i int64) *int64
- func IntPointer(i int) *int
- func IsPathValid(path string) (err error)
- func IsPathValidForExporters(path string) (err error)
- func IsURL(path string) bool
- func MapStringStringEqual(v1, v2 map[string]string) bool
- func MapStringStringPointer(mp map[string]string) *map[string]string
- func MapStringToInt64(in map[string]string) (mapout map[string]int64, err error)
- func MaskSuffix(dest string, maskLen int) string
- func MissingStructFields(s any, mandatories []string) []string
- func Multiply(items ...any) (mlt any, err error)
- func MultiplyBig(x, y *decimal.Big) *decimal.Big
- func NewBiJSONrpcClient(addr string, obj birpc.ClientConnector) (*birpc.BirpcClient, error)
- func NewECDSAPrvKey(prvKeyPath string, timeout time.Duration) (prvKey *ecdsa.PrivateKey, err error)
- func NewECDSAPrvKeyFromReader(reader io.Reader) (prvKey *ecdsa.PrivateKey, err error)
- func NewECDSAPubKey(pubKeyPath string, timeout time.Duration) (pubKey *ecdsa.PublicKey, err error)
- func NewECDSAPubKeyFromReader(reader io.Reader) (pubKey *ecdsa.PublicKey, err error)
- func NewErrAccountS(err error) error
- func NewErrAttributeS(err error) error
- func NewErrCDRS(err error) error
- func NewErrChargerS(err error) error
- func NewErrDispatcherS(err error) error
- func NewErrIPs(err error) error
- func NewErrMandatoryIeMissing(fields ...string) error
- func NewErrNotConnected(serv string) error
- func NewErrRateS(err error) error
- func NewErrResourceS(err error) error
- func NewErrRouteS(err error) error
- func NewErrServerError(err error) error
- func NewErrStatS(err error) error
- func NewErrThresholdS(err error) error
- func NewRoundingMode(rnd string) (decimal.RoundingMode, error)
- func NewSTIRError(reason string) error
- func NewServerRequest(method string, params, id json.RawMessage) *serverRequest
- func NewServiceStateTimeoutError(sourceID, srvID, stateID string) error
- func OptAsBool(opts map[string]any, name string) (b bool)
- func OptAsBoolOrDef(opts map[string]any, name string, def bool) (b bool)
- func OptAsStringSlice(opts map[string]any, name string) (b []string, err error)
- func Paginate[E any](in []E, limit, offset, maxItems int) (out []E, err error)
- func ParseBinarySize(size string) (int64, error)
- 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 PrefixSliceItems(prfx string, slc []string) (out []string)
- func RandomInteger(min, max int64) int64
- func RankingProfileLockKey(tnt, id string) string
- func RankingSortStats(sortingType string, sortingParams []string, ...) (sortedStatIDs []string, err error)
- func ReflectFieldMethodInterface(obj any, fldName string) (retIf any, err error)
- func RemoveWhiteSpaces(str string) string
- func ResourceLockKey(tnt, id string) string
- func ResourceProfileLockKey(tnt, id string) string
- func ReverseString(s string) string
- func Round(x float64, prec int, method string) float64
- func RoundStatDuration(x time.Duration, prec int) time.Duration
- func RoundingModeToString(rnd decimal.RoundingMode) string
- func Sha1(attrs ...string) string
- func SizeFmt(num float64, suffix string) string
- func SliceStringPointer(d []string) *[]string
- func SliceStringToIface(slc []string) (ifc []any)
- func SplitConcatenatedKey(key string) []string
- func SplitPath(rule string, sep byte, n int) []string
- func SplitPrefix(prefix string, minLength int) []string
- func SplitSuffix(suffix string) []string
- func StringAsBig(itm string) (b *decimal.Big, err error)
- func StringPointer(str string) *string
- func StringToInterface(s string) any
- func StructChanTimeout(chn chan struct{}, timeout time.Duration) bool
- func SubstractBig(x, y *decimal.Big) *decimal.Big
- func Sum(items ...any) (sum any, err error)
- func SumBig(x, y *decimal.Big) *decimal.Big
- func TimePointer(t time.Time) *time.Time
- func ToIJSON(v any) string
- func ToJSON(v any) string
- func ToUnescapedJSON(value any) (bts []byte, err error)
- func UUIDSha1Prefix() string
- func Unzip(src, dest string) error
- func UpdateStructWithIfaceMap(s any, mp map[string]any) (err error)
- func VerifyHash(hash string, dataKeys ...string) bool
- func WatchDir(dirPath string, f func(itmID string) error, sysID string, ...) (err error)
- func WriteServerResponse(w io.Writer, id *json.RawMessage, result, err any) error
- type APAction
- func (a *APAction) Clone() *APAction
- func (a *APAction) FieldAsInterface(fldPath []string) (_ any, err error)
- func (a *APAction) FieldAsString(fldPath []string) (_ string, err error)
- func (a *APAction) Merge(v2 *APAction)
- func (a *APAction) Set(path []string, val any, newBranch bool) (err error)
- func (a *APAction) String() string
- type APDiktat
- type APIAttributeProfile
- type APIAttributeProfileWithAPIOpts
- type APIEventCharges
- type APIIntervalRate
- type APIRate
- type APIRateProfile
- type Account
- func (ap *Account) AccountBalancesBackup() (abb AccountBalancesBackup)
- func (ap *Account) BalancesAltered(abb AccountBalancesBackup) (altred bool)
- func (acc *Account) CacheClone() any
- func (acc *Account) Clone() (cln *Account)
- func (aC *Account) Equals(acnt *Account) (eq bool)
- func (ap *Account) FieldAsInterface(fldPath []string) (_ any, err error)
- func (ap *Account) FieldAsString(fldPath []string) (_ string, err error)
- func (ap *Account) Merge(v2 any)
- func (ap *Account) RestoreFromBackup(abb AccountBalancesBackup)
- func (ap *Account) Set(path []string, val any, newBranch bool) (err error)
- func (ap *Account) String() string
- func (aP *Account) TenantID() string
- type AccountBalancesBackup
- type AccountCharge
- type AccountWithAPIOpts
- type AccountWithLock
- type Accounts
- type ActionProfile
- func (ap *ActionProfile) CacheClone() any
- func (ap *ActionProfile) Clone() *ActionProfile
- func (ap *ActionProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (ap *ActionProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (ap *ActionProfile) Merge(v2 any)
- func (ap *ActionProfile) Set(path []string, val any, newBranch bool) (err error)
- func (ap *ActionProfile) String() string
- func (ap *ActionProfile) TenantID() string
- type ActionProfileWithAPIOpts
- type ActivationInterval
- type ArgCacheReplicateRemove
- type ArgCacheReplicateSet
- type ArgExportCDRs
- type ArgExportToFolder
- type ArgGetTrend
- type ArgScheduleRankingQueries
- type ArgScheduleTrendQueries
- type ArgScheduledRankings
- type ArgScheduledTrends
- type ArgsActRemoveBalances
- type ArgsActSetBalance
- type ArgsComputeFilterIndexIDs
- type ArgsComputeFilterIndexes
- type ArgsFailedPosts
- type ArgsGetCacheItem
- type ArgsGetCacheItemIDs
- type ArgsGetCacheItemIDsWithAPIOpts
- type ArgsGetCacheItemWithAPIOpts
- type ArgsGetGroup
- type ArgsGetGroupWithAPIOpts
- type ArgsItemIDs
- type ArgsSubItemIDs
- type AttrCacheIDsWithAPIOpts
- type AttrDirExportTP
- type AttrDisconnectSession
- type AttrGetCdrs
- type AttrImportTPFromFolder
- type AttrLoadTpFromFolder
- type AttrReloadCacheWithAPIOpts
- type AttrRemoteLock
- type Attribute
- type AttributeProfile
- func (ap *AttributeProfile) CacheClone() any
- func (ap *AttributeProfile) Clone() *AttributeProfile
- func (ap *AttributeProfile) Compile() error
- func (ap *AttributeProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (ap *AttributeProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (ap *AttributeProfile) Merge(v2 any)
- func (ap *AttributeProfile) Set(path []string, val any, newBranch bool) (err error)
- func (ap *AttributeProfile) String() string
- func (ap *AttributeProfile) TenantID() string
- func (ap *AttributeProfile) TenantIDInline() string
- type AttributeProfileWithAPIOpts
- type BSONMarshaler
- type BalDiktat
- type Balance
- func (blnc *Balance) Clone() (cln *Balance)
- func (bL *Balance) Equals(bal *Balance) (eq bool)
- func (bL *Balance) FieldAsInterface(fldPath []string) (_ any, err error)
- func (bL *Balance) FieldAsString(fldPath []string) (_ string, err error)
- func (bL *Balance) Merge(vi *Balance)
- func (bL *Balance) Set(path []string, val any, newBranch bool) (err error)
- func (bL *Balance) String() string
- type BalanceWithWeight
- type BalancesWithWeight
- type BincMarshaler
- type CDR
- type CDRFilters
- type CDRSQLTable
- type CGRError
- type CGREvent
- func (cgrEv *CGREvent) AsDataProvider() (ev MapStorage)
- func (ev *CGREvent) CacheClone() any
- func (ev *CGREvent) CheckMandatoryFields(fldNames []string) error
- func (ev *CGREvent) Clone() (clned *CGREvent)
- func (ev *CGREvent) FieldAsDuration(fldName string) (d time.Duration, 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) OptAsInt64(optName string) (int64, error)
- func (attr *CGREvent) RPCClone() (any, error)
- func (attr *CGREvent) SetCloneable(rpcCloneable bool)
- type CGREventWithEeIDs
- type CGREventWithRateProfile
- type CachedRPCResponse
- type CgrIORecordWriter
- type ChargeEntry
- type ChargerProfile
- func (cp *ChargerProfile) CacheClone() any
- func (cp *ChargerProfile) Clone() *ChargerProfile
- func (cp *ChargerProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (cp *ChargerProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (cp *ChargerProfile) Merge(v2 any)
- func (cp *ChargerProfile) Set(path []string, val any, newBranch bool) (err error)
- func (cp *ChargerProfile) String() string
- func (cp *ChargerProfile) TenantID() string
- type ChargerProfileWithAPIOpts
- type CodecMsgpackMarshaler
- type Compiler
- type CostIncrement
- func (cI *CostIncrement) Clone() (cIcln *CostIncrement)
- func (cI *CostIncrement) Equals(ctIn *CostIncrement) (eq bool)
- func (cI *CostIncrement) FieldAsInterface(fldPath []string) (_ any, err error)
- func (cI *CostIncrement) FieldAsString(fldPath []string) (_ string, err error)
- func (cI *CostIncrement) String() string
- type Counter
- type DPRArgs
- 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 NewRandomConverter(params string) (dflr DataConverter, err error)
- func NewRoundConverter(params string) (hdlr DataConverter, err error)
- func NewStripConverter(params string) (DataConverter, error)
- func NewTimeStringConverter(params string) (hdlr DataConverter)
- type DataConverters
- type DataLeaf
- type DataNode
- func (n *DataNode) Append(path []string, val *DataLeaf) (idx int, err error)
- func (n *DataNode) Compose(path []string, val *DataLeaf) (err error)
- func (n *DataNode) Field(path []string) (*DataLeaf, error)
- func (n *DataNode) FieldAsInterface(path []string) (any, error)
- func (n DataNode) IsEmpty() bool
- func (n *DataNode) Remove(path []string) error
- func (n *DataNode) Set(path []string, val any) (addedNew bool, err error)
- type DataProvider
- type DataStorage
- type Decimal
- func DivideDecimal(x, y *Decimal) *Decimal
- func MultiplyDecimal(x, y *Decimal) *Decimal
- func NewDecimal(value int64, scale int) *Decimal
- func NewDecimalFromFloat64(f float64) *Decimal
- func NewDecimalFromString(value string) (*Decimal, error)
- func NewDecimalFromStringIgnoreError(v string) (d *Decimal)
- func NewDecimalFromUsage(u string) (d *Decimal, err error)
- func NewDecimalFromUsageIgnoreErr(u string) (d *Decimal)
- func SubstractDecimal(x, y *Decimal) *Decimal
- func SumDecimal(x, y *Decimal) *Decimal
- func (d *Decimal) Clone() *Decimal
- func (d *Decimal) Compare(d2 *Decimal) int
- func (d *Decimal) Duration() (dur time.Duration, ok bool)
- func (d *Decimal) MarshalBinary() ([]byte, error)
- func (d *Decimal) MarshalJSON() ([]byte, error)
- func (d *Decimal) Round(rndDec int) *Decimal
- func (d *Decimal) UnmarshalBinary(data []byte) (err error)
- func (d *Decimal) UnmarshalJSON(data []byte) (err error)
- type DirectoryArgs
- type DivideConverter
- type DurationArgs
- type DurationConverter
- type DurationNanosecondsConverter
- type DurationSecondsConverter
- type DynamicBlocker
- type DynamicBlockers
- type DynamicWeight
- type DynamicWeights
- type EventCharges
- func (ec *EventCharges) Clone() *EventCharges
- func (eC *EventCharges) Equals(evCh *EventCharges) (eq bool)
- func (ec *EventCharges) FieldAsInterface(fldPath []string) (any, error)
- func (ec *EventCharges) FieldAsString(fldPath []string) (string, error)
- func (ec *EventCharges) Merge(eCs ...*EventCharges)
- func (ec *EventCharges) String() string
- func (ec *EventCharges) SyncIDs(eCs ...*EventCharges)
- type EventsWithOpts
- type ExportedTPStats
- type ExternalAttribute
- type FlagParams
- func (fWp FlagParams) Add(opts []string)
- func (fWp FlagParams) Clone() (cln FlagParams)
- func (fWp FlagParams) Has(opt string) (has bool)
- func (fWp FlagParams) ParamValue(opt string) (ps string)
- func (fWp FlagParams) ParamsSlice(opt string) (ps []string)
- func (fWp FlagParams) SliceFlags() (sls []string)
- type FlagsWithParams
- func (fWp FlagsWithParams) Clone() (cln FlagsWithParams)
- func (fWp FlagsWithParams) GetBool(key string) (b bool)
- func (fWp FlagsWithParams) Has(flag string) (has bool)
- func (fWp FlagsWithParams) ParamValue(subs string) (ps string)
- func (fWp FlagsWithParams) ParamsSlice(subs, opt string) (ps []string)
- func (fWp FlagsWithParams) SliceFlags() (sls []string)
- type Float64Converter
- type FullPath
- type GOBMarshaler
- type GetIndexesArg
- type GigawordsConverter
- type HierarchyPath
- type IP2HexConverter
- type IPAllocations
- type IPAllocationsWithAPIOpts
- type IPPool
- type IPProfile
- func (p *IPProfile) CacheClone() any
- func (p *IPProfile) Clone() *IPProfile
- func (p *IPProfile) FieldAsInterface(fldPath []string) (any, error)
- func (p *IPProfile) FieldAsString(fldPath []string) (string, error)
- func (p *IPProfile) Merge(other any)
- func (p *IPProfile) Set(path []string, val any, newBranch bool) error
- func (p *IPProfile) String() string
- func (p *IPProfile) TenantID() string
- type IPProfileWithAPIOpts
- type IPUsage
- type IntervalRate
- func (iR *IntervalRate) Clone() *IntervalRate
- func (iR *IntervalRate) Equals(inRt *IntervalRate) (eq bool)
- func (iR *IntervalRate) FieldAsInterface(fldPath []string) (_ any, err error)
- func (iR *IntervalRate) FieldAsString(fldPath []string) (_ string, err error)
- func (ivalRate *IntervalRate) Merge(v2 *IntervalRate)
- func (iR *IntervalRate) String() string
- type JSONB
- type JSONBufMarshaler
- type JSONConverter
- type JSONMarshaler
- type LengthConverter
- type LoadIDsWithAPIOpts
- type LoadInstance
- type LoggerInterface
- type MapStorage
- func (ms MapStorage) Clone() (msClone MapStorage)
- func (ms MapStorage) FieldAsInterface(fldPath []string) (val any, err error)
- func (ms MapStorage) FieldAsString(fldPath []string) (str string, err error)
- func (ms MapStorage) GetKeys(nested bool, nestedLimit int, prefix string) (keys []string)
- func (ms MapStorage) Remove(fldPath []string) (err error)
- func (ms MapStorage) Set(fldPath []string, val any) (err error)
- func (ms MapStorage) String() string
- type Marshaler
- type MetricWithFilters
- type MetricWithTrend
- type MonthDays
- type Months
- type MultiplyConverter
- type NMType
- type NavigableMapper
- type NetAddr
- type NopCloser
- type NopFlushWriter
- type ObjectDP
- type OrderedMap
- func (om *OrderedMap[K, V]) Delete(key K)
- func (om *OrderedMap[K, V]) Get(key K) (V, bool)
- func (om *OrderedMap[K, V]) GetByIndex(index int) (K, V, bool)
- func (om *OrderedMap[K, V]) Keys() []K
- func (om *OrderedMap[K, V]) Map() map[K]V
- func (om *OrderedMap[K, V]) Set(key K, value V)
- func (om *OrderedMap[K, V]) Values() []V
- type OrderedNavigableMap
- func (onm *OrderedNavigableMap) Append(fullPath *FullPath, val *DataLeaf) (err error)
- func (onm *OrderedNavigableMap) Compose(fullPath *FullPath, val *DataLeaf) (err error)
- func (onm *OrderedNavigableMap) Empty() bool
- func (onm *OrderedNavigableMap) Field(fldPath []string) (val *DataLeaf, err error)
- func (onm *OrderedNavigableMap) FieldAsInterface(fldPath []string) (iface any, err error)
- func (onm *OrderedNavigableMap) FieldAsString(fldPath []string) (str string, err error)
- func (onm *OrderedNavigableMap) GetFirstElement() *PathItemElement
- func (onm *OrderedNavigableMap) GetOrder() (order [][]string)
- func (onm *OrderedNavigableMap) Interface() any
- func (onm *OrderedNavigableMap) OrderedFields() (flds []any)
- func (onm *OrderedNavigableMap) OrderedFieldsAsStrings() (flds []string)
- func (onm *OrderedNavigableMap) Remove(fullPath *FullPath) (err error)
- func (onm *OrderedNavigableMap) RemoveAll()
- func (onm *OrderedNavigableMap) Set(fullPath *FullPath, val any) (err error)
- func (onm *OrderedNavigableMap) SetAsSlice(fullPath *FullPath, vals []*DataNode) (err error)
- func (onm *OrderedNavigableMap) String() string
- type PASSporTDestinationsIdentity
- type PASSporTHeader
- type PASSporTOriginsIdentity
- type PASSporTPayload
- type Paginator
- type PaginatorWithSearch
- type PanicMessageArgs
- type PathItemElement
- type PathItemList
- func (l *PathItemList) Back() *PathItemElement
- func (l *PathItemList) Front() *PathItemElement
- func (l *PathItemList) Init() *PathItemList
- func (l *PathItemList) InsertAfter(v []string, mark *PathItemElement) *PathItemElement
- func (l *PathItemList) InsertBefore(v []string, mark *PathItemElement) *PathItemElement
- func (l *PathItemList) Len() int
- func (l *PathItemList) MoveAfter(e, mark *PathItemElement)
- func (l *PathItemList) MoveBefore(e, mark *PathItemElement)
- func (l *PathItemList) MoveToBack(e *PathItemElement)
- func (l *PathItemList) MoveToFront(e *PathItemElement)
- func (l *PathItemList) PushBack(v []string) *PathItemElement
- func (l *PathItemList) PushBackList(other *PathItemList)
- func (l *PathItemList) PushFront(v []string) *PathItemElement
- func (l *PathItemList) PushFrontList(other *PathItemList)
- func (l *PathItemList) Remove(e *PathItemElement) []string
- type PhoneNumberConverter
- type RPCCDRsFilter
- type RPCCDRsFilterWithAPIOpts
- type RSRFilter
- type RSRFilters
- type RSRParser
- func (prsr *RSRParser) AttrName() string
- func (prsr RSRParser) Clone() (cln *RSRParser)
- func (prsr *RSRParser) Compile() (err error)
- func (prsr *RSRParser) CompileDynRule(dP DataProvider) (p string, err error)
- func (prsr *RSRParser) ParseDataProvider(dP DataProvider) (out string, err error)
- func (prsr *RSRParser) ParseDataProviderWithInterfaces(dP DataProvider) (out string, err error)
- func (prsr *RSRParser) ParseDataProviderWithInterfaces2(dP DataProvider) (out any, err error)
- func (prsr *RSRParser) ParseValue(value any) (out string, err error)
- type RSRParsers
- func (prsrs RSRParsers) AsStringSlice() (v []string)
- func (prsrs RSRParsers) Clone() (cln RSRParsers)
- func (prsrs RSRParsers) Compile() (err error)
- func (prsrs RSRParsers) GetIfaceFromValues(evNm DataProvider) (iFaceVals []any, err error)
- func (prsrs RSRParsers) GetRule() (out string)
- func (prsrs RSRParsers) ParseDataProvider(dP DataProvider) (out string, err error)
- func (prsrs RSRParsers) ParseDataProviderWithInterfaces(dP DataProvider) (out string, err error)
- func (prsrs RSRParsers) ParseDataProviderWithInterfaces2(dP DataProvider) (out any, err error)
- func (prsrs RSRParsers) ParseValue(value any) (out string, err error)
- type RWDataProvider
- type RandomConverter
- type Ranking
- func (r *Ranking) AsRankingSummary() (rkSm *RankingSummary)
- func (r *Ranking) CacheClone() any
- func (r *Ranking) Clone() *Ranking
- func (r *Ranking) Config() *RankingProfile
- func (r *Ranking) Lock()
- func (r *Ranking) MetricIDs() StringSet
- func (r *Ranking) RLock()
- func (r *Ranking) RUnlock()
- func (r *Ranking) SetConfig(rp *RankingProfile)
- func (r *Ranking) TenantID() string
- func (r *Ranking) Unlock()
- type RankingProfile
- func (rkP *RankingProfile) CacheClone() any
- func (rkP *RankingProfile) Clone() (cln *RankingProfile)
- func (rp *RankingProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (rp *RankingProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (rp *RankingProfile) Merge(v2 any)
- func (rp *RankingProfile) Set(path []string, val any, _ bool) (err error)
- func (rp *RankingProfile) String() string
- func (sgp *RankingProfile) TenantID() string
- type RankingProfileWithAPIOpts
- type RankingSummary
- type RankingWithAPIOpts
- type Rate
- func (rt *Rate) Clone() *Rate
- func (rt *Rate) Compile() (err error)
- func (rt *Rate) FieldAsInterface(fldPath []string) (_ any, err error)
- func (rt *Rate) FieldAsString(fldPath []string) (_ string, err error)
- func (rt *Rate) Merge(vi *Rate)
- func (rt *Rate) RunTimes(sTime, eTime time.Time, verbosity int) (aTimes [][]time.Time, err error)
- func (rt *Rate) Set(path []string, val any, newBranch bool) (err error)
- func (rt *Rate) String() string
- func (rt *Rate) UID() string
- type RateProfile
- func (rp *RateProfile) AsDataDBMap(ms Marshaler) (mp map[string]any, err error)
- func (rp *RateProfile) CacheClone() any
- func (rp *RateProfile) Clone() *RateProfile
- func (rp *RateProfile) Compile() (err error)
- func (rp *RateProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (rp *RateProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (rp *RateProfile) Merge(v2 any)
- func (rp *RateProfile) Set(path []string, val any, newBranch bool) (err error)
- func (rpp *RateProfile) Sort()
- func (rp *RateProfile) String() string
- func (rp *RateProfile) TenantID() string
- type RateProfileCost
- type RateProfileWithAPIOpts
- type RateSIncrement
- func (rI *RateSIncrement) AsRateSIncrementCost() (rIc *RateSIncrementCost)
- func (rI *RateSIncrement) Clone() *RateSIncrement
- func (rIcr *RateSIncrement) CompressEquals(rIcr2 *RateSIncrement) (eq bool)
- func (rIcr *RateSIncrement) Cost(rts map[string]*IntervalRate) (cost *decimal.Big)
- func (rI *RateSIncrement) Equals(rtIn *RateSIncrement, rIRef, rtInRef map[string]*IntervalRate) (eq bool)
- func (rI *RateSIncrement) FieldAsInterface(fldPath []string) (_ any, err error)
- type RateSIncrementCost
- type RateSInterval
- func (rI *RateSInterval) AsRatesIntervalsCost() (rIc *RateSIntervalCost)
- func (rI *RateSInterval) Clone() *RateSInterval
- func (rIv *RateSInterval) CompressEquals(rIv2 *RateSInterval) (eq bool)
- func (rIv *RateSInterval) Cost(rts map[string]*IntervalRate) (cost *decimal.Big)
- func (rIl *RateSInterval) Equals(nRil *RateSInterval, rIlRef, nRilRef map[string]*IntervalRate) (eq bool)
- func (rI *RateSInterval) FieldAsInterface(fldPath []string) (any, error)
- type RateSIntervalCost
- type ReSearchReplace
- type RemoveRPrfRates
- type Resource
- type ResourceProfile
- func (rp *ResourceProfile) CacheClone() any
- func (rp *ResourceProfile) Clone() *ResourceProfile
- func (rp *ResourceProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (rp *ResourceProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (rp *ResourceProfile) Merge(v2 any)
- func (rp *ResourceProfile) Set(path []string, val any, _ bool) (err error)
- func (rp *ResourceProfile) String() string
- func (rp *ResourceProfile) TenantID() string
- type ResourceProfileWithAPIOpts
- type ResourceUsage
- type ResourceWithAPIOpts
- type ResourceWithConfig
- type RoundConverter
- type Route
- type RouteProfile
- func (rp *RouteProfile) CacheClone() any
- func (rp *RouteProfile) Clone() *RouteProfile
- func (rp *RouteProfile) Compile() error
- func (rp *RouteProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (rp *RouteProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (rp *RouteProfile) Merge(v2 any)
- func (rp *RouteProfile) Set(path []string, val any, newBranch bool) (err error)
- func (rp *RouteProfile) String() string
- func (rp *RouteProfile) TenantID() string
- type RouteProfileWithAPIOpts
- type SIPURIHostConverter
- type SIPURIMethodConverter
- type SIPURIUserConverter
- type SafeMapStorage
- func (ms *SafeMapStorage) Clone() (msClone *SafeMapStorage)
- func (ms *SafeMapStorage) ClonedMapStorage() (msClone MapStorage)
- func (ms *SafeMapStorage) FieldAsInterface(fldPath []string) (val any, err error)
- func (ms *SafeMapStorage) FieldAsString(fldPath []string) (str string, err error)
- func (ms *SafeMapStorage) GetKeys(nested bool, nestedLimit int, prefix string) (keys []string)
- func (ms *SafeMapStorage) Remove(fldPath []string) (err error)
- func (ms *SafeMapStorage) Set(fldPath []string, val any) (err error)
- func (ms *SafeMapStorage) String() string
- type ScheduledRanking
- type ScheduledTrend
- type Server
- type SessionFilter
- type SessionIDsWithAPIOpts
- type SetIndexesArg
- type SliceConverter
- 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) GetLogLevel() int
- 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) Warning(m string) (err error)
- func (sl *StdLogger) Write(p []byte) (n int, err error)
- type String2HexConverter
- type StringSet
- func (s StringSet) Add(val string)
- func (s StringSet) AddSlice(dataSlice []string)
- func (s StringSet) AsOrderedSlice() (ss []string)
- func (s StringSet) AsSlice() []string
- func (s StringSet) Clone() (cln StringSet)
- func (s StringSet) Equals(s2 StringSet) bool
- func (s StringSet) FieldAsInterface(fldPath []string) (any, error)
- func (s StringSet) FieldAsString(fldPath []string) (_ string, err error)
- func (s StringSet) GetOne() string
- func (s StringSet) Has(val string) bool
- func (s StringSet) Intersect(s2 StringSet)
- func (s StringSet) Remove(val string)
- func (s StringSet) Sha1() string
- func (s StringSet) Size() int
- func (s StringSet) String() string
- type StringWithAPIOpts
- type StripConverter
- type SyncedChan
- type SysLogger
- func (sl *SysLogger) Alert(m string) (_ error)
- func (sl *SysLogger) Close() (err error)
- func (sl *SysLogger) Crit(m string) (_ error)
- func (sl *SysLogger) Debug(m string) (_ error)
- func (sl *SysLogger) Emerg(m string) (_ error)
- func (sl *SysLogger) Err(m string) (_ error)
- func (sl *SysLogger) GetLogLevel() int
- func (sl *SysLogger) GetSyslog() *syslog.Writer
- func (sl *SysLogger) Info(m string) (_ error)
- func (sl *SysLogger) Notice(m string) (_ error)
- func (sl *SysLogger) SetLogLevel(level int)
- func (sl *SysLogger) Warning(m string) (_ error)
- func (sl *SysLogger) Write(p []byte) (n int, err error)
- type TPAPAction
- type TPAPDiktat
- type TPAccount
- type TPAccountBalance
- type TPActionProfile
- type TPActionTarget
- type TPActivationInterval
- type TPAttribute
- type TPAttributeProfile
- type TPBalanceCostIncrement
- type TPBalanceUnitFactor
- type TPChargerProfile
- type TPFilter
- type TPFilterProfile
- type TPIntervalRate
- type TPRankingProfile
- type TPRate
- type TPRateProfile
- type TPResourceProfile
- type TPRoute
- type TPRouteProfile
- type TPStatProfile
- type TPThresholdProfile
- type TPTntID
- type TPTrendsProfile
- type TenantID
- type TenantIDWithAPIOpts
- type TenantWithAPIOpts
- type TimeStringConverter
- type Trend
- func (t *Trend) AsTrendSummary() (ts *TrendSummary)
- func (t *Trend) CacheClone() any
- func (t *Trend) Clone() *Trend
- func (t *Trend) Compile(cleanTtl time.Duration, qLength int)
- func (t *Trend) Compress(ms Marshaler, limit int) (tr *Trend, err error)
- func (t *Trend) Config() *TrendProfile
- func (t *Trend) GetTrendGrowth(mID string, mVal float64, correlation string, roundDec int) (tG float64, err error)
- func (t *Trend) IndexesAppendMetric(mWt *MetricWithTrend, rTime time.Time)
- func (t *Trend) Lock()
- func (t *Trend) RLock()
- func (t *Trend) RUnlock()
- func (t *Trend) SetConfig(tp *TrendProfile)
- func (t *Trend) TenantID() string
- func (t *Trend) Uncompress(ms Marshaler) (err error)
- func (t *Trend) Unlock()
- type TrendProfile
- func (tP *TrendProfile) CacheClone() any
- func (tp *TrendProfile) Clone() (clnTp *TrendProfile)
- func (tp *TrendProfile) FieldAsInterface(fldPath []string) (_ any, err error)
- func (tp *TrendProfile) FieldAsString(fldPath []string) (_ string, err error)
- func (tp *TrendProfile) Merge(v2 any)
- func (tp *TrendProfile) Set(path []string, val any, _ bool) (err error)
- func (tp *TrendProfile) String() string
- func (tp *TrendProfile) TenantID() string
- type TrendProfileWithAPIOpts
- type TrendSummary
- type TrendWithAPIOpts
- type UnitFactor
- type UnixTimeConverter
- type WeekDays
- type XMLElement
- type Years
Constants ¶
const ( CGRateS = "CGRateS" CGRateSorg = "cgrates.org" Version = "v1.0~dev" DiameterFirmwareRevision = 918 CGRateSLwr = "cgrates" Postgres = "postgres" MySQL = "mysql" DataManager = "DataManager" Localhost = "127.0.0.1" Prepaid = "prepaid" MetaPrepaid = "*prepaid" Postpaid = "postpaid" MetaPostpaid = "*postpaid" PseudoPrepaid = "pseudoprepaid" MetaPseudoPrepaid = "*pseudoprepaid" MetaRated = "*rated" MetaNone = "*none" MetaNow = "*now" MetaRoundingUp = "*up" MetaRoundingMiddle = "*middle" MetaRoundingDown = "*down" MetaAny = "*any" MetaAll = "*all" MetaSingle = "*single" MetaZero = "*zero" MetaASAP = "*asap" MetaNil = "*nil" MetaSpace = "*space" MetaChar = "*char" CommentChar = '#' CSVSep = ',' FallbackSep = ';' InfieldSep = ";" RSRSep = ";" MetaPipe = "*|" FieldsSep = "," InInFieldSep = ":" StaticHDRValSep = "::" FilterValStart = "(" FilterValEnd = ")" PlusChar = "+" DecNaN = `"NaN"` JSON = "json" JSONCaps = "JSON" GOBCaps = "GOB" MsgPack = "msgpack" CSVLoad = "CSVLOAD" MetaCDRID = "*cdrID" MetaOriginID = "*originID" ToR = "ToR" OrderID = "OrderID" OriginID = "OriginID" InitialOriginID = "InitialOriginID" OriginIDPrefix = "OriginIDPrefix" Source = "Source" OriginHost = "OriginHost" RequestType = "RequestType" Direction = "Direction" Tenant = "Tenant" Category = "Category" AccountField = "Account" BalancesFld = "Balances" Subject = "Subject" Destination = "Destination" SetupTime = "SetupTime" AnswerTime = "AnswerTime" Usage = "Usage" DurationIndex = "DurationIndex" MaxRateUnit = "MaxRateUnit" DebitInterval = "DebitInterval" TimeStart = "TimeStart" TimeEnd = "TimeEnd" CallDuration = "CallDuration" FallbackSubject = "FallbackSubject" DryRun = "DryRun" CustomValue = "CustomValue" Value = "Value" Rules = "Rules" Metrics = "Metrics" MetricID = "MetricID" LastUsed = "LastUsed" PDD = "PDD" RouteStr = "Route" RunID = "RunID" MetaRunID = "*runID" AttributeIDs = "AttributeIDs" MetaOptsRunID = "*opts.*runID" MetaReqRunID = "*req.RunID" Cost = "Cost" CostDetails = "CostDetails" Rated = "rated" Partial = "Partial" PreRated = "PreRated" StaticValuePrefix = "^" CSV = "csv" FWV = "fwv" MetaMongo = "*mongo" MetaRedis = "*redis" MetaPostgres = "*postgres" MetaInternal = "*internal" MetaLocalHost = "*localhost" MetaBiJSONLocalHost = "*bijson_localhost" MetaRatingSubjectPrefix = "*zero" OK = "OK" MetaFileXML = "*fileXML" MetaFileJSON = "*fileJSON" MaskChar = "*" ConcatenatedKeySep = ":" UnitTest = "UNIT_TEST" HDRValSep = "/" MetaMonetary = "*monetary" MetaSMS = "*sms" MetaMMS = "*mms" MetaGeneric = "*generic" MetaData = "*data" MetaMaxCostFree = "*free" MetaMaxCostDisconnect = "*disconnect" MetaOut = "*out" MetaPause = "*pause" MetaVoice = "*voice" ACD = "ACD" ConfigPrefix = "cfg_" ResourcesPrefix = "res_" ResourceProfilesPrefix = "rsp_" IPAllocationsPrefix = "ips_" IPProfilesPrefix = "ipa_" ThresholdPrefix = "thd_" FilterPrefix = "ftr_" CDRsStatsPrefix = "cst_" VersionPrefix = "ver_" StatQueueProfilePrefix = "sqp_" RouteProfilePrefix = "rpp_" AttributeProfilePrefix = "alp_" ChargerProfilePrefix = "cpp_" RateProfilePrefix = "rtp_" ActionProfilePrefix = "acp_" AccountPrefix = "acn_" ThresholdProfilePrefix = "thp_" StatQueuePrefix = "stq_" RankingProfilePrefix = "rgp_" TrendProfilePrefix = "trp_" TrendPrefix = "trd_" LoadIDPrefix = "lid_" LoadInstKey = "load_history" CreateCDRsTablesSQL = "create_cdrs_tables.sql" CreateTariffPlanTablesSQL = "create_tariffplan_tables.sql" TestSQL = "TEST_SQL" MetaAsc = "*asc" MetaDesc = "*desc" MetaConstant = "*constant" MetaPositive = "*positive" MetaNegative = "*negative" MetaLast = "*last" MetaPassword = "*password" MetaFiller = "*filler" MetaHTTPPost = "*httpPost" JanusAdminSubProto = "janus-admin-protocol" MetaHTTPjsonCDR = "*http_json_cdr" MetaHTTPjsonMap = "*httpJSONMap" MetaAMQPjsonCDR = "*amqp_json_cdr" MetaAMQPjsonMap = "*amqpJSONMap" MetaAMQPV1jsonMap = "*amqpv1JSONMap" MetaSQSjsonMap = "*sqsJSONMap" MetaKafkajsonMap = "*kafkaJSONMap" MetaNATSJSONMap = "*natsJSONMap" MetaSQL = "*sql" MetaMySQL = "*mysql" MetaS3jsonMap = "*s3JSONMap" ConfigPath = "/etc/cgrates/" DisconnectCause = "DisconnectCause" MetaRating = "*rating" MetaAccounting = "*accounting" NotAvailable = "N/A" Call = "call" ExtraFields = "ExtraFields" MetaSureTax = "*sure_tax" MetaDynamic = "*dynamic" MetaCounterEvent = "*event" MetaBalance = "*balance" MetaAccount = "*account" EventName = "EventName" // action trigger threshold types TriggerMaxEventCounter = "*max_event_counter" TriggerMaxBalance = "*max_balance" HierarchySep = ">" MetaComposed = "*composed" MetaUsageDifference = "*usageDifference" MetaDifference = "*difference" MetaVariable = "*variable" MetaCCUsage = "*ccUsage" MetaSIPCID = "*sipcid" MetaValueExponent = "*valueExponent" //rsrparser consts NegativePrefix = "!" MatchStartPrefix = "^" MatchGreaterThanOrEqual = ">=" MatchLessThanOrEqual = "<=" MatchGreaterThan = ">" MatchLessThan = "<" MatchEndPrefix = "$" // MetaRaw = "*raw" CreatedAt = "CreatedAt" UpdatedAt = "UpdatedAt" //ExportLogger Message = "Message" Severity = "Severity" Timestamp = "Timestamp" XML = "xml" MetaGOB = "*gob" MetaJSON = "*json" MetaDateTime = "*datetime" MetaMaskedDestination = "*masked_destination" MetaUnixTimestamp = "*unixTimestamp" MetaPostCDR = "*post_cdr" MetaDumpToFile = "*dump_to_file" MetaDumpToJSON = "*dump_to_json" NonTransactional = "" DataDB = "data_db" StorDB = "stor_db" NotFoundCaps = "NOT_FOUND" ServerErrorCaps = "SERVER_ERROR" MandatoryIEMissingCaps = "MANDATORY_IE_MISSING" UnsupportedCachePrefix = "unsupported cache prefix" UnsupportedServiceIDCaps = "UNSUPPORTED_SERVICE_ID" ServiceManager = "ServiceManager" ServiceAlreadyRunning = "service already running" RunningCaps = "RUNNING" StoppedCaps = "STOPPED" MetaAdminS = "*admins" MetaReplicator = "*replicator" MetaRerate = "*rerate" MetaRefund = "*refund" MetaStats = "*stats" MetaTrends = "*trends" MetaRankings = "*rankings" MetaCore = "*core" MetaServiceManager = "*servicemanager" MetaChargers = "*chargers" MetaConfig = "*config" MetaTpes = "*tpes" MetaFilters = "*filters" MetaCDRs = "*cdrs" MetaDC = "*dc" MetaCaches = "*caches" MetaUCH = "*uch" MetaGuardian = "*guardians" MetaEEs = "*ees" MetaEFs = "*efs" MetaERs = "*ers" MetaRates = "*rates" MetaRateSOverwrite = "*rateSOverwrite" MetaContinue = "*continue" MetaUp = "*up" Migrator = "migrator" UnsupportedMigrationTask = "unsupported migration task" UndefinedVersion = "undefined version" JSONSuffix = ".json" GOBSuffix = ".gob" XMLSuffix = ".xml" CSVSuffix = ".csv" FWVSuffix = ".fwv" ContentJSON = "json" ContentForm = "form" FileLockPrefix = "file_" ActionsPoster = "act" MetaFileCSV = "*fileCSV" MetaVirt = "*virt" MetaElastic = "*els" MetaFileFWV = "*fileFWV" MetaFile = "*file" AccountsStr = "Accounts" AccountS = "AccountS" Actions = "Actions" BalanceMap = "BalanceMap" UnitCounters = "UnitCounters" UpdateTime = "UpdateTime" Rates = "Rates" RateField = "Rate" Format = "Format" Conn = "Conn" Level = "Level" FailedPostsDir = "FailedPostsDir" //DestinationRates = "DestinationRates" RatingPlans = "RatingPlans" RatingProfiles = "RatingProfiles" AccountActions = "AccountActions" ResourcesStr = "Resources" Stats = "Stats" Rankings = "Rankings" Trends = "Trends" Filters = "Filters" RateProfiles = "RateProfiles" ActionProfiles = "ActionProfiles" AccountsString = "Accounts" MetaEveryMinute = "*every_minute" MetaHourly = "*hourly" ID = "ID" Address = "Address" Addresses = "Addresses" Transport = "Transport" ClientKey = "ClientKey" ClientCertificate = "ClientCertificate" CaCertificate = "CaCertificate" ConnectAttempts = "ConnectAttempts" Reconnects = "Reconnects" MaxReconnectInterval = "MaxReconnectInterval" ConnectTimeout = "ConnectTimeout" ReplyTimeout = "ReplyTimeout" TLS = "TLS" Strategy = "Strategy" StrategyParameters = "StrategyParameters" ConnID = "ConnID" ConnFilterIDs = "ConnFilterIDs" ConnWeight = "ConnWeight" ConnBlocker = "ConnBlocker" ConnParameters = "ConnParameters" Thresholds = "Thresholds" Routes = "Routes" Attributes = "Attributes" Chargers = "Chargers" StatS = "StatS" LoadIDsVrs = "LoadIDs" GlobalVarS = "GlobalVarS" CostSource = "CostSource" ExtraInfo = "ExtraInfo" Meta = "*" MetaSysLog = "*syslog" MetaStdLog = "*stdout" MetaKafkaLog = "*kafkaLog" Kafka = "Kafka" EventSource = "EventSource" AccountID = "AccountID" AccountIDs = "AccountIDs" ResourceID = "ResourceID" TotalUsage = "TotalUsage" StatID = "StatID" BalanceType = "BalanceType" BalanceID = "BalanceID" //BalanceDestinationIds = "BalanceDestinationIds" BalanceCostIncrements = "BalanceCostIncrements" BalanceAttributeIDs = "BalanceAttributeIDs" BalanceRateProfileIDs = "BalanceRateProfileIDs" BalanceWeights = "BalanceWeights" BalanceRatingSubject = "BalanceRatingSubject" BalanceCategories = "BalanceCategories" BalanceBlockers = "BalanceBlockers" BalanceDisabled = "BalanceDisabled" Units = "Units" AccountUpdate = "AccountUpdate" BalanceUpdate = "BalanceUpdate" StatUpdate = "StatUpdate" TrendUpdate = "TrendUpdate" RankingUpdate = "RankingUpdate" ResourceUpdate = "ResourceUpdate" CDRKey = "CDR" CDRs = "CDRs" ExpiryTime = "ExpiryTime" AllowNegative = "AllowNegative" Disabled = "Disabled" Action = "Action" SessionSCosts = "SessionSCosts" RQF = "RQF" ResourceStr = "Resource" User = "User" Subscribers = "Subscribers" //Destinations = "Destinations" MetaSubscribers = "*subscribers" MetaDataDB = "*datadb" MetaStorDB = "*stordb" MetaWeight = "*weight" MetaLC = "*lc" MetaHC = "*hc" MetaQOS = "*qos" MetaReas = "*reas" MetaReds = "*reds" Weight = "Weight" Limit = "Limit" UsageTTL = "UsageTTL" AllocationMessage = "AllocationMessage" AddressPool = "AddressPool" Pools = "Pools" Allocation = "Allocation" Range = "Range" Stored = "Stored" RatingSubject = "RatingSubject" Categories = "Categories" Blocker = "Blocker" Blockers = "Blockers" Params = "Params" StartTime = "StartTime" AccountSummary = "AccountSummary" RatingFilters = "RatingFilters" RatingFilter = "RatingFilter" Charging = "Charging" Accounting = "Accounting" Rating = "Rating" Charges = "Charges" CompressFactor = "CompressFactor" Increments = "Increments" BalanceField = "Balance" BalanceSummaries = "BalanceSummaries" Type = "Type" Element = "Element" Values = "Values" YearsFieldName = "Years" MonthsFieldName = "Months" MonthDaysFieldName = "MonthDays" WeekDaysFieldName = "WeekDays" GroupIntervalStart = "GroupIntervalStart" RateIncrement = "RateIncrement" RateUnit = "RateUnit" BalanceUUID = "BalanceUUID" ChargingID = "ChargingID" RatingID = "RatingID" JoinedChargeIDs = "JoinedChargeIDs" UnitFactorID = "UnitFactorID" ExtraChargeID = "ExtraChargeID" BalanceLimit = "BalanceLimit" ConnectFee = "ConnectFee" RoundingMethod = "RoundingMethod" RoundingDecimals = "RoundingDecimals" MaxCostStrategy = "MaxCostStrategy" RateID = "RateID" RateIDs = "RateIDs" RateFilterIDs = "RateFilterIDs" RateActivationStart = "RateActivationStart" RateWeights = "RateWeights" RateIntervalStart = "RateIntervalStart" RateFixedFee = "RateFixedFee" RateRecurrentFee = "RateRecurrentFee" RateBlocker = "RateBlocker" RatesID = "RatesID" RatingFiltersID = "RatingFiltersID" RateProfileID = "RateProfileID" AccountingID = "AccountingID" MetaSessionS = "*sessions" MetaDefault = "*default" Error = "Error" MetaCgreq = "*cgreq" MetaCgrep = "*cgrep" CgrAcd = "cgr_acd" ActivationIntervalString = "ActivationInterval" MaxHits = "MaxHits" MinHits = "MinHits" Async = "Async" Sorting = "Sorting" SortingParameters = "SortingParameters" RouteAccountIDs = "RouteAccountIDs" RouteRateProfileIDs = "RouteRateProfileIDs" RouteStatIDs = "RouteStatIDs" StatIDs = "StatIDs" SortedStatIDs = "SortedStatIDs" LastUpdate = "LastUpdate" TrendID = "TrendID" RankingID = "RankingID" RouteWeights = "RouteWeights" RouteParameters = "RouteParameters" RouteBlockers = "RouteBlockers" RouteResourceIDs = "RouteResourceIDs" ResourceIDs = "ResourceIDs" RouteFilterIDs = "RouteFilterIDs" AttributeFilterIDs = "AttributeFilterIDs" AttributeBlockers = "AttributeBlockers" QueueLength = "QueueLength" QueryInterval = "QueryInterval" CorrelationType = "CorrelationType" Tolerance = "Tolerance" TTL = "TTL" PurgeFilterIDs = "PurgeFilterIDs" TrendStr = "Trend" MinItems = "MinItems" MetricIDs = "MetricIDs" MetricFilterIDs = "MetricFilterIDs" MetricBlockers = "MetricBlockers" FieldName = "FieldName" Path = "Path" Hosts = "Hosts" StrategyParams = "StrategyParams" MetaRound = "*round" Pong = "Pong" MetaEventCost = "*event_cost" MetaPositiveExports = "*positive_exports" MetaNegativeExports = "*negative_exports" MetaBuffer = "*buffer" MetaRoutesEventCost = "*routesEventCost" Freeswitch = "freeswitch" Kamailio = "kamailio" Opensips = "opensips" Asterisk = "asterisk" SchedulerS = "SchedulerS" MetaMultiply = "*multiply" MetaDivide = "*divide" MetaUrl = "*url" MetaZip = "*zip" MetaXml = "*xml" MetaReq = "*req" MetaVars = "*vars" MetaRep = "*rep" MetaExp = "*exp" MetaHdr = "*hdr" MetaTrl = "*trl" MetaTmp = "*tmp" MetaOpts = "*opts" MetaCfg = "*cfg" MetaDynReq = "~*req" CGROriginHost = "cgr_originhost" MetaInitiate = "*initiate" MetaUpdate = "*update" MetaTerminate = "*terminate" MetaEvent = "*event" MetaMessage = "*message" MetaDryRun = "*dryRun" Event = "Event" EmptyString = "" DynamicDataPrefix = "~" AttrValueSep = "=" ANDSep = "&" PipeSep = "|" RSRConstSep = "`" RSRConstChar = '`' RSRDataConverterPrefix = "{*" RSRDataConverterSufix = "}" RSRDynStartChar = '<' RSRDynEndChar = '>' 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 = "]" IdxCombination = "][" MetaMemory = "*memory" RemoteHost = "RemoteHost" Local = "local" TCP = "tcp" UDP = "udp" CGRDebitInterval = "CGRDebitInterval" VersionName = "Version" MetaTenant = "*tenant" ResourceUsageStr = "ResourceUsage" MetaDuration = "*duration" MetaLibPhoneNumber = "*libphonenumber" MetaTimeString = "*time_string" MetaIP2Hex = "*ip2hex" MetaString2Hex = "*string2hex" MetaUnixTime = "*unixtime" MetaLen = "*len" MetaSlice = "*slice" MetaSIPURIMethod = "*sipuri_method" MetaSIPURIHost = "*sipuri_host" MetaSIPURIUser = "*sipuri_user" E164DomainConverter = "*e164Domain" E164Converter = "*e164" MetaJoin = "*join" MetaSplit = "*split" MetaStrip = "*strip" MetaReload = "*reload" MetaLoad = "*load" MetaFloat64 = "*float64" MetaRemove = "*remove" MetaRemoveAll = "*removeall" MetaStore = "*store" MetaParse = "*parse" MetaClear = "*clear" MetaExport = "*export" MetaGigawords = "*gigawords" MetaExportID = "*export_id" LoadIDs = "load_ids" DNSAgent = "DNSAgent" TLSNoCaps = "tls" UsageID = "UsageID" AllocationID = "AllocationID" Replacement = "Replacement" Regexp = "Regexp" Order = "Order" Preference = "Preference" Flags = "Flags" Service = "Service" MetaAnalyzerS = "*analyzers" CGREventString = "CGREvent" MetaTextPlain = "*text_plain" MetaRelease = "*release" MetaAllocate = "*allocate" MetaAuthorize = "*authorize" MetaSTIRAuthenticate = "*stir_authenticate" MetaSTIRInitiate = "*stir_initiate" MetaInit = "*init" ERs = "ERs" EEs = "EEs" EFs = "EFs" Ratio = "Ratio" Load = "Load" Slash = "/" UUID = "UUID" ActionsID = "ActionsID" MetaAct = "*act" ExportTemplate = "ExportTemplate" Synchronous = "Synchronous" Attempts = "Attempts" FieldSeparator = "FieldSeparator" ExportPath = "ExportPath" ExporterIDs = "ExporterIDs" TimeNow = "TimeNow" 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" MetaCost = "*cost" MetaRateSCost = "*rateSCost" MetaAccountSCost = "*accountSCost" MetaGroup = "*group" InternalRPCSet = "InternalRPCSet" MetaFileName = "*fileName" MetaFileLineNumber = "*fileLineNumber" MetaReaderID = "*readerID" MetaRadauth = "*radauth" UserPassword = "UserPassword" RadauthFailed = "RADAUTH_FAILED" MetaPAP = "*pap" MetaCHAP = "*chap" MetaMSCHAPV2 = "*mschapv2" MetaDynaprepaid = "*dynaprepaid" MetaFD = "*fd" SortingData = "SortingData" ProfileID = "ProfileID" SortedRoutes = "SortedRoutes" MetaMonthly = "*monthly" MetaYearly = "*yearly" MetaDaily = "*daily" MetaWeekly = "*weekly" RateS = "RateS" Underline = "_" MetaBusy = "*busy" MetaQueue = "*queue" MetaMonthEnd = "*month_end" APIKey = "ApiKey" RouteID = "RouteID" MetaMonthlyEstimated = "*monthly_estimated" MetaProcessedProfileIDs = "*processedProfileIDs" MetaAttrPrfTenantID = "*apTenantID" HashtagSep = "#" MetaRounding = "*rounding" StatsNA = -1.0 InvalidUsage = -1 Abstracts = "Abstracts" Concretes = "Concretes" ActionS = "ActionS" Schedule = "Schedule" ActionFilterIDs = "ActionFilterIDs" ActionTTL = "ActionTTL" ActionOpts = "ActionOpts" ActionPath = "ActionPath" TPid = "TPid" LoadId = "LoadId" ActionPlanId = "ActionPlanId" AccountActionsId = "AccountActionsId" Loadid = "loadid" ActionPlan = "ActionPlan" ActionsId = "ActionsId" Prefixes = "Prefixes" RateSlots = "RateSlots" RatingPlanBindings = "RatingPlanBindings" RatingPlanActivations = "RatingPlanActivations" Time = "Time" TargetIDs = "TargetIDs" TargetType = "TargetType" MetaRow = "*row" BalanceFilterIDs = "BalanceFilterIDs" BalanceOpts = "BalanceOpts" MetaConcrete = "*concrete" MetaAbstract = "*abstract" MetaMockAbstract = "*mockabstract" MetaBalanceLimit = "*balanceLimit" MetaBalanceUnlimited = "*balanceUnlimited" MetaTemplateID = "*templateID" MetaCdrLog = "*cdrLog" MetaCDR = "*cdr" MetaExporterIDs = "*exporterIDs" MetaExporterID = "*exporterID" MetaChargeID = "*chargeID" MetaAsync = "*async" MetaUsage = "*usage" MetaDestination = "*destination" MetaStartTime = "*startTime" Weights = "Weights" ActivationTimes = "ActivationTimes" IntervalRates = "IntervalRates" IntervalStart = "IntervalStart" Unit = "Unit" Targets = "Targets" Balances = "Balances" UnitFactorField = "UnitFactor" UnitFactors = "UnitFactors" JoinedCharge = "JoinedCharge" CostIncrements = "CostIncrements" Factor = "Factor" Increment = "Increment" FixedFee = "FixedFee" RecurrentFee = "RecurrentFee" IncrementStart = "IncrementStart" RateIntervalIndex = "RateIntervalIndex" Diktats = "Diktats" BalanceIDs = "BalanceIDs" MetaCostIncrement = "*costIncrement" Length = "Length" V1Prfx = "V1" Ping = "Ping" // dns DNSQueryType = "QueryType" DNSQueryName = "QueryName" DNSOption = "Option" DNSRcode = "Rcode" DNSId = "Id" DNSResponse = "Response" DNSOpcode = "Opcode" DNSAuthoritative = "Authoritative" DNSTruncated = "Truncated" DNSRecursionDesired = "RecursionDesired" DNSRecursionAvailable = "RecursionAvailable" DNSZero = "Zero" DNSAuthenticatedData = "AuthenticatedData" DNSCheckingDisabled = "CheckingDisabled" DNSQuestion = "Question" DNSAnswer = "Answer" DNSNs = "Ns" DNSExtra = "Extra" DNSName = "Name" DNSQtype = "Qtype" DNSQclass = "Qclass" DNSFamily = "Family" DNSSourceNetmask = "SourceNetmask" DNSSourceScope = "SourceScope" DNSLease = "Lease" DNSKeyLease = "KeyLease" DNSLeaseLife = "LeaseLife" DNSTimeout = "Timeout" DNSInfoCode = "InfoCode" DNSExtraText = "ExtraText" DNSNsid = "Nsid" DNSCookie = "Cookie" DNSDAU = "DAU" DNSDHU = "DHU" DNSN3U = "N3U" DNSExpire = "Expire" DNSPadding = "Padding" DNSUri = "Uri" DNSHdr = "Hdr" DNSA = "A" DNSTarget = "Target" DNSPriority = "Priority" DNSPort = "Port" DNSRrtype = "Rrtype" DNSClass = "Class" DNSTtl = "Ttl" DNSRdlength = "Rdlength" DNSData = "Data" MetaTntID = "*tntID" )
const ( // condensed result fields PID = "pid" NodeID = "node_id" GoVersion = "go_version" OSThreadsInUse = "os_threads_in_use" RunningSince = "running_since" OpenFiles = "open_files" ActiveMemory = "active_memory" SystemMemory = "system_memory" FieldVersion = "version" FieldMemStats = "mem_stats" FieldGCDurationStats = "gc_duration_stats" FieldProcStats = "proc_stats" FieldCapsStats = "caps_stats" MetricRuntimeGoroutines = "goroutines" MetricRuntimeThreads = "threads" MetricRuntimeMaxProcs = "maxprocs" MetricMemAlloc = "alloc" MetricMemTotalAlloc = "total_alloc" MetricMemSys = "sys" MetricMemMallocs = "mallocs" MetricMemFrees = "frees" MetricMemHeapAlloc = "heap_alloc" MetricMemHeapSys = "heap_sys" MetricMemHeapIdle = "heap_idle" MetricMemHeapInuse = "heap_inuse" MetricMemHeapReleased = "heap_released" MetricMemHeapObjects = "heap_objects" MetricMemStackInuse = "stack_inuse" MetricMemStackSys = "stack_sys" MetricMemMSpanSys = "mspan_sys" MetricMemMSpanInuse = "mspan_inuse" MetricMemMCacheInuse = "mcache_inuse" MetricMemMCacheSys = "mcache_sys" MetricMemBuckHashSys = "buckhash_sys" MetricMemGCSys = "gc_sys" MetricMemOtherSys = "other_sys" MetricMemNextGC = "next_gc" MetricMemLastGC = "last_gc" MetricMemLimit = "mem_limit" MetricProcCPUTime = "cpu_time" MetricProcMaxFDs = "max_fds" MetricProcOpenFDs = "open_fds" MetricProcResidentMemory = "resident_memory" MetricProcStartTime = "start_time" MetricProcVirtualMemory = "virtual_memory" MetricProcMaxVirtualMemory = "max_virtual_memory" MetricProcNetworkReceiveTotal = "network_receive_total" MetricProcNetworkTransmitTotal = "network_transmit_total" MetricGCQuantiles = "quantiles" MetricGCQuantile = "quantile" MetricGCValue = "value" MetricGCSum = "sum" MetricGCCount = "count" MetricGCPercent = "gc_percent" MetricCapsAllocated = "caps_allocated" MetricCapsPeak = "caps_peak" )
CoreS metric constants
const ( Move = "move" Migrate = "migrate" )
Migrator Action
const ( MetaAccounts = "*accounts" MetaActions = "*actions" MetaResourceProfiles = "*resource_profiles" MetaIPProfiles = "*ip_profiles" MetaStatQueueProfiles = "*statqueue_profiles" MetaStatQueues = "*statqueues" MetaRankingProfiles = "*ranking_profiles" MetaTrendProfiles = "*trend_profiles" MetaThresholdProfiles = "*threshold_profiles" MetaRouteProfiles = "*route_profiles" MetaAttributeProfiles = "*attribute_profiles" MetaRateProfiles = "*rate_profiles" MetaRateProfileRates = "*rate_profile_rates" MetaChargerProfiles = "*charger_profiles" MetaIPAllocations = "*ip_allocations" MetaThresholds = "*thresholds" MetaRoutes = "*routes" MetaAttributes = "*attributes" MetaActionProfiles = "*action_profiles" MetaLoadIDs = "*load_ids" MetaNodeID = "*node_id" )
Meta Items
const ( MetaASR = "*asr" MetaACD = "*acd" MetaTCD = "*tcd" MetaACC = "*acc" MetaTCC = "*tcc" MetaPDD = "*pdd" MetaDDC = "*ddc" MetaSum = "*sum" MetaAverage = "*average" MetaDistinct = "*distinct" MetaRAR = "*rar" )
MetaMetrics
const ( SessionS = "SessionS" AttributeS = "AttributeS" RouteS = "RouteS" ResourceS = "ResourceS" IPs = "IPs" StatService = "StatS" FilterS = "FilterS" ThresholdS = "ThresholdS" TrendS = "TrendS" RankingS = "RankingS" RegistrarC = "RegistrarC" LoaderS = "LoaderS" ChargerS = "ChargerS" TPeS = "TPeS" CacheS = "CacheS" AnalyzerS = "AnalyzerS" CDRServer = "CDRServer" GuardianS = "GuardianS" ServiceManagerS = "ServiceManager" CommonListenerS = "CommonListenerS" ConnManager = "ConnManager" LoggerS = "LoggerS" CapS = "CapS" )
Services
const ( SessionsLow = "sessions" AttributesLow = "attributes" ChargerSLow = "chargers" RoutesLow = "routes" ResourcesLow = "resources" StatServiceLow = "stats" ThresholdsLow = "thresholds" AnalyzerSLow = "analyzers" SchedulerSLow = "schedulers" LoaderSLow = "loaders" ReplicatorLow = "replicator" EEsLow = "ees" RateSLow = "rates" AccountSLow = "accounts" ActionSLow = "actions" )
Lower service names
const ( MetaLog = "*log" MetaTopUpReset = "*topup_reset" MetaTopUp = "*topup" MetaDebitReset = "*debit_reset" MetaDebit = "*debit" MetaEnableAccount = "*enable_account" MetaDisableAccount = "*disable_account" MetaUnlimited = "*unlimited" CDRLog = "*cdrlog" MetaCgrRpc = "*cgr_rpc" MetaRpc = "*rpc" MetaRemoveSessionCosts = "*remove_session_costs" MetaPostEvent = "*post_event" MetaCDRAccount = "*reset_account_cdr" MetaResetThreshold = "*reset_threshold" MetaResetStatQueue = "*reset_stat_queue" MetaRemoteSetAccount = "*remote_set_account" ActionID = "ActionID" ActionType = "ActionType" ActionValue = "ActionValue" BalanceValue = "BalanceValue" BalanceUnits = "BalanceUnits" BalanceUnitFactors = "BalanceUnitFactors" ExtraParameters = "ExtraParameters" MetaAddBalance = "*add_balance" MetaSetBalance = "*set_balance" MetaRemBalance = "*rem_balance" DynaprepaidActionplansCfg = "dynaprepaid_actionprofile" )
Actions
const ( MetaSetVersions = "*set_versions" MetaEnsureIndexes = "*ensure_indexes" MetaTpFilters = "*tp_filters" MetaTpThresholds = "*tp_thresholds" MetaTpRoutes = "*tp_Routes" MetaTpStats = "*tp_stats" MetaTpActionProfiles = "*tp_action_profiles" MetaTpRateProfiles = "*tp_rate_profiles" MetaTpResources = "*tp_resources" MetaTpChargers = "*tp_chargers" MetaDurationSeconds = "*duration_seconds" MetaDurationNanoseconds = "*duration_nanoseconds" CapAttributes = "Attributes" CapResourceAllocation = "ResourceAllocation" CapMaxUsage = "MaxUsage" CapRoutes = "Routes" CapRouteProfiles = "RouteProfiles" CapThresholds = "Thresholds" CapStatQueues = "StatQueues" )
Migrator Metas
const ( TpFilters = "TpFilters" TpThresholds = "TpThresholds" TpRoutes = "TpRoutes" TpAttributes = "TpAttributes" TpStats = "TpStats" TpResources = "TpResources" TpResource = "TpResource" TpChargers = "TpChargers" TpRateProfiles = "TpRateProfiles" TpActionProfiles = "TpActionProfiles" TpAccounts = "TpAccounts" )
const ( MetaFirst = "*first" MetaRandom = "*random" MetaRoundRobin = "*round_robin" MetaRatio = "*ratio" MetaDefaultRatio = "*default_ratio" ThresholdSv1 = "ThresholdSv1" TrendSv1 = "TrendSv1" RankingSv1 = "RankingSv1" StatSv1 = "StatSv1" ResourceSv1 = "ResourceSv1" IPsV1 = "IPsV1" RouteSv1 = "RouteSv1" AttributeSv1 = "AttributeSv1" SessionSv1 = "SessionSv1" ChargerSv1 = "ChargerSv1" MetaAuth = "*auth" APIMethods = "APIMethods" NestingSep = "." ArgDispatcherField = "ArgDispatcher" )
Dispatcher Const
const ( MetaNot = "*not" MetaString = "*string" MetaContains = "*contains" MetaPrefix = "*prefix" MetaSuffix = "*suffix" MetaBoth = "*both" MetaEmpty = "*empty" MetaExists = "*exists" MetaCronExp = "*cronexp" MetaRSR = "*rsr" MetaLessThan = "*lt" MetaLessOrEqual = "*lte" MetaGreaterThan = "*gt" MetaGreaterOrEqual = "*gte" MetaResources = "*resources" MetaIPs = "*ips" MetaEqual = "*eq" MetaIPNet = "*ipnet" MetaAPIBan = "*apiban" MetaSentryPeer = "*sentrypeer" MetaToken = "*token" MetaIP = "*ip" MetaNumber = "*number" MetaActivationInterval = "*ai" MetaRegex = "*regex" MetaNever = "*never" MetaNotString = "*notstring" MetaNotContains = "*notcontains" MetaNotPrefix = "*notprefix" MetaNotSuffix = "*notsuffix" MetaNotEmpty = "*notempty" MetaNotExists = "*notexists" MetaNotCronExp = "*notcronexp" MetaNotRSR = "*notrsr" MetaNotStatS = "*notstats" MetaNotResources = "*notresources" MetaNotEqual = "*noteq" MetaNotIPNet = "*notipnet" MetaNotAPIBan = "*notapiban" MetaNotSentryPeer = "*notsentrypeer" MetaNotActivationInterval = "*notai" MetaNotRegex = "*notregex" MetaHTTP = "*http" MetaEC = "*ec" )
Filter types
const ( ReplicatorS = "ReplicatorS" ReplicatorSv1 = "ReplicatorSv1" ReplicatorSv1Ping = "ReplicatorSv1.Ping" ReplicatorSv1GetStatQueue = "ReplicatorSv1.GetStatQueue" ReplicatorSv1GetFilter = "ReplicatorSv1.GetFilter" ReplicatorSv1GetThreshold = "ReplicatorSv1.GetThreshold" ReplicatorSv1GetThresholdProfile = "ReplicatorSv1.GetThresholdProfile" ReplicatorSv1GetStatQueueProfile = "ReplicatorSv1.GetStatQueueProfile" ReplicatorSv1GetRanking = "ReplicatorSv1.GetRanking" ReplicatorSv1GetRankingProfile = "ReplicatorSv1.GetRankingProfile" ReplicatorSv1GetTrendProfile = "ReplicatorSv1.GetTrendProfile" ReplicatorSv1GetTrend = "ReplicatorSv1.GetTrend" ReplicatorSv1GetResource = "ReplicatorSv1.GetResource" ReplicatorSv1GetResourceProfile = "ReplicatorSv1.GetResourceProfile" ReplicatorSv1GetIPAllocations = "ReplicatorSv1.GetIPAllocations" ReplicatorSv1GetIPProfile = "ReplicatorSv1.GetIPProfile" ReplicatorSv1GetRouteProfile = "ReplicatorSv1.GetRouteProfile" ReplicatorSv1GetAttributeProfile = "ReplicatorSv1.GetAttributeProfile" ReplicatorSv1GetChargerProfile = "ReplicatorSv1.GetChargerProfile" ReplicatorSv1GetDispatcherProfile = "ReplicatorSv1.GetDispatcherProfile" ReplicatorSv1GetRateProfile = "ReplicatorSv1.GetRateProfile" ReplicatorSv1GetActionProfile = "ReplicatorSv1.GetActionProfile" ReplicatorSv1GetDispatcherHost = "ReplicatorSv1.GetDispatcherHost" ReplicatorSv1GetAccount = "ReplicatorSv1.GetAccount" ReplicatorSv1GetItemLoadIDs = "ReplicatorSv1.GetItemLoadIDs" ReplicatorSv1SetThresholdProfile = "ReplicatorSv1.SetThresholdProfile" ReplicatorSv1SetThreshold = "ReplicatorSv1.SetThreshold" ReplicatorSv1SetStatQueue = "ReplicatorSv1.SetStatQueue" ReplicatorSv1SetFilter = "ReplicatorSv1.SetFilter" ReplicatorSv1SetStatQueueProfile = "ReplicatorSv1.SetStatQueueProfile" ReplicatorSv1SetRankingProfile = "ReplicatorSv1.SetRankingProfile" ReplicatorSv1SetRanking = "ReplicatorSv1.SetRanking" ReplicatorSv1SetTrendProfile = "ReplicatorSv1.SetTrendProfile" ReplicatorSv1SetTrend ReplicatorSv1SetResource = "ReplicatorSv1.SetResource" ReplicatorSv1SetResourceProfile = "ReplicatorSv1.SetResourceProfile" ReplicatorSv1SetIPAllocations = "ReplicatorSv1.SetIPAllocations" ReplicatorSv1SetIPProfile = "ReplicatorSv1.SetIPProfile" ReplicatorSv1SetRouteProfile = "ReplicatorSv1.SetRouteProfile" ReplicatorSv1SetAttributeProfile = "ReplicatorSv1.SetAttributeProfile" ReplicatorSv1SetChargerProfile = "ReplicatorSv1.SetChargerProfile" ReplicatorSv1SetRateProfile = "ReplicatorSv1.SetRateProfile" ReplicatorSv1SetActionProfile = "ReplicatorSv1.SetActionProfile" ReplicatorSv1SetAccount = "ReplicatorSv1.SetAccount" ReplicatorSv1SetLoadIDs = "ReplicatorSv1.SetLoadIDs" ReplicatorSv1RemoveThreshold = "ReplicatorSv1.RemoveThreshold" ReplicatorSv1RemoveStatQueue = "ReplicatorSv1.RemoveStatQueue" ReplicatorSv1RemoveFilter = "ReplicatorSv1.RemoveFilter" ReplicatorSv1RemoveThresholdProfile = "ReplicatorSv1.RemoveThresholdProfile" ReplicatorSv1RemoveStatQueueProfile = "ReplicatorSv1.RemoveStatQueueProfile" ReplicatorSv1RemoveRankingProfile = "ReplicatorSv1.RemoveRankingProfile" ReplicatorSv1RemoveRanking = "ReplicatorSv1.RemoveRanking" ReplicatorSv1RemoveTrendProfile = "ReplicatorSv1.RemoveTrendProfile" ReplicatorSv1RemoveTrend = "ReplicatorSv1.RemoveTrend" ReplicatorSv1RemoveResource = "ReplicatorSv1.RemoveResource" ReplicatorSv1RemoveResourceProfile = "ReplicatorSv1.RemoveResourceProfile" ReplicatorSv1RemoveIPAllocations = "ReplicatorSv1.RemoveIPAllocations" ReplicatorSv1RemoveIPProfile = "ReplicatorSv1.RemoveIPProfile" ReplicatorSv1RemoveRouteProfile = "ReplicatorSv1.RemoveRouteProfile" ReplicatorSv1RemoveAttributeProfile = "ReplicatorSv1.RemoveAttributeProfile" ReplicatorSv1RemoveChargerProfile = "ReplicatorSv1.RemoveChargerProfile" ReplicatorSv1RemoveRateProfile = "ReplicatorSv1.RemoveRateProfile" ReplicatorSv1RemoveActionProfile = "ReplicatorSv1.RemoveActionProfile" ReplicatorSv1RemoveAccount = "ReplicatorSv1.RemoveAccount" ReplicatorSv1GetIndexes = "ReplicatorSv1.GetIndexes" ReplicatorSv1SetIndexes = "ReplicatorSv1.SetIndexes" ReplicatorSv1RemoveIndexes = "ReplicatorSv1.RemoveIndexes" )
ReplicatorSv1 APIs
const ( //AdminSv1ReplayFailedPosts = "AdminSv1.ReplayFailedPosts" AdminSv1GetRateRatesIndexesHealth = "AdminSv1.GetRateRatesIndexesHealth" AdminSv1GetChargerProfilesCount = "AdminSv1.GetChargerProfilesCount" AdminSv1GetAccountsIndexesHealth = "AdminSv1.GetAccountsIndexesHealth" AdminSv1GetDispatcherProfilesCount = "AdminSv1.GetDispatcherProfilesCount" AdminSv1GetRouteProfilesCount = "AdminSv1.GetRouteProfilesCount" AdminSv1GetActionsIndexesHealth = "AdminSv1.GetActionsIndexesHealth" AdminSv1GetDispatcherHostsCount = "AdminSv1.GetDispatcherHostsCount" AdminSv1GetRateProfilesIndexesHealth = "AdminSv1.GetRateProfilesIndexesHealth" AdminSv1ComputeFilterIndexes = "AdminSv1.ComputeFilterIndexes" AdminSv1ComputeFilterIndexIDs = "AdminSv1.ComputeFilterIndexIDs" AdminSv1GetAccountActionPlansIndexHealth = "AdminSv1.GetAccountActionPlansIndexHealth" AdminSv1GetReverseDestinationsIndexHealth = "AdminSv1.GetReverseDestinationsIndexHealth" AdminSv1GetReverseFilterHealth = "AdminSv1.GetReverseFilterHealth" AdminSv1GetThresholdsIndexesHealth = "AdminSv1.GetThresholdsIndexesHealth" AdminSv1GetResourcesIndexesHealth = "AdminSv1.GetResourcesIndexesHealth" AdminSv1GetIPsIndexesHealth = "AdminSv1.GetIPsIndexesHealth" AdminSv1GetStatsIndexesHealth = "AdminSv1.GetStatsIndexesHealth" AdminSv1GetRoutesIndexesHealth = "AdminSv1.GetRoutesIndexesHealth" AdminSv1GetChargersIndexesHealth = "AdminSv1.GetChargersIndexesHealth" AdminSv1GetAttributesIndexesHealth = "AdminSv1.GetAttributesIndexesHealth" AdminSv1GetDispatchersIndexesHealth = "AdminSv1.GetDispatchersIndexesHealth" AdminSv1Ping = "AdminSv1.Ping" AdminSv1SetDispatcherProfile = "AdminSv1.SetDispatcherProfile" AdminSv1GetDispatcherProfile = "AdminSv1.GetDispatcherProfile" AdminSv1GetDispatcherProfiles = "AdminSv1.GetDispatcherProfiles" AdminSv1GetDispatcherProfileIDs = "AdminSv1.GetDispatcherProfileIDs" AdminSv1RemoveDispatcherProfile = "AdminSv1.RemoveDispatcherProfile" // APIerSv1SetBalances = "APIerSv1.SetBalances" AdminSv1SetDispatcherHost = "AdminSv1.SetDispatcherHost" AdminSv1GetDispatcherHost = "AdminSv1.GetDispatcherHost" AdminSv1GetDispatcherHosts = "AdminSv1.GetDispatcherHosts" AdminSv1GetDispatcherHostIDs = "AdminSv1.GetDispatcherHostIDs" AdminSv1RemoveDispatcherHost = "AdminSv1.RemoveDispatcherHost" // APIerSv1GetEventCost = "APIerSv1.GetEventCost" // APIerSv1LoadTariffPlanFromFolder = "APIerSv1.LoadTariffPlanFromFolder" // APIerSv1ExportToFolder = "APIerSv1.ExportToFolder" // APIerSv1GetCost = "APIerSv1.GetCost" AdminSv1GetFilter = "AdminSv1.GetFilter" AdminSv1GetFilterIndexes = "AdminSv1.GetFilterIndexes" AdminSv1RemoveFilterIndexes = "AdminSv1.RemoveFilterIndexes" AdminSv1RemoveFilter = "AdminSv1.RemoveFilter" AdminSv1SetFilter = "AdminSv1.SetFilter" AdminSv1GetFilterIDs = "AdminSv1.GetFilterIDs" AdminSv1GetFiltersCount = "AdminSv1.GetFiltersCount" AdminSv1GetFilters = "AdminSv1.GetFilters" AdminSv1FiltersMatch = "AdminSv1.FiltersMatch" // APIerSv1GetDataCost = "APIerSv1.GetDataCost" // APIerSv1ReplayFailedPosts = "APIerSv1.ReplayFailedPosts" // APIerSv1GetCacheStats = "APIerSv1.GetCacheStats" // APIerSv1ReloadCache = "APIerSv1.ReloadCache" // APIerSv1RemoveActions = "APIerSv1.RemoveActions" // APIerSv1GetLoadHistory = "APIerSv1.GetLoadHistory" // APIerSv1GetLoadIDs = "APIerSv1.GetLoadIDs" // APIerSv1GetLoadTimes = "APIerSv1.GetLoadTimes" AdminSv1GetAttributeProfilesCount = "AdminSv1.GetAttributeProfilesCount" AdminSv1SetAccount = "AdminSv1.SetAccount" AdminSv1GetAccount = "AdminSv1.GetAccount" AdminSv1GetAccounts = "AdminSv1.GetAccounts" AdminSv1GetAccountIDs = "AdminSv1.GetAccountIDs" AdminSv1RemoveAccount = "AdminSv1.RemoveAccount" AdminSv1GetAccountsCount = "AdminSv1.GetAccountsCount" AdminSv1GetCDRs = "AdminSv1.GetCDRs" AdminSv1RemoveCDRs = "AdminSv1.RemoveCDRs" )
AdminSv1 APIs
const ( ServiceManagerV1 = "ServiceManagerV1" ServiceManagerV1StartService = "ServiceManagerV1.StartService" ServiceManagerV1StopService = "ServiceManagerV1.StopService" ServiceManagerV1ServiceStatus = "ServiceManagerV1.ServiceStatus" ServiceManagerV1Ping = "ServiceManagerV1.Ping" )
const ( TPeSv1 = "TPeSv1" TPeSv1Ping = "TPeSv1.Ping" TPeSv1ExportTariffPlan = "TPeSv1.ExportTariffPlan" )
TPeSv1 APIs
const ( EfSv1 = "EfSv1" EfSv1Ping = "EfSv1.Ping" EfSv1ProcessEvent = "EfSv1.ProcessEvent" EfSv1ReplayEvents = "EfSv1.ReplayEvents" )
EfSv1 APIs
const ( ErS = "ErS" ErSv1 = "ErSv1" ErSv1Ping = "ErSv1.Ping" ErSv1RunReader = "ErSv1.RunReader" )
ERs
const ( ConfigS = "ConfigS" ConfigSv1 = "ConfigSv1" ConfigSv1ReloadConfig = "ConfigSv1.ReloadConfig" ConfigSv1GetConfig = "ConfigSv1.GetConfig" ConfigSv1SetConfig = "ConfigSv1.SetConfig" ConfigSv1GetConfigAsJSON = "ConfigSv1.GetConfigAsJSON" ConfigSv1SetConfigFromJSON = "ConfigSv1.SetConfigFromJSON" ConfigSv1StoreCfgInDB = "ConfigSv1.StoreCfgInDB" ConfigSv1Ping = "ConfigSv1.Ping" )
ConfigSv1 APIs
const ( RateSv1 = "RateSv1" RateSv1CostForEvent = "RateSv1.CostForEvent" RateSv1RateProfilesForEvent = "RateSv1.RateProfilesForEvent" RateSv1RateProfileRatesForEvent = "RateSv1.RateProfileRatesForEvent" RateSv1Ping = "RateSv1.Ping" )
const ( AccountSv1 = "AccountSv1" AccountSv1Ping = "AccountSv1.Ping" AccountSv1AccountsForEvent = "AccountSv1.AccountsForEvent" AccountSv1MaxAbstracts = "AccountSv1.MaxAbstracts" AccountSv1DebitAbstracts = "AccountSv1.DebitAbstracts" AccountSv1MaxConcretes = "AccountSv1.MaxConcretes" AccountSv1DebitConcretes = "AccountSv1.DebitConcretes" AccountSv1RefundCharges = "AccountSv1.RefundCharges" AccountSv1ActionSetBalance = "AccountSv1.ActionSetBalance" AccountSv1ActionRemoveBalance = "AccountSv1.ActionRemoveBalance" AccountSv1GetAccount = "AccountSv1.GetAccount" )
const ( CoreS = "CoreS" CoreSv1 = "CoreSv1" CoreSv1Status = "CoreSv1.Status" CoreSv1Ping = "CoreSv1.Ping" CoreSv1Panic = "CoreSv1.Panic" CoreSv1Shutdown = "CoreSv1.Shutdown" CoreSv1Sleep = "CoreSv1.Sleep" CoreSv1StartCPUProfiling = "CoreSv1.StartCPUProfiling" CoreSv1StopCPUProfiling = "CoreSv1.StopCPUProfiling" CoreSv1StartMemoryProfiling = "CoreSv1.StartMemoryProfiling" CoreSv1StopMemoryProfiling = "CoreSv1.StopMemoryProfiling" )
const ( RouteSv1GetRoutes = "RouteSv1.GetRoutes" RouteSv1GetRoutesList = "RouteSv1.GetRoutesList" RouteSv1GetRouteProfilesForEvent = "RouteSv1.GetRouteProfilesForEvent" RouteSv1Ping = "RouteSv1.Ping" AdminSv1GetRouteProfile = "AdminSv1.GetRouteProfile" AdminSv1GetRouteProfiles = "AdminSv1.GetRouteProfiles" AdminSv1GetRouteProfileIDs = "AdminSv1.GetRouteProfileIDs" AdminSv1RemoveRouteProfile = "AdminSv1.RemoveRouteProfile" AdminSv1SetRouteProfile = "AdminSv1.SetRouteProfile" )
RouteS APIs
const ( AdminSv1SetAttributeProfile = "AdminSv1.SetAttributeProfile" AdminSv1GetAttributeProfile = "AdminSv1.GetAttributeProfile" AdminSv1GetAttributeProfiles = "AdminSv1.GetAttributeProfiles" AdminSv1GetAttributeProfileIDs = "AdminSv1.GetAttributeProfileIDs" AdminSv1RemoveAttributeProfile = "AdminSv1.RemoveAttributeProfile" AttributeSv1GetAttributeForEvent = "AttributeSv1.GetAttributeForEvent" AttributeSv1ProcessEvent = "AttributeSv1.ProcessEvent" AttributeSv1Ping = "AttributeSv1.Ping" )
AttributeS APIs
const ( ChargerSv1Ping = "ChargerSv1.Ping" ChargerSv1GetChargersForEvent = "ChargerSv1.GetChargersForEvent" ChargerSv1ProcessEvent = "ChargerSv1.ProcessEvent" AdminSv1GetChargerProfile = "AdminSv1.GetChargerProfile" AdminSv1GetChargerProfiles = "AdminSv1.GetChargerProfiles" AdminSv1RemoveChargerProfile = "AdminSv1.RemoveChargerProfile" AdminSv1SetChargerProfile = "AdminSv1.SetChargerProfile" AdminSv1GetChargerProfileIDs = "AdminSv1.GetChargerProfileIDs" )
ChargerS APIs
const ( ThresholdSv1ProcessEvent = "ThresholdSv1.ProcessEvent" ThresholdSv1GetThreshold = "ThresholdSv1.GetThreshold" ThresholdSv1ResetThreshold = "ThresholdSv1.ResetThreshold" ThresholdSv1GetThresholdIDs = "ThresholdSv1.GetThresholdIDs" ThresholdSv1Ping = "ThresholdSv1.Ping" ThresholdSv1GetThresholdsForEvent = "ThresholdSv1.GetThresholdsForEvent" AdminSv1GetThresholdProfileIDs = "AdminSv1.GetThresholdProfileIDs" AdminSv1GetThresholdProfilesCount = "AdminSv1.GetThresholdProfilesCount" AdminSv1GetThresholdProfile = "AdminSv1.GetThresholdProfile" AdminSv1GetThresholdProfiles = "AdminSv1.GetThresholdProfiles" AdminSv1RemoveThresholdProfile = "AdminSv1.RemoveThresholdProfile" AdminSv1SetThresholdProfile = "AdminSv1.SetThresholdProfile" )
ThresholdS APIs
const ( StatSv1ProcessEvent = "StatSv1.ProcessEvent" StatSv1GetQueueIDs = "StatSv1.GetQueueIDs" StatSv1GetQueueStringMetrics = "StatSv1.GetQueueStringMetrics" StatSv1GetQueueFloatMetrics = "StatSv1.GetQueueFloatMetrics" StatSv1GetQueueDecimalMetrics = "StatSv1.GetQueueDecimalMetrics" StatSv1Ping = "StatSv1.Ping" StatSv1GetStatQueuesForEvent = "StatSv1.GetStatQueuesForEvent" StatSv1GetStatQueue = "StatSv1.GetStatQueue" StatSv1ResetStatQueue = "StatSv1.ResetStatQueue" AdminSv1GetStatQueueProfile = "AdminSv1.GetStatQueueProfile" AdminSv1RemoveStatQueueProfile = "AdminSv1.RemoveStatQueueProfile" AdminSv1SetStatQueueProfile = "AdminSv1.SetStatQueueProfile" AdminSv1GetStatQueueProfiles = "AdminSv1.GetStatQueueProfiles" AdminSv1GetStatQueueProfileIDs = "AdminSv1.GetStatQueueProfileIDs" AdminSv1GetStatQueueProfilesCount = "AdminSv1.GetStatQueueProfilesCount" )
StatS APIs
const ( AdminSv1GetRankingProfile = "AdminSv1.GetRankingProfile" AdminSv1RemoveRankingProfile = "AdminSv1.RemoveRankingProfile" AdminSv1SetRankingProfile = "AdminSv1.SetRankingProfile" AdminSv1GetRankingProfiles = "AdminSv1.GetRankingProfiles" AdminSv1GetRankingProfileIDs = "AdminSv1.GetRankingProfileIDs" AdminSv1GetRankingProfilesCount = "AdminSv1.GetRankingProfilesCount" RankingSv1Ping = "RankingSv1.Ping" RankingSv1GetRanking = "RankingSv1.GetRanking" RankingSv1GetSchedule = "RankingSv1.GetSchedule" RankingSv1ScheduleQueries = "RankingSv1.ScheduleQueries" RankingSv1GetRankingSummary = "RankingSv1.GetRankingSummary" )
RankingS APIs
const ( AdminSv1GetTrendProfile = "AdminSv1.GetTrendProfile" AdminSv1RemoveTrendProfile = "AdminSv1.RemoveTrendProfile" AdminSv1SetTrendProfile = "AdminSv1.SetTrendProfile" AdminSv1GetTrendProfiles = "AdminSv1.GetTrendProfiles" AdminSv1GetTrendProfileIDs = "AdminSv1.GetTrendProfileIDs" AdminSv1GetTrendProfilesCount = "AdminSv1.GetTrendProfilesCount" TrendSv1Ping = "TrendSv1.Ping" TrendSv1ScheduleQueries = "TrendSv1.ScheduleQueries" TrendSv1GetTrend = "TrendSv1.GetTrend" TrendSv1GetScheduledTrends = "TrendSv1.GetScheduledTrends" TrendSv1GetTrendSummary = "TrendSv1.GetTrendSummary" )
TrendS APIs
const ( ResourceSv1Ping = "ResourceSv1.Ping" ResourceSv1GetResource = "ResourceSv1.GetResource" ResourceSv1GetResourceWithConfig = "ResourceSv1.GetResourceWithConfig" ResourceSv1GetResourcesForEvent = "ResourceSv1.GetResourcesForEvent" ResourceSv1AuthorizeResources = "ResourceSv1.AuthorizeResources" ResourceSv1AllocateResources = "ResourceSv1.AllocateResources" ResourceSv1ReleaseResources = "ResourceSv1.ReleaseResources" AdminSv1SetResourceProfile = "AdminSv1.SetResourceProfile" AdminSv1GetResourceProfiles = "AdminSv1.GetResourceProfiles" AdminSv1RemoveResourceProfile = "AdminSv1.RemoveResourceProfile" AdminSv1GetResourceProfile = "AdminSv1.GetResourceProfile" AdminSv1GetResourceProfileIDs = "AdminSv1.GetResourceProfileIDs" AdminSv1GetResourceProfilesCount = "AdminSv1.GetResourceProfilesCount" )
ResourceS APIs
const ( IPsV1Ping = "IPsV1.Ping" IPsV1GetIPAllocations = "IPsV1.GetIPAllocations" IPsV1GetIPAllocationsForEvent = "IPsV1.GetIPAllocationsForEvent" IPsV1AuthorizeIP = "IPsV1.AuthorizeIP" IPsV1AllocateIP = "IPsV1.AllocateIP" IPsV1ReleaseIP = "IPsV1.ReleaseIP" AdminSv1SetIPProfile = "AdminSv1.SetIPProfile" AdminSv1GetIPProfiles = "AdminSv1.GetIPProfiles" AdminSv1RemoveIPProfile = "AdminSv1.RemoveIPProfile" AdminSv1GetIPProfile = "AdminSv1.GetIPProfile" AdminSv1GetIPProfileIDs = "AdminSv1.GetIPProfileIDs" AdminSv1GetIPProfilesCount = "AdminSv1.GetIPProfilesCount" )
IPs 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" SessionSv1GetCost = "SessionSv1.GetCost" 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" SessionSv1ReAuthorize = "SessionSv1.ReAuthorize" SessionSv1DisconnectPeer = "SessionSv1.DisconnectPeer" SessionSv1WarnDisconnect = "SessionSv1.WarnDisconnect" SessionSv1STIRAuthenticate = "SessionSv1.STIRAuthenticate" SessionSv1STIRIdentity = "SessionSv1.STIRIdentity" SessionSv1Sleep = "SessionSv1.Sleep" )
SessionS APIs
const ( DispatcherSv1 = "DispatcherSv1" DispatcherSv1Ping = "DispatcherSv1.Ping" DispatcherSv1GetProfilesForEvent = "DispatcherSv1.GetProfilesForEvent" DispatcherServicePing = "DispatcherService.Ping" DispatcherSv1RemoteStatus = "DispatcherSv1.RemoteStatus" DispatcherSv1RemoteSleep = "DispatcherSv1.RemoteSleep" DispatcherSv1RemotePing = "DispatcherSv1.RemotePing" )
DispatcherS APIs
const ( RegistrarSv1RegisterDispatcherHosts = "RegistrarSv1.RegisterDispatcherHosts" RegistrarSv1UnregisterDispatcherHosts = "RegistrarSv1.UnregisterDispatcherHosts" RegistrarSv1RegisterRPCHosts = "RegistrarSv1.RegisterRPCHosts" RegistrarSv1UnregisterRPCHosts = "RegistrarSv1.UnregisterRPCHosts" )
RegistrarS APIs
const ( AdminSv1SetRateProfile = "AdminSv1.SetRateProfile" AdminSv1GetRateProfile = "AdminSv1.GetRateProfile" AdminSv1GetRateProfiles = "AdminSv1.GetRateProfiles" AdminSv1GetRateProfileRates = "AdminSv1.GetRateProfileRates" AdminSv1GetRateProfileIDs = "AdminSv1.GetRateProfileIDs" AdminSv1GetRateProfilesCount = "AdminSv1.GetRateProfilesCount" AdminSv1GetRateProfileRatesCount = "AdminSv1.GetRateProfileRatesCount" AdminSv1GetRateProfileRateIDs = "AdminSv1.GetRateProfileRateIDs" AdminSv1SetRateProfileRates = "AdminSv1.SetRateProfileRates" AdminSv1RemoveRateProfile = "AdminSv1.RemoveRateProfile" AdminSv1RemoveRateProfileRates = "AdminSv1.RemoveRateProfileRates" )
RateProfile APIs
const ( AnalyzerSv1 = "AnalyzerSv1" AnalyzerSv1Ping = "AnalyzerSv1.Ping" AnalyzerSv1StringQuery = "AnalyzerSv1.StringQuery" )
AnalyzerS APIs
const ( LoaderSv1 = "LoaderSv1" LoaderSv1Run = "LoaderSv1.Run" LoaderSv1Ping = "LoaderSv1.Ping" LoaderSv1ImportZip = "LoaderSv1.ImportZip" )
LoaderS APIs
const ( CacheSv1 = "CacheSv1" CacheSv1GetCacheStats = "CacheSv1.GetCacheStats" CacheSv1GetItemIDs = "CacheSv1.GetItemIDs" CacheSv1HasItem = "CacheSv1.HasItem" CacheSv1GetItem = "CacheSv1.GetItem" CacheSv1GetItemWithRemote = "CacheSv1.GetItemWithRemote" CacheSv1GetItemExpiryTime = "CacheSv1.GetItemExpiryTime" CacheSv1RemoveItem = "CacheSv1.RemoveItem" CacheSv1RemoveItems = "CacheSv1.RemoveItems" CacheSv1PrecacheStatus = "CacheSv1.PrecacheStatus" CacheSv1HasGroup = "CacheSv1.HasGroup" CacheSv1GetGroupItemIDs = "CacheSv1.GetGroupItemIDs" CacheSv1RemoveGroup = "CacheSv1.RemoveGroup" CacheSv1Clear = "CacheSv1.Clear" CacheSv1ReloadCache = "CacheSv1.ReloadCache" CacheSv1LoadCache = "CacheSv1.LoadCache" CacheSv1Ping = "CacheSv1.Ping" CacheSv1ReplicateSet = "CacheSv1.ReplicateSet" CacheSv1ReplicateRemove = "CacheSv1.ReplicateRemove" )
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" CDRsV1ProcessEventWithGet = "CDRsV1.ProcessEventWithGet" CDRsV1ProcessStoredEvents = "CDRsV1.ProcessStoredEvents" CDRsV1Ping = "CDRsV1.Ping" CDRsV2 = "CDRsV2" CDRsV2StoreSessionCost = "CDRsV2.StoreSessionCost" CDRsV2ProcessEvent = "CDRsV2.ProcessEvent" )
Cdrs APIs
const ( EeS = "EeS" EeSv1 = "EeSv1" EeSv1Ping = "EeSv1.Ping" EeSv1ProcessEvent = "EeSv1.ProcessEvent" EeSv1ArchiveEventsInReply = "EeSv1.ArchiveEventsInReply" )
EEs
const ( AdminSv1SetActionProfile = "AdminSv1.SetActionProfile" AdminSv1GetActionProfile = "AdminSv1.GetActionProfile" AdminSv1GetActionProfiles = "AdminSv1.GetActionProfiles" AdminSv1GetActionProfileIDs = "AdminSv1.GetActionProfileIDs" AdminSv1GetActionProfilesCount = "AdminSv1.GetActionProfilesCount" AdminSv1RemoveActionProfile = "AdminSv1.RemoveActionProfile" )
ActionProfile APIs
const ( AdminS = "AdminS" AdminSv1 = "AdminSv1" )
AdminSv1
const ( CGRAccount = "cgr_account" CGRRoute = "cgr_route" CGRDestination = "cgr_destination" CGRSubject = "cgr_subject" CGRCategory = "cgr_category" CGRReqType = "cgr_reqtype" CGRTenant = "cgr_tenant" CGRPdd = "cgr_pdd" CGRDisconnectCause = "cgr_disconnectcause" CGRComputeLCR = "cgr_computelcr" CGRRoutes = "cgr_routes" CGRFlags = "cgr_flags" CGROpts = "cgr_opts" )
cgr_ variables
const ( ResourcesCsv = "Resources.csv" IPsCsv = "IPs.csv" StatsCsv = "Stats.csv" RankingsCsv = "Rankings.csv" TrendsCsv = "Trends.csv" ThresholdsCsv = "Thresholds.csv" FiltersCsv = "Filters.csv" RoutesCsv = "Routes.csv" AttributesCsv = "Attributes.csv" ChargersCsv = "Chargers.csv" RatesCsv = "Rates.csv" ActionsCsv = "Actions.csv" AccountsCsv = "Accounts.csv" )
CSV file name
const ( TBLTPResources = "tp_resources" TBLTPStats = "tp_stats" TBLTPRankings = "tp_rankings" TBLTPTrends = "tp_trends" TBLTPThresholds = "tp_thresholds" TBLTPFilters = "tp_filters" SessionCostsTBL = "session_costs" CDRsTBL = "cdrs" TBLTPRoutes = "tp_routes" TBLTPAttributes = "tp_attributes" TBLTPChargers = "tp_chargers" TBLVersions = "versions" OldSMCosts = "sm_costs" TBLTPDispatchers = "tp_dispatcher_profiles" TBLTPDispatcherHosts = "tp_dispatcher_hosts" TBLTPRateProfiles = "tp_rate_profiles" TBLTPActionProfiles = "tp_action_profiles" TBLTPAccounts = "tp_accounts" )
Table Name
const ( CacheConfig = "*config" CacheResources = "*resources" CacheResourceProfiles = "*resource_profiles" CacheEventResources = "*event_resources" CacheIPAllocations = "*ip_allocations" CacheIPProfiles = "*ip_profiles" CacheEventIPs = "*event_ips" CacheStatQueueProfiles = "*statqueue_profiles" CacheStatQueues = "*statqueues" CacheRankingProfiles = "*ranking_profiles" CacheRankings = "*rankings" CacheTrendProfiles = "*trend_profiles" CacheTrends = "*trends" CacheThresholdProfiles = "*threshold_profiles" CacheThresholds = "*thresholds" CacheFilters = "*filters" CacheRouteProfiles = "*route_profiles" CacheAttributeProfiles = "*attribute_profiles" CacheChargerProfiles = "*charger_profiles" CacheRateProfiles = "*rate_profiles" CacheActionProfiles = "*action_profiles" CacheAccounts = "*accounts" CacheResourceFilterIndexes = "*resource_filter_indexes" CacheIPFilterIndexes = "*ip_filter_indexes" CacheStatFilterIndexes = "*stat_filter_indexes" CacheThresholdFilterIndexes = "*threshold_filter_indexes" CacheRouteFilterIndexes = "*route_filter_indexes" CacheAttributeFilterIndexes = "*attribute_filter_indexes" CacheChargerFilterIndexes = "*charger_filter_indexes" CacheDiameterMessages = "*diameter_messages" CacheRPCResponses = "*rpc_responses" CacheClosedSessions = "*closed_sessions" CacheRateProfilesFilterIndexes = "*rate_profile_filter_indexes" CacheActionProfilesFilterIndexes = "*action_profile_filter_indexes" CacheAccountsFilterIndexes = "*account_filter_indexes" CacheRateFilterIndexes = "*rate_filter_indexes" MetaPrecaching = "*precaching" MetaReady = "*ready" CacheLoadIDs = "*load_ids" CacheRPCConnections = "*rpc_connections" CacheCDRIDs = "*cdr_ids" CacheUCH = "*uch" CacheSTIR = "*stir" CacheEventCharges = "*event_charges" CacheReverseFilterIndexes = "*reverse_filter_indexes" CacheVersions = "*versions" CacheCapsEvents = "*caps_events" CacheReplicationHosts = "*replication_hosts" // storDB CacheCDRsTBL = "*cdrs" )
Cache Name
const ( ResourceFilterIndexes = "rfi_" IPFilterIndexes = "ifi_" StatFilterIndexes = "sfi_" ThresholdFilterIndexes = "tfi_" AttributeFilterIndexes = "afi_" ChargerFilterIndexes = "cfi_" DispatcherFilterIndexes = "dfi_" ActionPlanIndexes = "api_" RouteFilterIndexes = "rti_" RateProfilesFilterIndexPrfx = "rpi_" RateFilterIndexPrfx = "rri_" RankingPrefix = "rnk_" ActionProfilesFilterIndexPrfx = "aci_" AccountFilterIndexPrfx = "ani_" FilterIndexPrfx = "fii_" )
Prefix for indexing
const ( KamailioAgent = "KamailioAgent" RadiusAgent = "RadiusAgent" DiameterAgent = "DiameterAgent" FreeSWITCHAgent = "FreeSWITCHAgent" AsteriskAgent = "AsteriskAgent" HTTPAgent = "HTTPAgent" SIPAgent = "SIPAgent" JanusAgent = "JanusAgent" PrometheusAgent = "PrometheusAgent" )
Agents
const ( MetaGoogleAPI = "*gapi" GoogleCredentialsFileName = "credentials.json" )
Google_API
const ( NodeIDCfg = "node_id" LoggerCfg = "logger" LogLevelCfg = "log_level" RoundingDecimalsCfg = "rounding_decimals" DBDataEncodingCfg = "dbdata_encoding" TpExportPathCfg = "tpexport_dir" PosterAttemptsCfg = "poster_attempts" FailedPostsDirCfg = "failed_posts_dir" FailedPostsTTLCfg = "failed_posts_ttl" DefaultReqTypeCfg = "default_request_type" DefaultCategoryCfg = "default_category" DefaultTenantCfg = "default_tenant" DefaultTimezoneCfg = "default_timezone" DefaultCachingCfg = "default_caching" CachingDlayCfg = "caching_delay" ConnectAttemptsCfg = "connect_attempts" ReconnectsCfg = "reconnects" MaxReconnectIntervalCfg = "max_reconnect_interval" ConnectTimeoutCfg = "connect_timeout" ReplyTimeoutCfg = "reply_timeout" LockingTimeoutCfg = "locking_timeout" DigestSeparatorCfg = "digest_separator" DigestEqualCfg = "digest_equal" MaxParallelConnsCfg = "max_parallel_conns" EEsConnsCfg = "ees_conns" DecimalMaxScaleCfg = "decimal_max_scale" DecimalMinScaleCfg = "decimal_min_scale" DecimalPrecisionCfg = "decimal_precision" DecimalRoundingModeCfg = "decimal_rounding_mode" )
GeneralCfg
const ( LevelCfg = "level" KafkaConnCfg = "kafka_conn" KafkaTopicCfg = "kafka_topic" KafkaAttemptsCfg = "kafka_attempts" )
const ( TypeCfg = "type" SQLMaxOpenConnsCfg = "sqlMaxOpenConns" SQLMaxIdleConnsCfg = "sqlMaxIdleConns" SQLLogLevelCfg = "sqlLogLevel" SQLConnMaxLifetimeCfg = "sqlConnMaxLifetime" StringIndexedFieldsCfg = "string_indexed_fields" PrefixIndexedFieldsCfg = "prefix_indexed_fields" SuffixIndexedFieldsCfg = "suffix_indexed_fields" ExistsIndexedFieldsCfg = "exists_indexed_fields" NotExistsIndexedFieldsCfg = "notexists_indexed_fields" MongoQueryTimeoutCfg = "mongoQueryTimeout" MongoConnSchemeCfg = "mongoConnScheme" PgSSLModeCfg = "pgSSLMode" PgSSLCertCfg = "pgSSLCert" PgSSLKeyCfg = "pgSSLKey" PgSSLPasswordCfg = "pgSSLPassword" PgSSLCertModeCfg = "pgSSLCertMode" PgSSLRootCertCfg = "pgSSLRootCert" ItemsCfg = "items" OptsCfg = "opts" Tenants = "tenants" MysqlLocation = "mysqlLocation" )
const ( DataDbTypeCfg = "db_type" DataDbHostCfg = "db_host" DataDbPortCfg = "db_port" DataDbNameCfg = "db_name" DataDbUserCfg = "db_user" DataDbPassCfg = "db_password" InternalDBDumpPathCfg = "internalDBDumpPath" InternalDBBackupPathCfg = "internalDBBackupPath" InternalDBStartTimeoutCfg = "internalDBStartTimeout" InternalDBDumpIntervalCfg = "internalDBDumpInterval" InternalDBRewriteIntervalCfg = "internalDBRewriteInterval" InternalDBFileSizeLimitCfg = "internalDBFileSizeLimit" RedisMaxConnsCfg = "redisMaxConns" RedisConnectAttemptsCfg = "redisConnectAttempts" RedisSentinelNameCfg = "redisSentinel" RedisClusterCfg = "redisCluster" RedisClusterSyncCfg = "redisClusterSync" RedisClusterOnDownDelayCfg = "redisClusterOndownDelay" RedisConnectTimeoutCfg = "redisConnectTimeout" RedisReadTimeoutCfg = "redisReadTimeout" RedisWriteTimeoutCfg = "redisWriteTimeout" RedisPoolPipelineWindowCfg = "redisPoolPipelineWindow" RedisPoolPipelineLimitCfg = "redisPoolPipelineLimit" RedisTLSCfg = "redisTLS" RedisClientCertificateCfg = "redisClientCertificate" RedisClientKeyCfg = "redisClientKey" RedisCACertificateCfg = "redisCACertificate" ReplicationFilteredCfg = "replication_filtered" ReplicationCache = "replication_cache" RemoteConnIDCfg = "remote_conn_id" )
DataDbCfg
const ( APIKeyCfg = "api_key" RouteIDCfg = "route_id" RemoteCfg = "remote" ReplicateCfg = "replicate" TTLCfg = "ttl" LimitCfg = "limit" StaticTTLCfg = "static_ttl" )
ItemOpt
const ( ServerCerificateCfg = "server_certificate" ServerKeyCfg = "server_key" ServerPolicyCfg = "server_policy" ServerNameCfg = "server_name" ClientCerificateCfg = "client_certificate" ClientKeyCfg = "client_key" CaCertificateCfg = "ca_certificate" )
Tls
const ( RPCJSONListenCfg = "rpc_json" RPCGOBListenCfg = "rpc_gob" HTTPListenCfg = "http" RPCJSONTLSListenCfg = "rpc_json_tls" RPCGOBTLSListenCfg = "rpc_gob_tls" HTTPTLSListenCfg = "http_tls" )
ListenCfg
const ( HTTPJsonRPCURLCfg = "json_rpc_url" RegistrarSURLCfg = "registrars_url" HTTPWSURLCfg = "ws_url" HTTPFreeswitchCDRsURLCfg = "freeswitch_cdrs_url" HTTPCDRsURLCfg = "http_cdrs" PprofPathCfg = "pprof_path" HTTPUseBasicAuthCfg = "use_basic_auth" HTTPAuthUsersCfg = "auth_users" HTTPClientOptsCfg = "client_opts" HTTPClientSkipTLSVerificationCfg = "skipTLSVerification" HTTPClientTLSHandshakeTimeoutCfg = "tlsHandshakeTimeout" HTTPClientDisableKeepAlivesCfg = "disableKeepAlives" HTTPClientDisableCompressionCfg = "disableCompression" HTTPClientMaxIdleConnsCfg = "maxIdleConns" HTTPClientMaxIdleConnsPerHostCfg = "maxIdleConnsPerHost" HTTPClientMaxConnsPerHostCfg = "maxConnsPerHost" HTTPClientIdleConnTimeoutCfg = "idleConnTimeout" HTTPClientResponseHeaderTimeoutCfg = "responseHeaderTimeout" HTTPClientExpectContinueTimeoutCfg = "expectContinueTimeout" HTTPClientForceAttemptHTTP2Cfg = "forceAttemptHttp2" HTTPClientDialTimeoutCfg = "dialTimeout" HTTPClientDialFallbackDelayCfg = "dialFallbackDelay" HTTPClientDialKeepAliveCfg = "dialKeepAlive" )
HTTPCfg
const ( StatSConnsCfg = "stats_conns" ResourceSConnsCfg = "resources_conns" TrendSConnsCfg = "trends_conns" RankingSConnsCfg = "rankings_conns" )
FilterSCfg
const ( EnabledCfg = "enabled" ThresholdSConnsCfg = "thresholds_conns" CacheSConnsCfg = "caches_conns" ScheduledIDsCfg = "scheduled_ids" )
const ( CDRsConnsCfg = "cdrs_conns" FiltersCfg = "filters" ExtraFieldsCfg = "extra_fields" SMCostRetriesCfg = "session_cost_retries" ChargerSConnsCfg = "chargers_conns" AttributeSConnsCfg = "attributes_conns" RetransmissionTimerCfg = "retransmission_timer" OnlineCDRExportsCfg = "online_cdr_exports" SessionCostRetires = "session_cost_retries" RateSConnsCfg = "rates_conns" )
CdrsCfg
const ( ListenBijsonCfg = "listen_bijson" ListenBigobCfg = "listen_bigob" RouteSConnsCfg = "routes_conns" IPsConnsCfg = "ips_conns" ReplicationConnsCfg = "replication_conns" RemoteConnsCfg = "remote_conns" DebitIntervalCfg = "debit_interval" StoreSCostsCfg = "store_session_costs" SessionTTLCfg = "session_ttl" SessionTTLMaxDelayCfg = "session_ttl_max_delay" SessionTTLLastUsedCfg = "session_ttl_last_used" SessionTTLLastUsageCfg = "session_ttl_last_usage" SessionTTLUsageCfg = "session_ttl_usage" SessionIndexesCfg = "session_indexes" ClientProtocolCfg = "client_protocol" ChannelSyncIntervalCfg = "channel_sync_interval" TerminateAttemptsCfg = "terminate_attempts" AlterableFieldsCfg = "alterable_fields" MinDurLowBalanceCfg = "min_dur_low_balance" DefaultUsageCfg = "default_usage" STIRCfg = "stir" AllowedAtestCfg = "allowed_attest" PayloadMaxdurationCfg = "payload_maxduration" DefaultAttestCfg = "default_attest" PublicKeyPathCfg = "publickey_path" PrivateKeyPathCfg = "privatekey_path" )
SessionSCfg
const ( SessionSConnsCfg = "sessions_conns" SubscribeParkCfg = "subscribe_park" CreateCdrCfg = "create_cdr" LowBalanceAnnFileCfg = "low_balance_ann_file" EmptyBalanceContextCfg = "empty_balance_context" EmptyBalanceAnnFileCfg = "empty_balance_ann_file" MaxWaitConnectionCfg = "max_wait_connection" ActiveSessionDelimiterCfg = "active_session_delimiter" EventSocketConnsCfg = "event_socket_conns" EmptyBalanceContext = "empty_balance_context" )
FsAgentCfg
const ( AddressCfg = "address" Password = "password" AliasCfg = "alias" AccountSConnsCfg = "accounts_conns" // KamAgentCfg EvapiConnsCfg = "evapi_conns" TimezoneCfg = "timezone" // AsteriskConnCfg UserCf = "user" // AsteriskAgentCfg CreateCDRCfg = "create_cdr" AsteriskConnsCfg = "asterisk_conns" // DiameterAgentCfg ListenNetCfg = "listen_net" NetworkCfg = "network" ListenersCfg = "listeners" ListenCfg = "listen" DictionariesPathCfg = "dictionaries_path" OriginHostCfg = "origin_host" OriginRealmCfg = "origin_realm" VendorIDCfg = "vendor_id" ProductNameCfg = "product_name" SyncedConnReqsCfg = "synced_conn_requests" ASRTemplateCfg = "asr_template" RARTemplateCfg = "rar_template" ForcedDisconnectCfg = "forced_disconnect" TemplatesCfg = "templates" RequestProcessorsCfg = "request_processors" // PrometheusAgentCfg CoreSConnsCfg = "cores_conns" CollectGoMetricsCfg = "collect_go_metrics" CollectProcessMetricsCfg = "collect_process_metrics" StatQueueIDsCfg = "stat_queue_ids" // RequestProcessor RequestFieldsCfg = "request_fields" ReplyFieldsCfg = "reply_fields" // RadiusAgentCfg ListenAuthCfg = "listen_auth" ListenAcctCfg = "listen_acct" ClientSecretsCfg = "client_secrets" ClientDictionariesCfg = "client_dictionaries" // JanusAgentCfg JanusConnsCfg = "janus_conns" AdminAddressCfg = "admin_address" AdminPasswordCfg = "admin_password" // AttributeSCfg IndexedSelectsCfg = "indexed_selects" ProfileRunsCfg = "profile_runs" NestedFieldsCfg = "nested_fields" MetaProcessRunsCfg = "*processRuns" MetaProfileRunsCfg = "*profileRuns" // ChargerSCfg StoreIntervalCfg = "store_interval" // StatSCfg StoreUncompressedLimitCfg = "store_uncompressed_limit" EEsExporterIDsCfg = "ees_exporter_ids" // Cache PartitionsCfg = "partitions" PrecacheCfg = "precache" // CdrsCfg ExportPathCfg = "export_path" SynchronousCfg = "synchronous" AttemptsCfg = "attempts" AttributeContextCfg = "attribute_context" AttributeIDsCfg = "attribute_ids" ConcurrentRequestsCfg = "concurrent_requests" //LoaderSCfg DryRunCfg = "dry_run" LockFilePathCfg = "lockfile_path" TpInDirCfg = "tp_in_dir" TpOutDirCfg = "tp_out_dir" DataCfg = "data" DefaultRatioCfg = "default_ratio" ReadersCfg = "readers" ExportersCfg = "exporters" PoolSize = "poolSize" Conns = "conns" FilenameCfg = "file_name" RequestPayloadCfg = "request_payload" ReplyPayloadCfg = "reply_payload" TransportCfg = "transport" StrategyCfg = "strategy" // RouteSCfg MetaProfileCountCfg = "*profileCount" MetaIgnoreErrorsCfg = "*ignoreErrors" MetaMaxCostCfg = "*maxCost" MetaLimitCfg = "*limit" MetaOffsetCfg = "*offset" MetaMaxItemsCfg = "*maxItems" // RateSCfg MetaIntervalStartCfg = "*intervalStart" RateIndexedSelectsCfg = "rate_indexed_selects" RateNestedFieldsCfg = "rate_nested_fields" RateStringIndexedFieldsCfg = "rate_string_indexed_fields" RatePrefixIndexedFieldsCfg = "rate_prefix_indexed_fields" RateSuffixIndexedFieldsCfg = "rate_suffix_indexed_fields" RateExistsIndexedFieldsCfg = "rate_exists_indexed_fields" RateNotExistsIndexedFieldsCfg = "rate_notexists_indexed_fields" Verbosity = "verbosity" // ResourceSCfg MetaUsageIDCfg = "*usageID" MetaUsageTTLCfg = "*usageTTL" MetaUnitsCfg = "*units" // SessionsCfg MetaAttributesDerivedReplyCfg = "*attributesDerivedReply" MetaBlockerErrorCfg = "*blockerError" MetaCDRsDerivedReplyCfg = "*cdrsDerivedReply" MetaResourcesAuthorizeCfg = "*resourcesAuthorize" MetaResourcesAllocateCfg = "*resourcesAllocate" MetaResourcesReleaseCfg = "*resourcesRelease" MetaResourcesDerivedReplyCfg = "*resourcesDerivedReply" MetaIPsAuthorizeCfg = "*ipsAuthorize" MetaIPsAllocateCfg = "*ipsAllocate" MetaIPsReleaseCfg = "*ipsRelease" MetaRoutesDerivedReplyCfg = "*routesDerivedReply" MetaStatsDerivedReplyCfg = "*statsDerivedReply" MetaThresholdsDerivedReplyCfg = "*thresholdsDerivedReply" MetaMaxUsageCfg = "*maxUsage" MetaForceUsageCfg = "*forceUsage" MetaTTLCfg = "*ttl" MetaChargeableCfg = "*chargeable" MetaDebitIntervalCfg = "*debitInterval" MetaTTLLastUsageCfg = "*ttlLastUsage" MetaTTLLastUsedCfg = "*ttlLastUsed" MetaTTLMaxDelayCfg = "*ttlMaxDelay" MetaTTLUsageCfg = "*ttlUsage" MetaAccountsForceUsage = "*accountsForceUsage" // AnalyzerSCfg CleanupIntervalCfg = "cleanup_interval" IndexTypeCfg = "index_type" DBPathCfg = "db_path" // CoreSCfg CapsCfg = "caps" CapsStrategyCfg = "caps_strategy" CapsStatsIntervalCfg = "caps_stats_interval" ShutdownTimeoutCfg = "shutdown_timeout" // AccountSCfg MaxIterations = "max_iterations" MaxUsage = "max_usage" )
From Config
const ( TagCfg = "tag" TypeCf = "type" PathCfg = "path" ValueCfg = "value" WidthCfg = "width" StripCfg = "strip" PaddingCfg = "padding" MandatoryCfg = "mandatory" AttributeIDCfg = "attribute_id" NewBranchCfg = "new_branch" BlockerCfg = "blocker" LayoutCfg = "layout" CostShiftDigitsCfg = "cost_shift_digits" MaskDestIDCfg = "mask_destinationd_id" MaskLenCfg = "mask_length" )
FC Template
const ( RootDirCfg = "root_dir" URLCfg = "url" ClientNumberCfg = "client_number" ValidationKeyCfg = "validation_key" BusinessUnitCfg = "business_unit" IncludeLocalCostCfg = "include_local_cost" ReturnFileCodeCfg = "return_file_code" ResponseGroupCfg = "response_group" ResponseTypeCfg = "response_type" RegulatoryCodeCfg = "regulatory_code" ClientTrackingCfg = "client_tracking" CustomerNumberCfg = "customer_number" OrigNumberCfg = "orig_number" TermNumberCfg = "term_number" BillToNumberCfg = "bill_to_number" ZipcodeCfg = "zipcode" Plus4Cfg = "plus4" P2PZipcodeCfg = "p2pzipcode" P2PPlus4Cfg = "p2pplus4" UnitsCfg = "units" UnitTypeCfg = "unit_type" TaxIncludedCfg = "tax_included" TaxSitusRuleCfg = "tax_situs_rule" TransTypeCodeCfg = "trans_type_code" SalesTypeCodeCfg = "sales_type_code" TaxExemptionCodeListCfg = "tax_exemption_code_list" )
SureTax
const ( TpIDCfg = "tpid" DataPathCfg = "data_path" DisableReverseCfg = "disable_reverse" CachesConnsCfg = "caches_conns" ActionSConnsCfg = "actions_conns" GapiCredentialsCfg = "gapi_credentials" GapiTokenCfg = "gapi_token" )
LoaderCgrCfg
const ( OutDataDBTypeCfg = "out_datadb_type" OutDataDBHostCfg = "out_datadb_host" OutDataDBPortCfg = "out_datadb_port" OutDataDBNameCfg = "out_datadb_name" OutDataDBUserCfg = "out_datadb_user" OutDataDBPasswordCfg = "out_datadb_password" OutDataDBEncodingCfg = "out_datadb_encoding" OutDataDBRedisSentinel = "out_redis_sentinel" OutDataDBOptsCfg = "out_datadb_opts" UsersFiltersCfg = "users_filters" )
MigratorCgrCfg
const ( MailerServerCfg = "server" MailerAuthUserCfg = "auth_user" MailerAuthPassCfg = "auth_password" MailerFromAddrCfg = "from_address" )
MailerCfg
const ( IDCfg = "id" CacheCfg = "cache" FieldSepCfg = "field_separator" RunDelayCfg = "run_delay" StartDelayCfg = "start_delay" SourcePathCfg = "source_path" ProcessedPathCfg = "processed_path" TenantCfg = "tenant" EEsSuccessIDsCfg = "ees_success_ids" EEsFailedIDsCfg = "ees_failed_ids" FlagsCfg = "flags" FieldsCfg = "fields" CacheDumpFieldsCfg = "cache_dump_fields" PartialCommitFieldsCfg = "partial_commit_fields" PartialCacheTTLCfg = "partial_cache_ttl" ActionCfg = "action" )
EventReaderCfg
const ( RPCCfg = "rpc" DispatcherCfg = "dispatchers" RegistrarsConnsCfg = "registrars_conns" HostsCfg = "hosts" RefreshIntervalCfg = "refresh_interval" )
RegistrarCCfg
const ( ClientIDCfg = "client_id" ClientSecretCfg = "client_secret" TokenUrlCfg = "token_url" IpsUrlCfg = "ips_url" NumbersUrlCfg = "numbers_url" AudienceCfg = "audience" GrantTypeCfg = "grant_type" )
const ( STIRAlg = "ES256" STIRPpt = "shaken" STIRTyp = "passport" STIRAlgField = "alg" STIRPptField = "ppt" STIRInfoField = "info" STIRExtraInfoPrefix = ";info=<" STIRExtraInfoSuffix = ">;alg=ES256;ppt=shaken" )
STIR/SHAKEN
const ( // SessionS OptsSesTTL = "*sesTTL" OptsSesChargeable = "*sesChargeable" OptsSesDebitInterval = "*sesDebitInterval" OptsSesTTLLastUsage = "*sesTTLLastUsage" OptsSesTTLLastUsed = "*sesTTLLastUsed" OptsSesTTLMaxDelay = "*sesTTLMaxDelay" OptsSesTTLUsage = "*sesTTLUsage" OptsSesForceUsage = "*sesForceUsage" OptsSesAttributeSDerivedReply = "*sesAttributeSDerivedReply" OptsSesBlockerError = "*sesBlockerError" OptsSesCDRsDerivedReply = "*sesCDRsDerivedReply" OptsSesResourceSAuthorize = "*sesResourceSAuthorize" OptsSesResourceSAllocate = "*sesResourceSAllocate" OptsSesResourceSRelease = "*sesResourceSRelease" OptsSesResourceSDerivedReply = "*sesResourceSDerivedReply" OptsSesRouteSDerivedReply = "*sesRouteSDerivedReply" OptsSesStatSDerivedReply = "*sesStatSDerivedReply" OptsSesSTIRAuthenticate = "*sesSTIRAuthenticate" OptsSesSTIRDerivedReply = "*sesSTIRDerivedReply" OptsSesSTIRInitiate = "*sesSTIRInitiate" OptsSesThresholdSDerivedReply = "*sesThresholdSDerivedReply" OptsSesMaxUsage = "*sesMaxUsage" OptsSesInitiate = "*sesInitiate" OptsSesUpdate = "*sesUpdate" OptsSesTerminate = "*sesTerminate" OptsSesMessage = "*sesMessage" // Accounts OptsAccountsUsage = "*acntUsage" OptsAccountsForceUsage = "*accountSForceUsage" OptsAccountsProfileIDs = "*acntProfileIDs" // Actions OptsActionsProfileIDs = "*actProfileIDs" // Attributes OptsAttributesProfileIDs = "*attrProfileIDs" OptsAttributesProfileRuns = "*attrProfileRuns" OptsAttributesProcessRuns = "*attrProcessRuns" // CDRs OptsCDRsExport = "*cdrsExport" OptsCDRsRefund = "*cdrsRefund" OptsCDRsRerate = "*cdrsRerate" OptsCDRsStore = "*cdrsStore" // DispatcherS OptsAPIKey = "*apiKey" OptsRouteID = "*routeID" OptsDispatchersProfilesCount = "*dispatchersProfilesCount" // EEs OptsEEsVerbose = "*eesVerbose" // Rates OptsRatesProfileIDs = "*rtsProfileIDs" OptsRatesStartTime = "*rtsStartTime" OptsRatesUsage = "*rtsUsage" OptsRatesIntervalStart = "*rtsIntervalStart" // Resources OptsResourcesUnits = "*rsUnits" OptsResourcesUsageID = "*rsUsageID" OptsResourcesUsageTTL = "*rsUsageTTL" // IPs OptsIPsAllocationID = "*ipAllocationID" OptsIPsTTL = "*ipTTL" MetaAllocationID = "*allocationID" // Routes OptsRoutesProfilesCount = "*rouProfilesCount" OptsRoutesLimit = "*rouLimit" OptsRoutesOffset = "*rouOffset" OptsRoutesMaxItems = "*rouMaxItems" OptsRoutesIgnoreErrors = "*rouIgnoreErrors" OptsRoutesMaxCost = "*rouMaxCost" OptsRoutesUsage = "*rouUsage" // Stats OptsStatsProfileIDs = "*statsProfileIDs" OptsRoundingDecimals = "*roundingDecimals" // Thresholds OptsThresholdsProfileIDs = "*thdProfileIDs" // STIR OptsStirATest = "*stirATest" OptsStirPayloadMaxDuration = "*stirPayloadMaxDuration" OptsStirIdentity = "*stirIdentity" OptsStirOriginatorTn = "*stirOriginatorTn" OptsStirOriginatorURI = "*stirOriginatorURI" OptsStirDestinationTn = "*stirDestinationTn" OptsStirDestinationURI = "*stirDestinationURI" OptsStirPublicKeyPath = "*stirPublicKeyPath" OptsStirPrivateKeyPath = "*stirPrivateKeyPath" // Others OptsContext = "*context" MetaSubsys = "*subsys" MetaMethod = "*reqMethod" MetaEventType = "*eventType" EventType = "EventType" SchedulerInit = "SchedulerInit" MetaProfileIgnoreFilters = "*profileIgnoreFilters" MetaPosterAttempts = "*posterAttempts" RemoteHostOpt = "*rmtHost" MetaCache = "*cache" MetaWithIndex = "*withIndex" MetaForceLock = "*forceLock" MetaStopOnError = "*stopOnError" )
Event Opts
const ( MetaDerivedReply = "*derived_reply" MetaIDs = "*IDs" MetaProfileIDs = "*profileIDs" TrueStr = "true" FalseStr = "false" )
Event Flags
const ( ThresholdIDs = "ThresholdIDs" FilterIDs = "FilterIDs" RateProfileIDs = "RateProfileIDs" ActionProfileIDs = "ActionProfileIDs" )
ArgCache constats
const ( NumberOfEvents = "NumberOfEvents" TotalCost = "TotalCost" PositiveExports = "PositiveExports" NegativeExports = "NegativeExports" FirstExpOrderID = "FirstExpOrderID" LastExpOrderID = "LastExpOrderID" FirstEventATime = "FirstEventATime" LastEventATime = "LastEventATime" TotalDuration = "TotalDuration" TotalDataUsage = "TotalDataUsage" TotalSMSUsage = "TotalSMSUsage" TotalMMSUsage = "TotalMMSUsage" TotalGenericUsage = "TotalGenericUsage" FilePath = "FilePath" )
EventExporter metrics
const ( SQSPoster = "SQSPoster" S3Poster = "S3Poster" // General constants for posters and readers DefaultQueueID = "cgrates_cdrs" // sqs and s3 AWSRegion = "awsRegion" AWSKey = "awsKey" AWSSecret = "awsSecret" AWSToken = "awsToken" // sqs SQSQueueID = "sqsQueueID" // s3 S3Bucket = "s3BucketID" S3FolderPath = "s3FolderPath" // sql SQLDefaultDBName = "cgrates" SQLDefaultPgSSLMode = "disable" SQLDBNameOpt = "sqlDBName" SQLTableNameOpt = "sqlTableName" SQLMaxOpenConns = "sqlMaxOpenConns" SQLConnMaxLifetime = "sqlConnMaxLifetime" MYSQLDSNParams = "mysqlDSNParams" // fileCSV CSVRowLengthOpt = "csvRowLength" CSVFieldSepOpt = "csvFieldSeparator" CSVLazyQuotes = "csvLazyQuotes" HeaderDefineCharOpt = "csvHeaderDefineChar" // fileXML XMLRootPathOpt = "xmlRootPath" // amqp AMQPDefaultConsumerTag = "cgrates" DefaultExchangeType = "direct" AMQPQueueID = "amqpQueueID" AMQPConsumerTag = "amqpConsumerTag" AMQPExchange = "amqpExchange" AMQPExchangeType = "amqpExchangeType" AMQPRoutingKey = "amqpRoutingKey" AMQPUsername = "amqpUsername" AMQPPassword = "amqpPassword" // kafka KafkaDefaultTopic = "cgrates" KafkaDefaultGroupID = "cgrates" KafkaDefaultMaxWait = time.Millisecond KafkaTopic = "kafkaTopic" KafkaBatchSize = "kafkaBatchSize" KafkaTLS = "kafkaTLS" KafkaCAPath = "kafkaCAPath" KafkaSkipTLSVerify = "kafkaSkipTLSVerify" KafkaGroupID = "kafkaGroupID" KafkaMaxWait = "kafkaMaxWait" // partial PartialOpt = "*partial" PartialRatesOpt = "*partial_rates" PartialOrderFieldOpt = "partialOrderField" PartialCacheActionOpt = "partialCacheAction" PartialPathOpt = "partialPath" PartialCSVFieldSepartorOpt = "partialcsvFieldSeparator" // EEs Elasticsearch options ElsIndex = "elsIndex" ElsRefresh = "elsRefresh" ElsOpType = "elsOpType" ElsPipeline = "elsPipeline" ElsRouting = "elsRouting" ElsTimeout = "elsTimeout" ElsWaitForActiveShards = "elsWaitForActiveShards" ElsCAPath = "elsCAPath" ElsDiscoverNodesOnStart = "elsDiscoverNodesOnStart" ElsDiscoverNodeInterval = "elsDiscoverNodeInterval" ElsCloud = "elsCloud" ElsAPIKey = "elsAPIKey" ElsCertificateFingerprint = "elsCertificateFingerprint" ElsServiceToken = "elsServiceToken" ElsUsername = "elsUsername" ElsPassword = "elsPassword" ElsEnableDebugLogger = "elsEnableDebugLogger" ElsLogger = "elsLogger" ElsCompressRequestBody = "elsCompressRequestBody" ElsCompressRequestBodyLevel = "elsCompressRequestBodyLevel" ElsRetryOnStatus = "elsRetryOnStatus" ElsMaxRetries = "elsMaxRetries" ElsDisableRetry = "elsDisableRetry" //EES ElasticSearch Logger Options ElsJson = "elsJson" ElsColor = "elsColor" ElsText = "elsText" // nats NatsSubject = "natsSubject" NatsQueueID = "natsQueueID" NatsConsumerName = "natsConsumerName" NatsStreamName = "natsStreamName" NatsJWTFile = "natsJWTFile" NatsSeedFile = "natsSeedFile" NatsClientCertificate = "natsClientCertificate" NatsClientKey = "natsClientKey" NatsCertificateAuthority = "natsCertificateAuthority" NatsJetStream = "natsJetStream" NatsJetStreamMaxWait = "natsJetStreamMaxWait" // rpc RpcCodec = "rpcCodec" ServiceMethod = "serviceMethod" KeyPath = "keyPath" CertPath = "certPath" CaPath = "caPath" Tls = "tls" ConnIDs = "connIDs" RpcConnTimeout = "rpcConnTimeout" RpcReplyTimeout = "rpcReplyTimeout" RPCAPIOpts = "rpcAPIOpts" )
Poster and Event reader constants
const ( PageLimitOpt = "*pageLimit" PageOffsetOpt = "*pageOffset" PageMaxItemsOpt = "*pageMaxItems" ItemsPrefixOpt = "*itemsPrefix" )
Paginator options
const ( MetaScorch = "*scorch" MetaBoltdb = "*boltdb" MetaLeveldb = "*leveldb" MetaMoss = "*mossdb" RequestStartTime = "RequestStartTime" RequestDuration = "RequestDuration" RequestParams = "RequestParams" Reply = "Reply" ReplyError = "ReplyError" AnzDBDir = "db" Opts = "Opts" )
Analyzers constants
const ( //Common VerboseCgr = "verbose" VersionCgr = "version" QuitCgr = "quit" ExitCgr = "exit" ByeCgr = "bye" CloseCgr = "close" CfgPathCgr = "config_path" DataDBTypeCgr = "datadb_type" DataDBHostCgr = "datadb_host" DataDBPortCgr = "datadb_port" DataDBNameCgr = "datadb_name" DataDBUserCgr = "datadb_user" DataDBPasswdCgr = "datadb_passwd" //Cgr console CgrConsole = "cgr-console" HomeCgr = "HOME" HistoryCgr = "/.cgr_history" RpcEncodingCgr = "rpc_encoding" CertPathCgr = "crt_path" KeyPathCgr = "key_path" CAPathCgr = "ca_path" HelpCgr = "help" SepCgr = " " //Cgr engine CgrEngine = "cgr-engine" PrintCfgCgr = "print_config" CheckCfgCgr = "check_config" PidCgr = "pid" CpuProfDirCgr = "cpuprof_dir" MemProfDirCgr = "memprof_dir" MemProfIntervalCgr = "memprof_interval" MemProfMaxFilesCgr = "memprof_maxfiles" MemProfTimestampCgr = "memprof_timestamp" ScheduledShutdownCgr = "scheduled_shutdown" SingleCpuCgr = "single_cpu" PreloadCgr = "preload" SetVersionsCgr = "set_versions" MemProfFinalFile = "mem_final.prof" CpuPathCgr = "cpu.prof" //Cgr loader CgrLoader = "cgr-loader" CachingArgCgr = "caching" FieldSepCgr = "field_sep" ImportIDCgr = "import_id" DisableReverseCgr = "disable_reverse_mappings" RemoveCgr = "remove" CacheSAddress = "caches_address" SchedulerAddress = "scheduler_address" //Cgr migrator CgrMigrator = "cgr-migrator" ExecCgr = "exec" )
CMD constants
const ( ActionSv1 = "ActionSv1" ActionSv1Ping = "ActionSv1.Ping" ActionSv1ScheduleActions = "ActionSv1.ScheduleActions" ActionSv1ExecuteActions = "ActionSv1.ExecuteActions" )
ActionSv1
const ( NsSuffix = "ns" UsSuffix = "us" MsSuffix = "ms" SSuffix = "s" MSuffix = "m" HSuffix = "h" )
Time duration suffix
const ( ToNearestEven = "*toNearestEven" ToNearestAway = "*toNearestAway" ToZero = "*toZero" AwayFromZero = "*awayFromZero" ToNegativeInf = "*toNegativeInf" ToPositiveInf = "*toPositiveInf" ToNearestTowardZero = "*toNearestTowardZero" )
rounding strings
const ( StateServiceUP = "SERVICE_UP" StateServiceDOWN = "SERVICE_DOWN" )
const ( LOGLEVEL_EMERGENCY = iota LOGLEVEL_ALERT LOGLEVEL_CRITICAL LOGLEVEL_ERROR LOGLEVEL_WARNING LOGLEVEL_NOTICE LOGLEVEL_INFO LOGLEVEL_DEBUG )
log severities following rfc3164
const (
EFsConnsCfg = "efs_conns"
)
Efs
const (
KeysCfg = "keys"
)
APIBanCfg
Variables ¶
var ( MainCDRFields = NewStringSet([]string{Source, OriginHost, OriginID, ToR, RequestType, Tenant, Category, AccountField, Subject, Destination, SetupTime, AnswerTime, Usage, Cost, Rated, Partial, RunID, PreRated, CostSource, CostDetails, ExtraInfo, OrderID}) PostPaidRatedSlice = []string{MetaPostpaid, MetaRated} GitCommitDate string // If set, it will be processed as part of versioning GitCommitHash string // If set, it will be processed as part of versioning DataDBPartitions = NewStringSet([]string{ CacheResourceProfiles, CacheResources, CacheEventResources, CacheIPProfiles, CacheIPAllocations, CacheEventIPs, CacheStatQueueProfiles, CacheStatQueues, CacheThresholdProfiles, CacheThresholds, CacheFilters, CacheRouteProfiles, CacheAttributeProfiles, CacheTrendProfiles, CacheChargerProfiles, CacheActionProfiles, CacheRankingProfiles, CacheRankings, CacheTrends, CacheResourceFilterIndexes, CacheIPFilterIndexes, CacheStatFilterIndexes, CacheThresholdFilterIndexes, CacheRouteFilterIndexes, CacheAttributeFilterIndexes, CacheChargerFilterIndexes, CacheLoadIDs, CacheRateProfiles, CacheRateProfilesFilterIndexes, CacheRateFilterIndexes, CacheActionProfilesFilterIndexes, CacheAccountsFilterIndexes, CacheReverseFilterIndexes, CacheAccounts, }) // CachePartitions enables creation of cache partitions CachePartitions = JoinStringSet(extraDBPartition, DataDBPartitions) CacheInstanceToPrefix = map[string]string{ CacheResourceProfiles: ResourceProfilesPrefix, CacheResources: ResourcesPrefix, CacheIPProfiles: IPProfilesPrefix, CacheIPAllocations: IPAllocationsPrefix, CacheStatQueueProfiles: StatQueueProfilePrefix, CacheStatQueues: StatQueuePrefix, CacheTrendProfiles: TrendProfilePrefix, CacheTrends: TrendPrefix, CacheThresholdProfiles: ThresholdProfilePrefix, CacheThresholds: ThresholdPrefix, CacheFilters: FilterPrefix, CacheRouteProfiles: RouteProfilePrefix, CacheRankingProfiles: RankingPrefix, CacheRankings: RankingProfilePrefix, CacheAttributeProfiles: AttributeProfilePrefix, CacheChargerProfiles: ChargerProfilePrefix, CacheRateProfiles: RateProfilePrefix, CacheActionProfiles: ActionProfilePrefix, CacheAccounts: AccountPrefix, CacheResourceFilterIndexes: ResourceFilterIndexes, CacheIPFilterIndexes: IPFilterIndexes, CacheStatFilterIndexes: StatFilterIndexes, CacheThresholdFilterIndexes: ThresholdFilterIndexes, CacheRouteFilterIndexes: RouteFilterIndexes, CacheAttributeFilterIndexes: AttributeFilterIndexes, CacheChargerFilterIndexes: ChargerFilterIndexes, CacheRateProfilesFilterIndexes: RateProfilesFilterIndexPrfx, CacheActionProfilesFilterIndexes: ActionProfilesFilterIndexPrfx, CacheAccountsFilterIndexes: AccountFilterIndexPrfx, CacheLoadIDs: LoadIDPrefix, CacheRateFilterIndexes: RateFilterIndexPrfx, CacheReverseFilterIndexes: FilterIndexPrfx, MetaAPIBan: MetaAPIBan, } CachePrefixToInstance map[string]string // will be built on init CacheIndexesToPrefix = map[string]string{ CacheThresholdFilterIndexes: ThresholdProfilePrefix, CacheResourceFilterIndexes: ResourceProfilesPrefix, CacheIPFilterIndexes: IPProfilesPrefix, CacheStatFilterIndexes: StatQueueProfilePrefix, CacheRouteFilterIndexes: RouteProfilePrefix, CacheAttributeFilterIndexes: AttributeProfilePrefix, CacheChargerFilterIndexes: ChargerProfilePrefix, CacheRateProfilesFilterIndexes: RateProfilePrefix, CacheActionProfilesFilterIndexes: ActionProfilePrefix, CacheAccountsFilterIndexes: AccountPrefix, CacheReverseFilterIndexes: FilterPrefix, } CacheInstanceToCacheIndex = map[string]string{ CacheThresholdProfiles: CacheThresholdFilterIndexes, CacheResourceProfiles: CacheResourceFilterIndexes, CacheIPProfiles: CacheIPFilterIndexes, CacheStatQueueProfiles: CacheStatFilterIndexes, CacheRouteProfiles: CacheRouteFilterIndexes, CacheAttributeProfiles: CacheAttributeFilterIndexes, CacheChargerProfiles: CacheChargerFilterIndexes, CacheRateProfiles: CacheRateProfilesFilterIndexes, CacheActionProfiles: CacheActionProfilesFilterIndexes, CacheFilters: CacheReverseFilterIndexes, CacheAccounts: CacheAccountsFilterIndexes, } // ProtectedSFlds are the fields that sessions should not alter ProtectedSFlds = NewStringSet([]string{OriginHost, OriginID, Usage}) ConcurrentReqsLimit int ConcurrentReqsStrategy string )
var ( PgSSLModeDisable = "disable" PgSSLModeAllow = "allow" PgSSLModePrefer = "prefer" PgSSLModeRequire = "require" PgSSLModeVerifyCA = "verify-ca" PgSSLModeVerifyFull = "verify-full" )
StorDB
var ( // common MetaRight = "*right" MetaLeft = "*left" // only for strip MetaXRight = "*xright" MetaXLeft = "*xleft" // only for padding MetaZeroLeft = "*zeroleft" )
Strip/Padding strategy
var ( DecimalNaN = &Decimal{} DecimalContext decimal.Context )
var ( ErrNoMoreData = errors.New("NO_MORE_DATA") ErrNotImplemented = errors.New("NOT_IMPLEMENTED") ErrDSPHostNotFound = errors.New("DSP_HOST_NOT_FOUND") ErrDSPProfileNotFound = errors.New("DSP_PROFILE_NOT_FOUND") 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") ErrMaxCostExceeded = errors.New("MAX_COST_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") ErrNotEnoughParameters = errors.New("NotEnoughParameters") ErrNotConnected = errors.New("NOT_CONNECTED") DispatcherErrorPrefix = "DISPATCHER_ERROR" RateSErrPrfx = "RATES_ERROR" ErrNotAuthorized = errors.New("NOT_AUTHORIZED") AccountSErrPrfx = "ACCOUNTS_ERROR" ErrLoggerChanged = errors.New("LOGGER_CHANGED") ErrUnsupportedFormat = errors.New("UNSUPPORTED_FORMAT") ErrNoDatabaseConn = errors.New("NO_DATABASE_CONNECTION") ErrMaxIncrementsExceeded = errors.New("MAX_INCREMENTS_EXCEEDED") ErrIndexOutOfBounds = errors.New("INDEX_OUT_OF_BOUNDS") ErrWrongPath = errors.New("WRONG_PATH") ErrServiceAlreadyRunning = fmt.Errorf("service already running") ErrMaxConcurentRPCExceededNoCaps = errors.New("max concurent rpc exceeded") // on internal we return this error for concureq ErrMaxConcurentRPCExceeded = errors.New("MAX_CONCURENT_RPC_EXCEEDED") // but the codec will rewrite it with this one to be sure that we corectly dealocate the request ErrMaxIterationsReached = errors.New("maximum iterations reached") ErrNegative = errors.New("NEGATIVE") ErrUnsupportedTPExporterType = errors.New("UNSUPPORTED_TPEXPORTER_TYPE") ErrCastFailed = errors.New("CAST_FAILED") ErrCorrelationUndefined = errors.New("CORRELATION_UNDEFINED") ErrUnsupportedServiceID = errors.New(UnsupportedServiceIDCaps) ErrMap = map[string]error{ ErrNoMoreData.Error(): ErrNoMoreData, ErrNotImplemented.Error(): ErrNotImplemented, ErrDSPHostNotFound.Error(): ErrDSPHostNotFound, ErrDSPProfileNotFound.Error(): ErrDSPProfileNotFound, 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, ErrNotEnoughParameters.Error(): ErrNotEnoughParameters, ErrUnsupportedFormat.Error(): ErrUnsupportedFormat, ErrNoDatabaseConn.Error(): ErrNoDatabaseConn, ErrMaxIncrementsExceeded.Error(): ErrMaxIncrementsExceeded, ErrIndexOutOfBounds.Error(): ErrIndexOutOfBounds, ErrWrongPath.Error(): ErrWrongPath, } )
var AnzIndexType = StringSet{ MetaScorch: {}, MetaBoltdb: {}, MetaLeveldb: {}, MetaMoss: {}, MetaInternal: {}, }
var CGROptionsSet = NewStringSet([]string{OptsRatesProfileIDs, OptsRatesStartTime, OptsRatesUsage, OptsSesTTL, OptsSesTTLMaxDelay, OptsSesTTLLastUsed, OptsSesTTLLastUsage, OptsSesTTLUsage, OptsSesDebitInterval, OptsStirATest, OptsStirPayloadMaxDuration, OptsStirIdentity, OptsStirOriginatorTn, OptsStirOriginatorURI, OptsStirDestinationTn, OptsStirDestinationURI, OptsStirPublicKeyPath, OptsStirPrivateKeyPath, OptsAPIKey, OptsRouteID, OptsContext, OptsAttributesProfileIDs, OptsAttributesProcessRuns, OptsAttributesProfileRuns, OptsRoutesLimit, OptsRoutesOffset, OptsRoutesMaxItems, OptsSesChargeable, RemoteHostOpt, MetaCache, OptsThresholdsProfileIDs, OptsRoutesProfilesCount, OptsSesAttributeSDerivedReply, OptsSesBlockerError, OptsRoutesUsage, MetaCDRs, OptsSesCDRsDerivedReply, MetaResources, MetaIPs, OptsSesResourceSAuthorize, OptsSesResourceSAllocate, OptsSesResourceSRelease, OptsSesResourceSDerivedReply, MetaRoutes, OptsSesRouteSDerivedReply, OptsSesStatSDerivedReply, OptsSesSTIRAuthenticate, OptsSesSTIRDerivedReply, OptsSesSTIRInitiate, OptsSesThresholdSDerivedReply, OptsSesMaxUsage, OptsSesForceUsage, OptsSesInitiate, OptsSesUpdate, OptsSesTerminate, OptsSesMessage, MetaAttributes, MetaChargers, OptsCDRsExport, OptsCDRsRefund, OptsCDRsRerate, MetaStats, OptsCDRsStore, MetaThresholds, MetaRates, MetaAccounts, OptsAccountsUsage, OptsStatsProfileIDs, OptsActionsProfileIDs, MetaProfileIgnoreFilters, OptsRoundingDecimals})
CGROptionsSet the possible cgr options
var RoutesDefaultRatio = 1
RoutesDefaultRatio is the default ratio value for routes when none is explicitly specified in the profile. Defined here to avoid circular dependencies with the config package.
var StringTmplType = StringSet{ MetaConstant: struct{}{}, MetaVariable: struct{}{}, MetaComposed: struct{}{}, MetaUsageDifference: struct{}{}, MetaPrefix: struct{}{}, MetaSuffix: struct{}{}, MetaSIPCID: struct{}{}, }
StringTmplType a string set used, by agentRequest and eventRequest to determine if the returned template type is string
Functions ¶
func AESDecrypt ¶
AESDecrypt will decrypt the provided encrypted txt using the encKey and AES algorithm
func AESEncrypt ¶
AESEncrypt will encrypt the provided txt using the encKey and AES algorithm
func BoolPointer ¶
func CastRPCErr ¶
func CheckInLineFilter ¶
func CompilePath ¶
CompilePath returns the path as a slice
func CompilePathSlice ¶
CompilePathSlice returns the path as a slice accepted by DataNode structure field1[field2][index], field3 will become: field1 field2 index field3
func ComputeHash ¶
Hash generates the hash text
func ConcatenatedKey ¶
func DPDynamicInterface ¶ added in v0.10.1
func DPDynamicInterface(dnVal string, dP DataProvider) (any, error)
DPDynamicInterface returns the value of the field if the path is dynamic
func DPDynamicString ¶ added in v0.10.1
func DPDynamicString(dnVal string, dP DataProvider) (string, error)
DPDynamicString returns the string value of the field if the path is dynamic
func DecodeBase64JSON ¶
DecodeBase64JSON decodes the base64 json string in the given interface
func DecodeServerRequest ¶
func Difference ¶
Difference attempts to sum multiple items returns the result or error if not comparable
func Divide ¶
Divide attempts to divide multiple items returns the result or error if not comparable
func DivideBigWithReminder ¶
func EncodeBase64JSON ¶
EncodeBase64JSON encodes the structure in json and then the string in base64
func ErrEnvNotFound ¶
func ErrPathNotReachable ¶
func ErrPrefixNotFound ¶
func FibDuration ¶ added in v0.10.3
FibDuration returns successive Fibonacci numbers as time.Duration with the unit specified by durationUnit or maxDuration if it is exceeded
func FirstIntNonEmpty ¶
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 GenerateDBItemOpts ¶
GenerateDBItemOpts will create the options for DB replication if they are empty they should be omitted
func GetBasicType ¶
func GetCGRVersion ¶
func GetPaginateOpts ¶
GetPaginateOpts retrieves paginate options from the APIOpts map
func GetPathIndex ¶
GetPathIndex returns the path and index if index present path[index]=>path,index path=>path,nil
func GetPathIndexString ¶
GetPathIndexString returns the path and index as string if index present path[index]=>path,index path=>path,nil
func GetReaderFromPath ¶
GetReaderFromPath returns the reader at the given path
func GetRemoteIP ¶
GetRemoteIP returns the IP from http request
func GetTrendLabel ¶
GetTrendLabel determines trend direction based on growth percentage and tolerance. Returns "*positive", "*negative", "*constant", or "N/A" based on the growth value.
func GetUniformType ¶
func GetUniqueCDRID ¶
func GetUrlRawArguments ¶
func GreaterThan ¶
GreaterThan attempts to compare two items returns the result or error if not comparable
func HasPrefixSlice ¶ added in v0.10.2
HasPrefixSlice iterates over slice members and returns true if one the element has that prefix
func IPAllocationsLockKey ¶
IPAllocationsLockKey returns the ID used to lock IP allocations with guardian
func IPProfileLockKey ¶
IPProfileLockKey returns the ID used to lock an IPProfile with guardian
func IfaceAsBool ¶
func IfaceAsFloat64 ¶
func IfaceAsInt ¶
IfaceAsTInt converts interface to type int
func IfaceAsInt64 ¶
func IfaceAsString ¶
func IfaceAsStringSlice ¶
func IfaceAsTInt64 ¶
same function as IfaceAsInt64 but if the value is float round it to int64 instead of returning error
func InfieldSplit ¶
func Int64Pointer ¶
func IntPointer ¶
func IsPathValid ¶
func IsPathValidForExporters ¶
func MapStringStringEqual ¶
func MapStringToInt64 ¶
func MaskSuffix ¶
Mask a number of characters in the suffix of the destination
func MissingStructFields ¶
Detects missing field values based on mandatory field names, s should be a pointer to a struct
func Multiply ¶
Multiply attempts to multiply multiple items returns the result or error if not comparable
func NewBiJSONrpcClient ¶
func NewBiJSONrpcClient(addr string, obj birpc.ClientConnector) (*birpc.BirpcClient, error)
NewBiJSONrpcClient will create a bidirectional JSON client connection
func NewECDSAPrvKey ¶
NewECDSAPrvKey creates a private key from the path
func NewECDSAPrvKeyFromReader ¶
func NewECDSAPrvKeyFromReader(reader io.Reader) (prvKey *ecdsa.PrivateKey, err error)
NewECDSAPrvKeyFromReader creates a private key from io.Reader
func NewECDSAPubKey ¶
NewECDSAPubKey returns a public key from the path
func NewECDSAPubKeyFromReader ¶
NewECDSAPubKeyFromReader returns a public key from io.Reader
func NewErrAccountS ¶
func NewErrAttributeS ¶
func NewErrCDRS ¶
func NewErrChargerS ¶ added in v0.10.1
func NewErrDispatcherS ¶
func NewErrNotConnected ¶
func NewErrRateS ¶
func NewErrResourceS ¶
func NewErrRouteS ¶
func NewErrServerError ¶
func NewErrStatS ¶
func NewErrThresholdS ¶
func NewRoundingMode ¶
func NewRoundingMode(rnd string) (decimal.RoundingMode, error)
func NewSTIRError ¶
NewSTIRError returns a error with a *stir_authorize prefix
func NewServerRequest ¶
func NewServerRequest(method string, params, id json.RawMessage) *serverRequest
NewServerRequest used in registrarc tests
func NewServiceStateTimeoutError ¶
NewServiceTimeoutError is called when waiting
func OptAsStringSlice ¶
func ParseBinarySize ¶
ParseBinarySize converts string byte sizes (b, kb, mb, gb) to byte int64
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 ¶
ParseTimeDetectLayout returns the time from string
func PrefixSliceItems ¶
PrefixSliceItems iterates through slice and add a prefix before every element
func RandomInteger ¶
func RankingProfileLockKey ¶
RankingProfileLockKey returns the ID used to lock a RankingProfile with guardian.
func RankingSortStats ¶
func RankingSortStats(sortingType string, sortingParams []string, Metrics map[string]map[string]float64) (sortedStatIDs []string, err error)
RankingSortStats sorts stat IDs based on their metrics according to the specified sorting strategy.
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 RemoveWhiteSpaces ¶
RemoveWhiteSpaces removes white spaces from string
func ResourceLockKey ¶
ResourceLockKey returns the ID used to lock a resource with guardian
func ResourceProfileLockKey ¶
ResourceProfileLockKey returns the ID used to lock a resourceProfile with guardian
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 RoundStatDuration ¶
RoundStatDuration is used in engine package for stat metrics that has duration (e.g acd metric, tcd metric, etc...)
func RoundingModeToString ¶
func RoundingModeToString(rnd decimal.RoundingMode) string
func SliceStringPointer ¶
func SliceStringToIface ¶
SliceStringToIface converts slice of strings into a slice of interfaces
func SplitConcatenatedKey ¶
func SplitPrefix ¶
func SplitSuffix ¶
func StringPointer ¶
Utilities to provide pointers where we need to define ad-hoc
func StringToInterface ¶
StringToInterface will parse string into supported types if no other conversion possible, original string will be returned
func StructChanTimeout ¶
StructChanTimeout will return true if timeout occurs before struct is received
func ToUnescapedJSON ¶
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 VerifyHash ¶
VerifyHash matches the data hash with the dataKeys ha
func WatchDir ¶
func WatchDir(dirPath string, f func(itmID string) error, sysID string, stopWatching chan struct{}) (err error)
WatchDir sets up a watcher via inotify to be triggered on new files sysID is the subsystem ID, f will be triggered on match
func WriteServerResponse ¶
Types ¶
type APAction ¶
type APAction struct {
ID string // Action ID
FilterIDs []string // Action FilterIDs
TTL time.Duration // Cancel Action if not executed within TTL
Type string // Type of Action
Opts map[string]any // Extra options to pass depending on action type
Diktats []*APDiktat
}
APAction defines action related information used within an ActionProfile.
func (*APAction) FieldAsInterface ¶
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*APAction) FieldAsString ¶
FieldAsString implements the DataProvider interface, retrieving field value as string.
type APDiktat ¶
type APDiktat struct {
Path string // Path to execute
Value string // Value to execute on Path
// contains filtered or unexported fields
}
APDiktat defines a path and value operation to be executed by an action.
func (*APDiktat) FieldAsInterface ¶
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*APDiktat) FieldAsString ¶
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*APDiktat) RSRValues ¶
func (dk *APDiktat) RSRValues() (RSRParsers, error)
RSRValues returns the Value as RSRParsers or creates new ones if not initialized.
type APIAttributeProfile ¶
type APIAttributeProfile struct {
Tenant string
ID string
FilterIDs []string
Blockers DynamicBlockers
//Blocker bool // blocker flag to stop processing on multiple runs
Weights DynamicWeights
Attributes []*ExternalAttribute
}
APIAttributeProfile represents the external representation used by APIs.
func NewAPIAttributeProfile ¶
func NewAPIAttributeProfile(attr *AttributeProfile) (ext *APIAttributeProfile)
NewAPIAttributeProfile creates an external representation from an AttributeProfile.
func (*APIAttributeProfile) AsAttributeProfile ¶
func (ext *APIAttributeProfile) AsAttributeProfile() (attr *AttributeProfile, err error)
AsAttributeProfile converts the external attribute format to the actual AttributeProfile.
type APIAttributeProfileWithAPIOpts ¶
type APIAttributeProfileWithAPIOpts struct {
*APIAttributeProfile
APIOpts map[string]any
}
APIAttributeProfileWithAPIOpts wraps APIAttributeProfile with APIOpts.
type APIEventCharges ¶
type APIEventCharges struct {
Tenant string
APIOpts map[string]any
*EventCharges
}
APIEventCharges is used in APIs, ie: refundCharges
type APIIntervalRate ¶
type APIIntervalRate struct {
IntervalStart string
FixedFee *float64
RecurrentFee *float64
Unit *float64 // RateUnit
Increment *float64 // RateIncrement
}
func (*APIIntervalRate) AsIntervalRate ¶
func (ext *APIIntervalRate) AsIntervalRate() (iRate *IntervalRate, err error)
AsIntervalRate converts APIIntervalRate to IntervalRate
type APIRate ¶
type APIRate struct {
ID string // RateID
FilterIDs []string // RateFilterIDs
ActivationTimes string // ActivationTimes is a cron formatted time interval
Weights string // RateWeights will decide the winner per interval start
Blocker bool // RateBlocker will make this rate recurrent, deactivating further intervals
IntervalRates []*APIIntervalRate
}
type APIRateProfile ¶
type APIRateProfile struct {
*RateProfile
APIOpts map[string]any
}
type Account ¶
type Account struct {
Tenant string
ID string // Account identificator, unique within the tenant
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers
Opts map[string]any
Balances map[string]*Balance
ThresholdIDs []string
}
Account represents one Account on a Tenant
func (*Account) AccountBalancesBackup ¶
func (ap *Account) AccountBalancesBackup() (abb AccountBalancesBackup)
AccountBalancesBackup returns a backup of all balance values
func (*Account) BalancesAltered ¶
func (ap *Account) BalancesAltered(abb AccountBalancesBackup) (altred bool)
BalancesAltered detects altering of the Balances by comparing the Balance values with the ones from backup
func (*Account) CacheClone ¶
CacheClone returns a clone of Account used by ltcache CacheCloner
func (*Account) FieldAsInterface ¶
func (*Account) FieldAsString ¶
func (*Account) RestoreFromBackup ¶
func (ap *Account) RestoreFromBackup(abb AccountBalancesBackup)
type AccountBalancesBackup ¶
AccountBalanceBackups is used to create balance snapshots as backups
type AccountCharge ¶
type AccountCharge struct {
AccountID string
BalanceID string
Units *Decimal
BalanceLimit *Decimal // the minimum balance value accepted
UnitFactorID string // identificator in ChargingUnitFactors
AttributeIDs []string // list of attribute profiles matched
RatingID string // identificator in cost increments
JoinedChargeIDs []string // identificator of extra account charges
}
AccountCharge represents one Account charge
func (*AccountCharge) Clone ¶
func (ac *AccountCharge) Clone() *AccountCharge
Clone returns a copy of ac
func (*AccountCharge) FieldAsInterface ¶
func (ac *AccountCharge) FieldAsInterface(fldPath []string) (any, error)
type AccountWithAPIOpts ¶
type AccountWithLock ¶
AccountWithLock wraps Account with LockID.
type Accounts ¶
type Accounts []*AccountWithLock
Accounts is a collection of AccountWithLock objects
type ActionProfile ¶
type ActionProfile struct {
Tenant string
ID string
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers
Schedule string
Targets map[string]StringSet
Actions []*APAction
}
ActionProfile represents the configuration of an Action profile.
func (*ActionProfile) CacheClone ¶
func (ap *ActionProfile) CacheClone() any
CacheClone returns a clone of ActionProfile used by ltcache CacheCloner
func (*ActionProfile) Clone ¶
func (ap *ActionProfile) Clone() *ActionProfile
Clone clones ActionProfile
func (*ActionProfile) FieldAsInterface ¶
func (ap *ActionProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*ActionProfile) FieldAsString ¶
func (ap *ActionProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*ActionProfile) Merge ¶
func (ap *ActionProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another ActionProfile.
func (*ActionProfile) Set ¶
func (ap *ActionProfile) Set(path []string, val any, newBranch bool) (err error)
Set implements the profile interface, setting values in ActionProfile based on path.
func (*ActionProfile) String ¶
func (ap *ActionProfile) String() string
String implements the DataProvider interface, returning the ActionProfile in JSON format.
func (*ActionProfile) TenantID ¶
func (ap *ActionProfile) TenantID() string
TenantID returns the concatenated tenant and ID.
type ActionProfileWithAPIOpts ¶
type ActionProfileWithAPIOpts struct {
*ActionProfile
APIOpts map[string]any
}
ActionProfileWithAPIOpts wraps ActionProfile with APIOpts.
type ActivationInterval ¶
func (*ActivationInterval) Clone ¶
func (aI *ActivationInterval) Clone() *ActivationInterval
Clone returns a clone of the ActivationInterval
func (*ActivationInterval) Equals ¶
func (aI *ActivationInterval) Equals(actInt *ActivationInterval) (eq bool)
func (*ActivationInterval) IsActiveAtTime ¶
func (ai *ActivationInterval) IsActiveAtTime(atTime time.Time) bool
type ArgCacheReplicateRemove ¶
type ArgCacheReplicateSet ¶
type ArgExportCDRs ¶
type ArgExportCDRs struct {
ExporterIDs []string // exporterIDs is used to said which exporter are using to export the cdrs
Verbose bool // verbose is used to inform the user about the positive and negative exported cdrs
RPCCDRsFilter
}
type ArgExportToFolder ¶
type ArgGetTrend ¶
type ArgScheduleRankingQueries ¶
type ArgScheduleRankingQueries struct {
TenantIDWithAPIOpts
RankingIDs []string
}
type ArgScheduleTrendQueries ¶
type ArgScheduleTrendQueries struct {
TenantIDWithAPIOpts
TrendIDs []string
}
type ArgScheduledRankings ¶
type ArgScheduledRankings struct {
TenantIDWithAPIOpts
RankingIDPrefixes []string
}
type ArgScheduledTrends ¶
type ArgScheduledTrends struct {
TenantIDWithAPIOpts
TrendIDPrefixes []string
}
type ArgsActRemoveBalances ¶
type ArgsActSetBalance ¶
type ArgsFailedPosts ¶
type ArgsFailedPosts struct {
Tenant string
Path string // Path of the exported type
Event any // Event that must be written in file
FailedDir string // Directory that contains the file with Failed post
Module string // Type of efs <*ees|*kafkaLogger>
APIOpts map[string]any // Specially for the meta
}
type ArgsGetCacheItem ¶
type ArgsGetCacheItemIDs ¶
type ArgsGetCacheItemIDsWithAPIOpts ¶
type ArgsGetCacheItemIDsWithAPIOpts struct {
APIOpts map[string]any
Tenant string
ArgsGetCacheItemIDs
}
type ArgsGetCacheItemWithAPIOpts ¶
type ArgsGetCacheItemWithAPIOpts struct {
APIOpts map[string]any
Tenant string
ArgsGetCacheItem
}
type ArgsGetGroup ¶
type ArgsGetGroupWithAPIOpts ¶
type ArgsGetGroupWithAPIOpts struct {
APIOpts map[string]any
Tenant string
ArgsGetGroup
}
type ArgsItemIDs ¶
type ArgsSubItemIDs ¶
type AttrCacheIDsWithAPIOpts ¶
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 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
}
type AttrImportTPFromFolder ¶
type AttrLoadTpFromFolder ¶
type AttrReloadCacheWithAPIOpts ¶
type AttrReloadCacheWithAPIOpts struct {
APIOpts map[string]any `json:",omitempty"`
Tenant string `json:",omitempty"`
ResourceProfileIDs []string `json:",omitempty"`
ResourceIDs []string `json:",omitempty"`
IPProfileIDs []string `json:",omitempty"`
IPIDs []string `json:",omitempty"`
StatsQueueIDs []string `json:",omitempty"`
StatsQueueProfileIDs []string `json:",omitempty"`
ThresholdIDs []string `json:",omitempty"`
ThresholdProfileIDs []string `json:",omitempty"`
TrendIDs []string `json:",omitempty"`
TrendProfileIDs []string `json:",omitempty"`
RankingProfileIDs []string `json:",omitempty"`
RankingIDs []string `json:",omitempty"`
FilterIDs []string `json:",omitempty"`
RouteProfileIDs []string `json:",omitempty"`
AttributeProfileIDs []string `json:",omitempty"`
ChargerProfileIDs []string `json:",omitempty"`
RateProfileIDs []string `json:",omitempty"`
ActionProfileIDs []string `json:",omitempty"`
AccountIDs []string `json:",omitempty"`
AttributeFilterIndexIDs []string `json:",omitempty"`
ResourceFilterIndexIDs []string `json:",omitempty"`
IPFilterIndexIDs []string `json:",omitempty"`
StatFilterIndexIDs []string `json:",omitempty"`
ThresholdFilterIndexIDs []string `json:",omitempty"`
RouteFilterIndexIDs []string `json:",omitempty"`
ChargerFilterIndexIDs []string `json:",omitempty"`
RateProfilesFilterIndexIDs []string `json:",omitempty"`
RateFilterIndexIDs []string `json:",omitempty"`
FilterIndexIDs []string `json:",omitempty"`
ActionProfilesFilterIndexIDs []string `json:",omitempty"`
AccountsFilterIndexIDs []string `json:",omitempty"`
}
func NewAttrReloadCacheWithOpts ¶
func NewAttrReloadCacheWithOpts() *AttrReloadCacheWithAPIOpts
NewAttrReloadCacheWithOpts returns the ArgCache populated with nil
func (*AttrReloadCacheWithAPIOpts) Map ¶
func (a *AttrReloadCacheWithAPIOpts) Map() map[string][]string
type AttrRemoteLock ¶
type Attribute ¶
type Attribute struct {
FilterIDs []string
Blockers DynamicBlockers // Blockers flag to stop processing on multiple attributes from a profile
Path string
Type string
Value RSRParsers
}
Attribute defines a single attribute.
func (*Attribute) FieldAsInterface ¶
FieldAsInterface retrieves field value as interface from Attribute.
func (*Attribute) FieldAsString ¶
FieldAsString retrieves field value as string from Attribute.
type AttributeProfile ¶
type AttributeProfile struct {
Tenant string
ID string
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers // Blockers flag to stop processing on multiple runs
Attributes []*Attribute
}
AttributeProfile defines the configuration of attributes for processing.
func NewAttributeFromInline ¶
func NewAttributeFromInline(tenant, inlnRule string) (attr *AttributeProfile, err error)
NewAttributeFromInline parses an inline rule into a compiled AttributeProfile.
func (*AttributeProfile) CacheClone ¶
func (ap *AttributeProfile) CacheClone() any
CacheClone returns a clone of AttributeProfile used by ltcache CacheCloner
func (*AttributeProfile) Clone ¶
func (ap *AttributeProfile) Clone() *AttributeProfile
Clone method for AttributeProfile struct
func (*AttributeProfile) Compile ¶
func (ap *AttributeProfile) Compile() error
Compile is a wrapper for convenience setting up the AttributeProfile.
func (*AttributeProfile) FieldAsInterface ¶
func (ap *AttributeProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*AttributeProfile) FieldAsString ¶
func (ap *AttributeProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*AttributeProfile) Merge ¶
func (ap *AttributeProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another AttributeProfile.
func (*AttributeProfile) Set ¶
func (ap *AttributeProfile) Set(path []string, val any, newBranch bool) (err error)
Set implements the profile interface, setting values in AttributeProfile based on path.
func (*AttributeProfile) String ¶
func (ap *AttributeProfile) String() string
String implements the DataProvider interface, returning the AttributeProfile in JSON format.
func (*AttributeProfile) TenantID ¶
func (ap *AttributeProfile) TenantID() string
TenantID returns the concatenated tenant and ID.
func (*AttributeProfile) TenantIDInline ¶
func (ap *AttributeProfile) TenantIDInline() string
TenantIDInline returns the ID for inline processing, keeping meta prefixes intact.
type AttributeProfileWithAPIOpts ¶
type AttributeProfileWithAPIOpts struct {
*AttributeProfile
APIOpts map[string]any
}
AttributeProfileWithAPIOpts wraps AttributeProfile with APIOpts.
type BSONMarshaler ¶
type BSONMarshaler struct{}
type Balance ¶
type Balance struct {
ID string // Balance identificator, unique within an Account
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers
Type string
Units *Decimal
UnitFactors []*UnitFactor
Opts map[string]any
CostIncrements []*CostIncrement
AttributeIDs []string
RateProfileIDs []string
}
Balance represents one Balance inside an Account
func NewDefaultBalance ¶
NewDefaultBalance returns a balance with default costIncrements
func (*Balance) FieldAsInterface ¶
func (*Balance) FieldAsString ¶
type BalanceWithWeight ¶
BalanceWithWeight attaches static Weight to Balance
type BalancesWithWeight ¶
type BalancesWithWeight []*BalanceWithWeight
BalancesWithWeight is a sortable list of BalanceWithWeight
func (BalancesWithWeight) Balances ¶
func (bWws BalancesWithWeight) Balances() (blncs []*Balance)
Balances returns the list of Balances
func (BalancesWithWeight) Sort ¶
func (blcs BalancesWithWeight) Sort()
Sort is part of sort interface, sort based on Weight
type BincMarshaler ¶
type BincMarshaler struct {
// contains filtered or unexported fields
}
func NewBincMarshaler ¶
func NewBincMarshaler() *BincMarshaler
type CDR ¶
type CDRFilters ¶
type CDRSQLTable ¶
type CDRSQLTable struct {
ID int64 // this is used for incrementing while seting
Tenant string
Opts JSONB `gorm:"type:jsonb"` //string
Event JSONB `gorm:"type:jsonb"` //string
CreatedAt time.Time `json:",omitempty"`
UpdatedAt time.Time `json:",omitempty"`
DeletedAt *time.Time `json:",omitempty"`
}
func (CDRSQLTable) TableName ¶
func (CDRSQLTable) TableName() string
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
Event map[string]any
APIOpts map[string]any
// contains filtered or unexported fields
}
CGREvent is a generic event processed by CGR services
func CDRsToCGREvents ¶
CDRsToCGREvents converts a slice of *CDR to a slice of *utils.CGREvent.
func NMAsCGREvent ¶
func NMAsCGREvent(nM *OrderedNavigableMap, tnt string, pathSep string, opts MapStorage) (cgrEv *CGREvent)
NMAsCGREvent builds a CGREvent considering Time as time.Now() and Event as linear map[string]any with joined paths treats particular case when the value of map is []*NMItem - used in agents/AgentRequest
func (*CGREvent) AsDataProvider ¶
func (cgrEv *CGREvent) AsDataProvider() (ev MapStorage)
AsDataProvider returns the CGREvent as MapStorage with *opts and *req paths set
func (*CGREvent) CacheClone ¶
CacheClone returns a clone of CGREvent used by ltcache CacheCloner
func (*CGREvent) CheckMandatoryFields ¶
func (*CGREvent) FieldAsDuration ¶
FieldAsDuration returns a field as Duration instance
func (*CGREvent) FieldAsString ¶
FieldAsString returns a field as string instance
func (*CGREvent) FieldAsTime ¶
FieldAsTime returns a field as Time instance
func (*CGREvent) OptAsInt64 ¶
OptAsInt64 returns an option as int64
func (*CGREvent) SetCloneable ¶
SetCloneable sets if the args should be clonned on internal connections
type CGREventWithEeIDs ¶
CGREventWithEeIDs is the CGREventWithOpts with EventExporterIDs
func (CGREventWithEeIDs) RPCClone ¶
func (CGREventWithEeIDs) RPCClone()
type CGREventWithRateProfile ¶
CGREventWithRateProfile is used to get the rates prom a specific RatePRofileID that is matching our Event
type CachedRPCResponse ¶
CachedRPCResponse is used to cache a RPC response
type CgrIORecordWriter ¶
type CgrIORecordWriter struct {
// contains filtered or unexported fields
}
CgrIORecordWriter implements CgrRecordWriter
func NewNopFlushWriter ¶
func NewNopFlushWriter(w io.Writer) *CgrIORecordWriter
NewNopFlushWriter 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 ChargeEntry ¶
ChargeEntry is a reference towards Accounting or Rating ID (depending on request type)
func (*ChargeEntry) CompressEquals ¶
func (cE *ChargeEntry) CompressEquals(chEn *ChargeEntry) bool
Equals return the equality between two ChargeEntry ignoring CompressFactor
func (*ChargeEntry) FieldAsInterface ¶
func (ce *ChargeEntry) FieldAsInterface(fldPath []string) (_ any, err error)
type ChargerProfile ¶
type ChargerProfile struct {
Tenant string
ID string
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers
RunID string
AttributeIDs []string // perform data aliasing based on these Attributes
}
ChargerProfile defines the configuration of a Charger.
func (*ChargerProfile) CacheClone ¶
func (cp *ChargerProfile) CacheClone() any
CacheClone returns a clone of ChargerProfile used by ltcache CacheCloner
func (*ChargerProfile) Clone ¶
func (cp *ChargerProfile) Clone() *ChargerProfile
Clone method for ChargerProfile
func (*ChargerProfile) FieldAsInterface ¶
func (cp *ChargerProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*ChargerProfile) FieldAsString ¶
func (cp *ChargerProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*ChargerProfile) Merge ¶
func (cp *ChargerProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another ChargerProfile.
func (*ChargerProfile) Set ¶
func (cp *ChargerProfile) Set(path []string, val any, newBranch bool) (err error)
Set implements the profile interface, setting values in ChargerProfile based on path.
func (*ChargerProfile) String ¶
func (cp *ChargerProfile) String() string
String implements the DataProvider interface, returning the ChargerProfile in JSON format.
func (*ChargerProfile) TenantID ¶
func (cp *ChargerProfile) TenantID() string
TenantID returns the concatenated tenant and ID.
type ChargerProfileWithAPIOpts ¶
type ChargerProfileWithAPIOpts struct {
*ChargerProfile
APIOpts map[string]any
}
ChargerProfileWithAPIOpts wraps ChargerProfile with APIOpts.
type CodecMsgpackMarshaler ¶
type CodecMsgpackMarshaler struct {
// contains filtered or unexported fields
}
func NewCodecMsgpackMarshaler ¶
func NewCodecMsgpackMarshaler() *CodecMsgpackMarshaler
type Compiler ¶
type Compiler interface {
Compile() error
}
Compiler are objects that need post compiling
type CostIncrement ¶
type CostIncrement struct {
FilterIDs []string
Increment *Decimal
FixedFee *Decimal
RecurrentFee *Decimal
}
CostIncrement enforces cost calculation to specific balance increments
func (*CostIncrement) Clone ¶
func (cI *CostIncrement) Clone() (cIcln *CostIncrement)
Clone returns a copy of the CostIncrement
func (*CostIncrement) Equals ¶
func (cI *CostIncrement) Equals(ctIn *CostIncrement) (eq bool)
Equals returns the equality between two CostIncrement
func (*CostIncrement) FieldAsInterface ¶
func (cI *CostIncrement) FieldAsInterface(fldPath []string) (_ any, err error)
func (*CostIncrement) FieldAsString ¶
func (cI *CostIncrement) FieldAsString(fldPath []string) (_ string, err error)
func (*CostIncrement) String ¶
func (cI *CostIncrement) String() string
type Counter ¶
func NewCounter ¶
type DataConverter ¶
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 NewRandomConverter ¶
func NewRandomConverter(params string) (dflr DataConverter, err error)
func NewRoundConverter ¶
func NewRoundConverter(params string) (hdlr DataConverter, err error)
func NewStripConverter ¶
func NewStripConverter(params string) (DataConverter, error)
NewStripConverter initializes and returns a new StripConverter with configurations based on the provided parameters in the input string. Each parameter in the input string should be separated by ':'.
The input string must follow one of the following formats:
- "*strip:<side>:<amount>"
- "*strip:<side>:<substring>[:<amount>]"
- "*strip:<side>:*char:<substring>[:<amount>]"
Explanation of placeholders:
- <side>: Specifies which part of the string to strip. Must be one of "*prefix", "*suffix", or "*both".
- <substring>: Identifies the substring to remove. It can be a specific string, "*nil" for null characters, "*space" for spaces, or any other character.
- <amount> (optional): Determines the number of characters to remove. If omitted, all instances of <substring> are removed.
Examples:
- "*strip:*prefix:5": Removes the first 5 characters from the string's prefix.
- "*strip:*suffix:*nil": Eliminates all trailing null characters in the string.
- "*strip:*both:*space:2": Clears 2 spaces from both the prefix and suffix of the string.
- "*strip:*suffix:*char:abc": Removes the substring "abc" from the suffix of the string.
- "*strip:*prefix:*char:abc:2": Strips the substring "abc" from the prefix of the string, repeated 2 times.
func NewTimeStringConverter ¶
func NewTimeStringConverter(params string) (hdlr DataConverter)
type DataConverters ¶
type DataConverters []DataConverter
DataConverters groups together multiple converters, executing optimized conversions
func (DataConverters) ConvertInterface ¶
func (dcs DataConverters) ConvertInterface(in any) (out any, err error)
ConvertString converts from and to string
func (DataConverters) ConvertString ¶
func (dcs DataConverters) ConvertString(in string) (out string, err error)
ConvertString converts from and to string
type DataLeaf ¶
type DataLeaf struct {
Data any // value of the element
// the config of the leaf
NewBranch bool `json:",omitempty"`
AttributeID string `json:",omitempty"`
}
DataLeaf is an item in the DataNode
type DataNode ¶
type DataNode struct {
Type NMType `json:"-"`
Map map[string]*DataNode `json:",omitempty"`
Slice []*DataNode `json:",omitempty"`
Value *DataLeaf `json:",omitempty"`
}
DataNode a structure for storing data
func NewDataNode ¶
NewDataNode using the compiled path creates a node
func NewLeafNode ¶
NewLeafNode creates a leaf node with given value
func (*DataNode) Append ¶
Append will append the value at de specified path the path should be in the same format as the path given to Field
func (*DataNode) Compose ¶
Compose will string compose the value at de specified path with the given value the path should be in the same format as the path given to Field
func (*DataNode) Field ¶
Field returns the DataLeaf found at path if at the end of the path is not a DataLeaf return an error
func (*DataNode) FieldAsInterface ¶
FieldAsInterface will compile the given path and return the node value at the end of the path this function is used most probably by filters so expect the path to not be compiled
type DataProvider ¶ added in v0.10.1
type DataProvider interface {
String() string // printable version of data
FieldAsInterface(fldPath []string) (any, error)
FieldAsString(fldPath []string) (string, error) // remove this
}
DataProvider is a data source from multiple formats
type DataStorage ¶
type DataStorage interface {
DataProvider
Set(fldPath []string, val any) error
Remove(fldPath []string) error
GetKeys(nested bool, nesteedLimit int, prefix string) []string
}
DataStorage is the DataProvider that can be updated
type Decimal ¶
func DivideDecimal ¶
DivideDecimal divides two Decimals and returns the result
func MultiplyDecimal ¶
MultiplyDecimal multiples two Decimals and returns the result
func NewDecimal ¶
NewDecimal is a constructor for Decimal, following the one of decimal.Big
func NewDecimalFromFloat64 ¶
NewDecimalFromFloat64 is a constructor for Decimal out of float64 passing through string is necessary due to differences between decimal and binary representation of float64
func NewDecimalFromString ¶
NewDecimalFromString converts a string to decimal
func NewDecimalFromStringIgnoreError ¶
NewDecimalFromStringIgnoreError same as above but ignore error( for test only)
func NewDecimalFromUsage ¶
NewDecimalFromUsage is a constructor for Decimal out of unit represents as string
func NewDecimalFromUsageIgnoreErr ¶
NewDecimalFromUsage is a constructor for Decimal out of unit represents as string
func SubstractDecimal ¶
func SumDecimal ¶
sumDecimal adds two Decimals and returns the result
func (*Decimal) MarshalBinary ¶
MarshalBinary implements the method for binaryMarshal interface for Msgpack encoding
func (*Decimal) MarshalJSON ¶
MarshalJSON implements the method for jsonMarshal for JSON encoding
func (*Decimal) Round ¶
Round rounds d down to the Context's precision and returns Decimal. The result is undefined if d is not finite. The result of Round will always be within the interval [⌊10**x⌋, d] where x = the precision of d.
func (*Decimal) UnmarshalBinary ¶
UnmarshalBinary implements the method for binaryUnmarshal interface for Msgpack encoding
func (*Decimal) UnmarshalJSON ¶
UnmarshalJSON implements the method for jsonUnmarshal for JSON encoding
type DirectoryArgs ¶
type DivideConverter ¶
type DivideConverter struct {
Value float64
}
DivideConverter divides input with value in params encapsulates the output as float64 value
type DurationArgs ¶ added in v0.10.3
type DurationConverter ¶
type DurationConverter struct{}
DurationConverter converts duration into seconds encapsulated in float64
type DurationNanosecondsConverter ¶
type DurationNanosecondsConverter struct{}
DurationNanosecondsConverter converts duration into nanoseconds encapsulated in int64
type DurationSecondsConverter ¶
type DurationSecondsConverter struct{}
DurationSecondsConverter converts duration into seconds encapsulated in float64
type DynamicBlocker ¶
func (*DynamicBlocker) Clone ¶
func (blckr *DynamicBlocker) Clone() (cln *DynamicBlocker)
Clone will clone the a DynamicBlocker
func (*DynamicBlocker) FieldAsInterface ¶
func (dB *DynamicBlocker) FieldAsInterface(fldPath []string) (any, error)
func (DynamicBlocker) String ¶
func (blckr DynamicBlocker) String(blkSep, fltrSep string) (out string)
String will set the DynamicBlocker as a string pattern
type DynamicBlockers ¶
type DynamicBlockers []*DynamicBlocker
func NewDynamicBlockersFromString ¶
func NewDynamicBlockersFromString(value, blkSep, fltrSep string) (blkrs DynamicBlockers, err error)
NewDynamicBlockersFromString will build the Blockers that contains slices of FilterIDs and Blocker from a single value. This process is helped by separators
func (DynamicBlockers) Clone ¶
func (blckrs DynamicBlockers) Clone() (clBlkrs DynamicBlockers)
Clone will clone the Blockers
func (DynamicBlockers) String ¶
func (blkrs DynamicBlockers) String(blkSep, fltrSep string) (value string)
String will set the Blockers as a string pattern
type DynamicWeight ¶
DynamicWeight returns Weight based on Filters
func (*DynamicWeight) Clone ¶
func (dW *DynamicWeight) Clone() (cln *DynamicWeight)
func (*DynamicWeight) Equals ¶
func (dW *DynamicWeight) Equals(dnWg *DynamicWeight) (eq bool)
func (*DynamicWeight) FieldAsInterface ¶
func (dW *DynamicWeight) FieldAsInterface(fldPath []string) (any, error)
func (DynamicWeight) String ¶
func (dW DynamicWeight) String(dWSep, fltrsep string) (out string)
type DynamicWeights ¶
type DynamicWeights []*DynamicWeight
func NewDynamicWeightsFromString ¶
func NewDynamicWeightsFromString(s, dWSep, fltrSep string) (dWs DynamicWeights, err error)
NewDynamicWeightsFromString creates a DynamicWeight list based on the string received from .csv
func (DynamicWeights) Clone ¶
func (dW DynamicWeights) Clone() (dinWeight DynamicWeights)
func (DynamicWeights) String ¶
func (dWS DynamicWeights) String(dWSep, fltrsep string) (out string)
type EventCharges ¶
type EventCharges struct {
Abstracts *Decimal // total abstract units charged
Concretes *Decimal // total concrete units charged
Charges []*ChargeEntry
Accounting map[string]*AccountCharge
UnitFactors map[string]*UnitFactor
Rating map[string]*RateSInterval
Rates map[string]*IntervalRate
Accounts map[string]*Account
}
EventCharges records the charges applied to an Event
func NewEventCharges ¶
func NewEventCharges() (ec *EventCharges)
NewEventChargers instantiates the EventChargers in a central place
func (*EventCharges) Clone ¶
func (ec *EventCharges) Clone() *EventCharges
Clone returns a copy of ec
func (*EventCharges) Equals ¶
func (eC *EventCharges) Equals(evCh *EventCharges) (eq bool)
Equals returns the equality between two EventCharges
func (*EventCharges) FieldAsInterface ¶
func (ec *EventCharges) FieldAsInterface(fldPath []string) (any, error)
FieldAsInterface retrieves a value of a field based on its path from within an *EventCharges value. Needed in order to satisfy the DataProvider interface.
func (*EventCharges) FieldAsString ¶
func (ec *EventCharges) FieldAsString(fldPath []string) (string, error)
func (*EventCharges) Merge ¶
func (ec *EventCharges) Merge(eCs ...*EventCharges)
Merge will merge the event charges into existing
func (*EventCharges) String ¶
func (ec *EventCharges) String() string
String returns the string representation of an *EventCharges value. Needed in order to satisfy the DataProvider interface.
func (*EventCharges) SyncIDs ¶
func (ec *EventCharges) SyncIDs(eCs ...*EventCharges)
SyncIDs will repopulate Accounting, UnitFactors and Rating IDs if they equal the references in ec
type ExportedTPStats ¶
type ExternalAttribute ¶
type ExternalAttribute struct {
FilterIDs []string
Blockers DynamicBlockers
Path string
Type string
Value string
}
ExternalAttribute represents the API-facing attribute structure.
type FlagParams ¶
FlagParams stores the parameters for a flag
func (FlagParams) Clone ¶
func (fWp FlagParams) Clone() (cln FlagParams)
Clone returns a deep copy of FlagParams
func (FlagParams) Has ¶
func (fWp FlagParams) Has(opt string) (has bool)
Has returns if the key was mentioned in flags
func (FlagParams) ParamValue ¶
func (fWp FlagParams) ParamValue(opt string) (ps string)
ParamValue returns the value of the flag
func (FlagParams) ParamsSlice ¶
func (fWp FlagParams) ParamsSlice(opt string) (ps []string)
ParamsSlice returns the list of profiles for the subsystem
func (FlagParams) SliceFlags ¶
func (fWp FlagParams) SliceFlags() (sls []string)
SliceFlags converts from FlagsParams to []string
type FlagsWithParams ¶
type FlagsWithParams map[string]FlagParams
FlagsWithParams should store a list of flags for each subsystem
func FlagsWithParamsFromSlice ¶
func FlagsWithParamsFromSlice(s []string) (flags FlagsWithParams)
FlagsWithParamsFromSlice construct a FlagsWithParams from the given slice
func (FlagsWithParams) Clone ¶
func (fWp FlagsWithParams) Clone() (cln FlagsWithParams)
Clone returns a deep copy of FlagsWithParams
func (FlagsWithParams) GetBool ¶
func (fWp FlagsWithParams) GetBool(key string) (b bool)
GetBool returns the flag as boolean
func (FlagsWithParams) Has ¶
func (fWp FlagsWithParams) Has(flag string) (has bool)
Has returns if the key was mentioned in flags
func (FlagsWithParams) ParamValue ¶ added in v0.10.3
func (fWp FlagsWithParams) ParamValue(subs string) (ps string)
ParamValue returns the value of the flag
func (FlagsWithParams) ParamsSlice ¶
func (fWp FlagsWithParams) ParamsSlice(subs, opt 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 Float64Converter ¶
type Float64Converter struct{}
type FullPath ¶ added in v0.10.1
FullPath is the path to the item with all the needed fields
func GetFullFieldPath ¶
func GetFullFieldPath(fldPath string, dP DataProvider) (fpath *FullPath, err error)
GetFullFieldPath returns the full path for the
func NewFullPath ¶
NewFullPath is a constructor for FullPath out of string
type GOBMarshaler ¶
type GOBMarshaler struct{}
type GetIndexesArg ¶
type GetIndexesArg struct {
IdxItmType string
TntCtx string
IdxKey string
Tenant string
APIOpts map[string]any
}
GetIndexesArg the API argumets to specify an index
type GigawordsConverter ¶
type GigawordsConverter struct{}
GigawordsConverter converts a value in Gigawords to octects
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
func (HierarchyPath) AsString ¶
func (hP HierarchyPath) AsString(sep string, isAbsolute bool) string
AsString converts HierarchyPath to a string.
func (HierarchyPath) Clone ¶
func (h HierarchyPath) Clone() (cln HierarchyPath)
Clone returns a deep copy of HierarchyPath
type IP2HexConverter ¶ added in v0.10.2
type IP2HexConverter struct{}
IP2HexConverter will transform ip to hex
type IPAllocations ¶
IPAllocations represents IP allocations with usage tracking and TTL management.
func (*IPAllocations) CacheClone ¶
func (a *IPAllocations) CacheClone() any
CacheClone returns a clone of IPAllocations object used by ltcache CacheCloner.
func (*IPAllocations) Clone ¶
func (a *IPAllocations) Clone() *IPAllocations
Clone clones IPAllocations object (lkID excluded)
func (*IPAllocations) TenantID ¶
func (a *IPAllocations) TenantID() string
TenantID returns the unique ID in a multi-tenant environment
type IPAllocationsWithAPIOpts ¶
type IPAllocationsWithAPIOpts struct {
*IPAllocations
APIOpts map[string]any
}
IPAllocationsWithAPIOpts wraps IPAllocations with APIOpts.
type IPPool ¶
type IPPool struct {
ID string
FilterIDs []string
Type string
Range string
Strategy string
Message string
Weights DynamicWeights
Blockers DynamicBlockers
}
type IPProfile ¶
type IPProfile struct {
Tenant string
ID string
FilterIDs []string
Weights DynamicWeights
TTL time.Duration
Stored bool
Pools []*IPPool
}
IPProfile defines the configuration of an IPAllocations object.
func (*IPProfile) CacheClone ¶
CacheClone returns a clone of IPProfile used by ltcache CacheCloner
func (*IPProfile) FieldAsInterface ¶
func (*IPProfile) FieldAsString ¶
type IPProfileWithAPIOpts ¶
IPProfileWithAPIOpts wraps IPProfile with APIOpts.
type IPUsage ¶
IPUsage represents a usage count.
type IntervalRate ¶
type IntervalRate struct {
IntervalStart *Decimal // Starting point when the Rate kicks in
FixedFee *Decimal
RecurrentFee *Decimal
Unit *Decimal // RateUnit
Increment *Decimal // RateIncrement
}
func (*IntervalRate) Clone ¶
func (iR *IntervalRate) Clone() *IntervalRate
Clone returns a copy of iR
func (*IntervalRate) Equals ¶
func (iR *IntervalRate) Equals(inRt *IntervalRate) (eq bool)
Equals returns the equality between two IntervalRate
func (*IntervalRate) FieldAsInterface ¶
func (iR *IntervalRate) FieldAsInterface(fldPath []string) (_ any, err error)
func (*IntervalRate) FieldAsString ¶
func (iR *IntervalRate) FieldAsString(fldPath []string) (_ string, err error)
func (*IntervalRate) Merge ¶
func (ivalRate *IntervalRate) Merge(v2 *IntervalRate)
func (*IntervalRate) String ¶
func (iR *IntervalRate) String() string
type JSONB ¶
JSONB type for storing maps of events and opts into gorm columns as jsob type
func (JSONB) GormDataType ¶
type JSONBufMarshaler ¶
type JSONBufMarshaler struct{}
type JSONMarshaler ¶
type JSONMarshaler struct{}
type LengthConverter ¶
type LengthConverter struct{}
LengthConverter returns the lenght of the slice
type LoadIDsWithAPIOpts ¶
type LoadInstance ¶
type LoggerInterface ¶
type LoggerInterface interface {
GetSyslog() *syslog.Writer
SetLogLevel(level int)
GetLogLevel() int
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 MapStorage ¶ added in v0.10.2
MapStorage is the basic dataStorage
func NewMapFromCSV ¶
func NewMapFromCSV(str string) (MapStorage, error)
func (MapStorage) Clone ¶
func (ms MapStorage) Clone() (msClone MapStorage)
func (MapStorage) FieldAsInterface ¶ added in v0.10.2
func (ms MapStorage) FieldAsInterface(fldPath []string) (val any, err error)
FieldAsInterface returns the value from the path
func (MapStorage) FieldAsString ¶ added in v0.10.2
func (ms MapStorage) FieldAsString(fldPath []string) (str string, err error)
FieldAsString returns the value from path as string
func (MapStorage) GetKeys ¶ added in v0.10.2
func (ms MapStorage) GetKeys(nested bool, nestedLimit int, prefix string) (keys []string)
GetKeys returns all the keys from map
func (MapStorage) Remove ¶ added in v0.10.2
func (ms MapStorage) Remove(fldPath []string) (err error)
Remove removes the item at path
func (MapStorage) Set ¶ added in v0.10.2
func (ms MapStorage) Set(fldPath []string, val any) (err error)
Set sets the value at the given path
func (MapStorage) String ¶ added in v0.10.2
func (ms MapStorage) String() string
String returns the map as json string
type Marshaler ¶
func NewMarshaler ¶
NewMarshaler returns the marshaler type selected by mrshlerStr
type MetricWithFilters ¶
MetricWithFilters is used in TPStatProfile
type MetricWithTrend ¶
type MetricWithTrend struct {
ID string // Metric ID
Value float64 // Metric Value
TrendGrowth float64 // Difference between last and previous
TrendLabel string // *positive, *negative, *constant, N/A
}
MetricWithTrend contains a metric value with its calculated trend info.
func (*MetricWithTrend) Clone ¶
func (m *MetricWithTrend) Clone() *MetricWithTrend
type MonthDays ¶
type MonthDays []int
Defines month days series
type Months ¶
Defines months series
type MultiplyConverter ¶
type MultiplyConverter struct {
Value float64
}
MultiplyConverter multiplies input with value in params encapsulates the output as float64 value
type NavigableMapper ¶ added in v0.10.1
type NavigableMapper interface {
}
NavigableMapper is the interface supported by replies convertible to CGRReply
type NopFlushWriter ¶
NopFlushWriter is a writer for one line, compatible with csv.Writer interface on Write Used in TP exporter
type ObjectDP ¶
type ObjectDP struct {
// contains filtered or unexported fields
}
ObjectDP implements the DataProvider for any any
func (*ObjectDP) FieldAsInterface ¶
FieldAsInterface is part of engine.DataProvider interface
func (*ObjectDP) FieldAsString ¶
FieldAsString is part of engine.DataProvider interface
type OrderedMap ¶ added in v0.10.3
type OrderedMap[K comparable, V any] struct { // contains filtered or unexported fields }
OrderedMap is a map that maintains the order of its key-value pairs.
func NewOrderedMap ¶ added in v0.10.3
func NewOrderedMap[K comparable, V any]() *OrderedMap[K, V]
NewOrderedMap creates a new ordered map and returns a pointer to it.
func (*OrderedMap[K, V]) Delete ¶ added in v0.10.3
func (om *OrderedMap[K, V]) Delete(key K)
Delete removes the key-value pair associated with the given key from the ordered map.
func (*OrderedMap[K, V]) Get ¶ added in v0.10.3
func (om *OrderedMap[K, V]) Get(key K) (V, bool)
Get retrieves the value associated with the given key from the ordered map. It returns the value and a boolean indicating whether the key exists in the map.
func (*OrderedMap[K, V]) GetByIndex ¶
func (om *OrderedMap[K, V]) GetByIndex(index int) (K, V, bool)
GetByIndex returns the key-value pair at the specified index within the ordered map. If the index is out of bounds, the zero values for K and V are returned with a false flag.
func (*OrderedMap[K, V]) Keys ¶ added in v0.10.3
func (om *OrderedMap[K, V]) Keys() []K
Keys returns all keys of the ordered map in order of their insertion.
func (*OrderedMap[K, V]) Map ¶
func (om *OrderedMap[K, V]) Map() map[K]V
Map returns a deep copy of the ordered map's key-value pairs.
func (*OrderedMap[K, V]) Set ¶ added in v0.10.3
func (om *OrderedMap[K, V]) Set(key K, value V)
Set adds a new key-value pair to the ordered map. If the key already exists, it updates the value.
func (*OrderedMap[K, V]) Values ¶ added in v0.10.3
func (om *OrderedMap[K, V]) Values() []V
Values returns all values of the ordered map in the order of their corresponding keys' insertion.
type OrderedNavigableMap ¶ added in v0.10.1
type OrderedNavigableMap struct {
// contains filtered or unexported fields
}
OrderedNavigableMap is the same as DataNode but keeps the order of fields
func NewOrderedNavigableMap ¶ added in v0.10.1
func NewOrderedNavigableMap() *OrderedNavigableMap
NewOrderedNavigableMap initializates a structure of OrderedNavigableMap with a DataNode
func (*OrderedNavigableMap) Append ¶
func (onm *OrderedNavigableMap) Append(fullPath *FullPath, val *DataLeaf) (err error)
Append appends the leaf at the given path the end must be a slice this used with full path and the processed path to not calculate them for every set
func (*OrderedNavigableMap) Compose ¶
func (onm *OrderedNavigableMap) Compose(fullPath *FullPath, val *DataLeaf) (err error)
Compose compose the value of the leaf at the given path this used with full path and the processed path to not calculate them for every set
func (*OrderedNavigableMap) Empty ¶ added in v0.10.1
func (onm *OrderedNavigableMap) Empty() bool
Empty returns true if the NM is empty(no data)
func (*OrderedNavigableMap) Field ¶ added in v0.10.1
func (onm *OrderedNavigableMap) Field(fldPath []string) (val *DataLeaf, err error)
Field returns the item on the given path
func (*OrderedNavigableMap) FieldAsInterface ¶ added in v0.10.1
func (onm *OrderedNavigableMap) FieldAsInterface(fldPath []string) (iface any, err error)
FieldAsInterface returns the interface at the path
func (*OrderedNavigableMap) FieldAsString ¶ added in v0.10.1
func (onm *OrderedNavigableMap) FieldAsString(fldPath []string) (str string, err error)
FieldAsString returns the value from path as string
func (*OrderedNavigableMap) GetFirstElement ¶ added in v0.10.1
func (onm *OrderedNavigableMap) GetFirstElement() *PathItemElement
GetFirstElement returns the first element from the order
func (*OrderedNavigableMap) GetOrder ¶ added in v0.10.1
func (onm *OrderedNavigableMap) GetOrder() (order [][]string)
GetOrder returns the elements order as a slice
func (*OrderedNavigableMap) Interface ¶ added in v0.10.1
func (onm *OrderedNavigableMap) Interface() any
Interface returns navigble map that's inside
func (*OrderedNavigableMap) OrderedFields ¶
func (onm *OrderedNavigableMap) OrderedFields() (flds []any)
OrderedFields returns the elements in order they were inserted
func (*OrderedNavigableMap) OrderedFieldsAsStrings ¶
func (onm *OrderedNavigableMap) OrderedFieldsAsStrings() (flds []string)
OrderedFieldsAsStrings returns the elements as strings in order they were inserted
func (*OrderedNavigableMap) Remove ¶ added in v0.10.1
func (onm *OrderedNavigableMap) Remove(fullPath *FullPath) (err error)
Remove removes the item for the given path and updates the order
func (*OrderedNavigableMap) RemoveAll ¶ added in v0.10.1
func (onm *OrderedNavigableMap) RemoveAll()
RemoveAll will clean the data and the odrder from OrderedNavigableMap
func (*OrderedNavigableMap) Set ¶ added in v0.10.1
func (onm *OrderedNavigableMap) Set(fullPath *FullPath, val any) (err error)
Set sets the value at the given path this used with full path and the processed path to not calculate them for every set used in tests
func (*OrderedNavigableMap) SetAsSlice ¶
func (onm *OrderedNavigableMap) SetAsSlice(fullPath *FullPath, vals []*DataNode) (err error)
SetAsSlice sets the slice of nodes at the given path this used with full path and the processed path to not calculate them for every set this is used by agent request to overwrite the slice at path
func (*OrderedNavigableMap) String ¶ added in v0.10.1
func (onm *OrderedNavigableMap) String() string
String returns the map as json string
type PASSporTDestinationsIdentity ¶
type PASSporTDestinationsIdentity struct {
Tn []string `json:"tn,omitempty"` // the telephone numbers
URI []string `json:"uri,omitempty"` // the identities in URI form
}
PASSporTDestinationsIdentity is the destination identities of any type
func NewPASSporTDestinationsIdentity ¶
func NewPASSporTDestinationsIdentity(tn, uri []string) *PASSporTDestinationsIdentity
NewPASSporTDestinationsIdentity returns a new PASSporTDestinationsIdentity with the given ids
type PASSporTHeader ¶
type PASSporTHeader struct {
Typ string `json:"typ"` // the media type MUST be the string "passport"
Alg string `json:"alg"` // the cryptographic algorithm for the signature part
Ppt string `json:"ppt"` // the extension that is used this is optional
X5u string `json:"x5u"` // the URI referring to the resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS
}
PASSporTHeader is the JOSE header for PASSporT claim
func NewPASSporTHeader ¶
func NewPASSporTHeader(x5uVal string) *PASSporTHeader
NewPASSporTHeader returns a new PASSporT headder with: extension shaken, ES256 algorithm and the given x5u
type PASSporTOriginsIdentity ¶
type PASSporTOriginsIdentity struct {
Tn string `json:"tn,omitempty"` // the telephone number
URI string `json:"uri,omitempty"` // the identity in URI form
}
PASSporTOriginsIdentity is the origin identities of any type
func NewPASSporTOriginsIdentity ¶
func NewPASSporTOriginsIdentity(tn, uri string) *PASSporTOriginsIdentity
NewPASSporTOriginsIdentity returns a new PASSporTOriginsIdentity with the given id
type PASSporTPayload ¶
type PASSporTPayload struct {
ATTest string `json:"attest"` // the atestation value: 'A', 'B', or 'C'.These values correspond to 'Full Attestation', 'Partial Attestation', and 'Gateway Attestation', respectively. Not used for verification
Dest PASSporTDestinationsIdentity `json:"dest"` // the destinations identity
IAT int64 `json:"iat"` // is the date and time of issuance of the JWT
Orig PASSporTOriginsIdentity `json:"orig"` // the originator identity
OrigID string `json:"origid"` // is an opaque unique identifier representing an element on the path of a given SIP request. Not used for verification
}
PASSporTPayload is the JOSE claim for PASSporT
func NewPASSporTPayload ¶
func NewPASSporTPayload(attest, originID string, dest PASSporTDestinationsIdentity, orig PASSporTOriginsIdentity) *PASSporTPayload
NewPASSporTPayload returns an new PASSporTPayload with the given origin and destination
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)
MaxItems *int
}
Paginate stuff around items returned
type PaginatorWithSearch ¶
type PanicMessageArgs ¶
type PathItemElement ¶ added in v0.10.1
type PathItemElement struct {
// The value stored with this element.
Value []string
// contains filtered or unexported fields
}
PathItemElement is an element of a linked list. Inspired by Go's double linked list
func (*PathItemElement) Next ¶ added in v0.10.1
func (e *PathItemElement) Next() *PathItemElement
Next returns the next list element or nil.
func (*PathItemElement) Prev ¶ added in v0.10.1
func (e *PathItemElement) Prev() *PathItemElement
Prev returns the previous list element or nil.
type PathItemList ¶ added in v0.10.1
type PathItemList struct {
// contains filtered or unexported fields
}
PathItemList represents a doubly linked list. The zero value for PathItemList is an empty list ready to use.
func NewPathItemList ¶ added in v0.10.1
func NewPathItemList() *PathItemList
NewPathItemList returns an initialized list.
func (*PathItemList) Back ¶ added in v0.10.1
func (l *PathItemList) Back() *PathItemElement
Back returns the last element of list l or nil if the list is empty.
func (*PathItemList) Front ¶ added in v0.10.1
func (l *PathItemList) Front() *PathItemElement
Front returns the first element of list l or nil if the list is empty.
func (*PathItemList) Init ¶ added in v0.10.1
func (l *PathItemList) Init() *PathItemList
Init initializes or clears list l.
func (*PathItemList) InsertAfter ¶ added in v0.10.1
func (l *PathItemList) InsertAfter(v []string, mark *PathItemElement) *PathItemElement
InsertAfter inserts a new element e with value v immediately after mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.
func (*PathItemList) InsertBefore ¶ added in v0.10.1
func (l *PathItemList) InsertBefore(v []string, mark *PathItemElement) *PathItemElement
InsertBefore inserts a new element e with value v immediately before mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.
func (*PathItemList) Len ¶ added in v0.10.1
func (l *PathItemList) Len() int
Len returns the number of elements of list l. The complexity is O(1).
func (*PathItemList) MoveAfter ¶ added in v0.10.1
func (l *PathItemList) MoveAfter(e, mark *PathItemElement)
MoveAfter moves element e to its new position after mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.
func (*PathItemList) MoveBefore ¶ added in v0.10.1
func (l *PathItemList) MoveBefore(e, mark *PathItemElement)
MoveBefore moves element e to its new position before mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.
func (*PathItemList) MoveToBack ¶ added in v0.10.1
func (l *PathItemList) MoveToBack(e *PathItemElement)
MoveToBack moves element e to the back of list l. If e is not an element of l, the list is not modified. The element must not be nil.
func (*PathItemList) MoveToFront ¶ added in v0.10.1
func (l *PathItemList) MoveToFront(e *PathItemElement)
MoveToFront moves element e to the front of list l. If e is not an element of l, the list is not modified. The element must not be nil.
func (*PathItemList) PushBack ¶ added in v0.10.1
func (l *PathItemList) PushBack(v []string) *PathItemElement
PushBack inserts a new element e with value v at the back of list l and returns e.
func (*PathItemList) PushBackList ¶ added in v0.10.1
func (l *PathItemList) PushBackList(other *PathItemList)
PushBackList inserts a copy of an other list at the back of list l. The lists l and other may be the same. They must not be nil.
func (*PathItemList) PushFront ¶ added in v0.10.1
func (l *PathItemList) PushFront(v []string) *PathItemElement
PushFront inserts a new element e with value v at the front of list l and returns e.
func (*PathItemList) PushFrontList ¶ added in v0.10.1
func (l *PathItemList) PushFrontList(other *PathItemList)
PushFrontList inserts a copy of an other list at the front of list l. The lists l and other may be the same. They must not be nil.
func (*PathItemList) Remove ¶ added in v0.10.1
func (l *PathItemList) Remove(e *PathItemElement) []string
Remove removes e from l if e is an element of list l. It returns the element value e.Value. The element must not be nil.
type PhoneNumberConverter ¶
type PhoneNumberConverter struct {
CountryCode string
Format phonenumbers.PhoneNumberFormat
}
PhoneNumberConverter converts
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]any // 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
type RPCCDRsFilterWithAPIOpts ¶
type RPCCDRsFilterWithAPIOpts struct {
*RPCCDRsFilter
APIOpts map[string]any
Tenant string
}
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 RSRParser ¶
type RSRParser struct {
Rules string // Rules container holding the string rules, public so it can be stored
Path string // instruct extracting info out of header in event
// contains filtered or unexported fields
}
RSRParser is a parser for data coming from various sources
func NewRSRParser ¶
NewRSRParser builds one RSRParser
func NewRSRParserMustCompile ¶
NewRSRParserMustCompile creates a new RSRParser and panic if fails
func (*RSRParser) CompileDynRule ¶
func (prsr *RSRParser) CompileDynRule(dP DataProvider) (p string, err error)
CompileDynRule will return the compiled dynamic rule
func (*RSRParser) ParseDataProvider ¶
func (prsr *RSRParser) ParseDataProvider(dP DataProvider) (out string, err error)
ParseDataProvider will parse the dataprovider using DPDynamicString
func (*RSRParser) ParseDataProviderWithInterfaces ¶
func (prsr *RSRParser) ParseDataProviderWithInterfaces(dP DataProvider) (out string, err error)
ParseDataProviderWithInterfaces will parse the dataprovider using DPDynamicInterface
func (*RSRParser) ParseDataProviderWithInterfaces2 ¶
func (prsr *RSRParser) ParseDataProviderWithInterfaces2(dP DataProvider) (out any, err error)
ParseDataProviderWithInterfaces will parse the dataprovider using DPDynamicInterface
type RSRParsers ¶
type RSRParsers []*RSRParser
RSRParsers is a set of RSRParser
func NewRSRParsers ¶
func NewRSRParsers(parsersRules, sep string) (prsrs RSRParsers, err error)
NewRSRParsers creates a new RSRParsers by spliting the rule using the separator
func NewRSRParsersFromSlice ¶
func NewRSRParsersFromSlice(parsersRules []string) (prsrs RSRParsers, err error)
NewRSRParsersFromSlice creates a new RSRParsers from a slice
func NewRSRParsersMustCompile ¶
func NewRSRParsersMustCompile(parsersRules string, rsrSeparator string) (prsrs RSRParsers)
NewRSRParsersMustCompile creates a new RSRParsers and panic if fails
func (RSRParsers) AsStringSlice ¶
func (prsrs RSRParsers) AsStringSlice() (v []string)
func (RSRParsers) Clone ¶
func (prsrs RSRParsers) Clone() (cln RSRParsers)
Clone returns a deep copy of RSRParsers
func (RSRParsers) Compile ¶
func (prsrs RSRParsers) Compile() (err error)
Compile parses Rules string and repopulates other fields
func (RSRParsers) GetIfaceFromValues ¶
func (prsrs RSRParsers) GetIfaceFromValues(evNm DataProvider) (iFaceVals []any, err error)
GetIfaceFromValues returns an interface for each RSRParser
func (RSRParsers) GetRule ¶
func (prsrs RSRParsers) GetRule() (out string)
GetRule returns the original string from which the rules were composed
func (RSRParsers) ParseDataProvider ¶
func (prsrs RSRParsers) ParseDataProvider(dP DataProvider) (out string, err error)
ParseDataProvider will parse the dataprovider using DPDynamicString
func (RSRParsers) ParseDataProviderWithInterfaces ¶
func (prsrs RSRParsers) ParseDataProviderWithInterfaces(dP DataProvider) (out string, err error)
ParseDataProviderWithInterfaces will parse the dataprovider using DPDynamicInterface
func (RSRParsers) ParseDataProviderWithInterfaces2 ¶
func (prsrs RSRParsers) ParseDataProviderWithInterfaces2(dP DataProvider) (out any, err error)
ParseDataProviderWithInterfaces will parse the dataprovider using DPDynamicInterface
func (RSRParsers) ParseValue ¶
func (prsrs RSRParsers) ParseValue(value any) (out string, err error)
ParseValue will parse the value out considering converters
type RWDataProvider ¶
type RWDataProvider interface {
DataProvider
Set(fldPath []string, val any) (err error)
Remove(fldPath []string) (err error)
}
RWDataProvider is a DataProvider with write methods on it
type RandomConverter ¶
type RandomConverter struct {
// contains filtered or unexported fields
}
type Ranking ¶
type Ranking struct {
Tenant string
ID string
LastUpdate time.Time
Metrics map[string]map[string]float64 // map[statID]map[metricID]metricValue
Sorting string
SortingParameters []string
SortedStatIDs []string
// contains filtered or unexported fields
}
Ranking represents a collection of metrics with ranked statistics.
func NewRankingFromProfile ¶
func NewRankingFromProfile(rkP *RankingProfile) (rk *Ranking)
NewRankingFromProfile creates a new Ranking based on profile configuration.
func (*Ranking) AsRankingSummary ¶
func (r *Ranking) AsRankingSummary() (rkSm *RankingSummary)
AsRankingSummary creates a summary with the most recent ranking data.
func (*Ranking) CacheClone ¶
CacheClone returns a clone of Ranking used by ltcache CacheCloner
func (*Ranking) Config ¶
func (r *Ranking) Config() *RankingProfile
Config returns the ranking's profile configuration.
func (*Ranking) RUnlock ¶
func (r *Ranking) RUnlock()
RUnlock unlocks the read lock on the ranking mutex.
func (*Ranking) SetConfig ¶
func (r *Ranking) SetConfig(rp *RankingProfile)
SetConfig sets the ranking's profile configuration.
type RankingProfile ¶
type RankingProfile struct {
Tenant string // Tenant this profile belongs to
ID string // Profile identification
Schedule string // Cron schedule this profile should run at
StatIDs []string // List of stat instances to query
MetricIDs []string // Filter out only specific metrics in reply for sorting
Sorting string // Sorting strategy. Possible values: <*asc|*desc>
SortingParameters []string // Sorting parameters: depending on sorting type, list of metric ids for now with optional true or false in case of reverse logic is desired
Stored bool // Offline storage activation for this profile
ThresholdIDs []string // List of threshold IDs to limit this Ranking to. *none to disable threshold processing for it.
}
RankingProfile defines the configuration of the Ranking.
func (*RankingProfile) CacheClone ¶
func (rkP *RankingProfile) CacheClone() any
CacheClone returns a clone of RankingProfile used by ltcache CacheCloner
func (*RankingProfile) Clone ¶
func (rkP *RankingProfile) Clone() (cln *RankingProfile)
Clone creates a deep copy of RankingProfile for thread-safe use.
func (*RankingProfile) FieldAsInterface ¶
func (rp *RankingProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*RankingProfile) FieldAsString ¶
func (rp *RankingProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*RankingProfile) Merge ¶
func (rp *RankingProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another RankingProfile.
func (*RankingProfile) Set ¶
func (rp *RankingProfile) Set(path []string, val any, _ bool) (err error)
Set implements the profile interface, setting values in RankingProfile based on path.
func (*RankingProfile) String ¶
func (rp *RankingProfile) String() string
String implements the DataProvider interface, returning the RankingProfile in JSON format.
func (*RankingProfile) TenantID ¶
func (sgp *RankingProfile) TenantID() string
TenantID returns the concatenated tenant and ID.
type RankingProfileWithAPIOpts ¶
type RankingProfileWithAPIOpts struct {
*RankingProfile
APIOpts map[string]any
}
RankingWithAPIOpts wraps Ranking with APIOpts.
type RankingSummary ¶
RankingSummary holds the most recent ranking metrics.
type RankingWithAPIOpts ¶
RankingWithAPIOpts wraps Ranking with APIOpts.
type Rate ¶
type Rate struct {
ID string // RateID
FilterIDs []string // RateFilterIDs
ActivationTimes string // ActivationTimes is a cron formatted time interval
Weights DynamicWeights // RateWeights will decide the winner per interval start
Blocker bool // RateBlocker will make this rate recurrent, deactivating further intervals
IntervalRates []*IntervalRate
// contains filtered or unexported fields
}
Rate defines rate related information used within a RateProfile
func (*Rate) FieldAsInterface ¶
type RateProfile ¶
type RateProfile struct {
Tenant string
ID string
FilterIDs []string
Weights DynamicWeights
MinCost *Decimal
MaxCost *Decimal
MaxCostStrategy string
Rates map[string]*Rate
}
RateProfile represents the configuration of a Rate profile
func NewRateProfileFromMapDataDBMap ¶
func NewRateProfileFromMapDataDBMap(tnt, id string, mapRP map[string]any, ms Marshaler) (rp *RateProfile, err error)
NewRateProfileFromMapDataDBMap will convert a RateProfile map into a RatePRofile struct. This is used when we get the map from redis database
func (*RateProfile) AsDataDBMap ¶
func (rp *RateProfile) AsDataDBMap(ms Marshaler) (mp map[string]any, err error)
AsDataDBMap is used to is a convert method in order to properly set trough a hasmap in redis server our rate profile
func (*RateProfile) CacheClone ¶
func (rp *RateProfile) CacheClone() any
CacheClone returns a clone of RateProfile used by ltcache CacheCloner
func (*RateProfile) Compile ¶
func (rp *RateProfile) Compile() (err error)
func (*RateProfile) FieldAsInterface ¶
func (rp *RateProfile) FieldAsInterface(fldPath []string) (_ any, err error)
func (*RateProfile) FieldAsString ¶
func (rp *RateProfile) FieldAsString(fldPath []string) (_ string, err error)
func (*RateProfile) Merge ¶
func (rp *RateProfile) Merge(v2 any)
func (*RateProfile) Set ¶
func (rp *RateProfile) Set(path []string, val any, newBranch bool) (err error)
func (*RateProfile) Sort ¶
func (rpp *RateProfile) Sort()
Sort will sort the IntervalRates from each Rate based on IntervalStart
func (*RateProfile) String ¶
func (rp *RateProfile) String() string
func (*RateProfile) TenantID ¶
func (rp *RateProfile) TenantID() string
type RateProfileCost ¶
type RateProfileCost struct {
ID string // RateProfileID
Cost *Decimal
MinCost *Decimal
MaxCost *Decimal
MaxCostStrategy string
CostIntervals []*RateSIntervalCost
Rates map[string]*IntervalRate
Altered []string
}
RateProfileCost is the cost returned by RateS at cost queries
func (*RateProfileCost) CorrectCost ¶
func (rPc *RateProfileCost) CorrectCost(rndDec *int, rndMtd string)
CorrectCost should be called in final phase of cost calculation in order to apply further correction like Min/MaxCost or rounding
func (*RateProfileCost) Equals ¶
func (rpC *RateProfileCost) Equals(nRpCt *RateProfileCost) (eq bool)
Equals returns the equality between two RateProfileCost
type RateProfileWithAPIOpts ¶
type RateProfileWithAPIOpts struct {
*RateProfile
APIOpts map[string]any
}
RateProfileWithAPIOpts is used in replicatorV1 for dispatcher
type RateSIncrement ¶
type RateSIncrement struct {
IncrementStart *Decimal
RateIntervalIndex int
RateID string
CompressFactor int64
Usage *Decimal
// contains filtered or unexported fields
}
func (*RateSIncrement) AsRateSIncrementCost ¶
func (rI *RateSIncrement) AsRateSIncrementCost() (rIc *RateSIncrementCost)
AsRateSIncrementCost converts RateSIncrement to RateSIncrementCost The difference between this 2 is that RateSIncrementCost don't need IncrementStart
func (*RateSIncrement) Clone ¶
func (rI *RateSIncrement) Clone() *RateSIncrement
Clone returns a copy of rI
func (*RateSIncrement) CompressEquals ¶
func (rIcr *RateSIncrement) CompressEquals(rIcr2 *RateSIncrement) (eq bool)
CompressEquals compares two RateSIncrement for Compress function
func (*RateSIncrement) Cost ¶
func (rIcr *RateSIncrement) Cost(rts map[string]*IntervalRate) (cost *decimal.Big)
Cost computes the Cost on RateSIncrement
func (*RateSIncrement) Equals ¶
func (rI *RateSIncrement) Equals(rtIn *RateSIncrement, rIRef, rtInRef map[string]*IntervalRate) (eq bool)
Equals returns the equality between two RateSIncrement
func (*RateSIncrement) FieldAsInterface ¶
func (rI *RateSIncrement) FieldAsInterface(fldPath []string) (_ any, err error)
type RateSIncrementCost ¶
type RateSIncrementCost struct {
Usage *Decimal
RateID string
RateIntervalIndex int
CompressFactor int64
}
RateSIncrementCost is used in the RateProfileCost to reflect RateSIncrement
func (*RateSIncrementCost) Equals ¶
func (rIncrC *RateSIncrementCost) Equals(nRi *RateSIncrementCost, rIRef, rtInRef map[string]*IntervalRate) (eq bool)
Equals returns the equality between two RateSIncrementCost
type RateSInterval ¶
type RateSInterval struct {
IntervalStart *Decimal
Increments []*RateSIncrement
CompressFactor int64
// contains filtered or unexported fields
}
RateSInterval is used by RateS to integrate Rate info for one charging interval
func (*RateSInterval) AsRatesIntervalsCost ¶
func (rI *RateSInterval) AsRatesIntervalsCost() (rIc *RateSIntervalCost)
AsRatesIntervalsCost converts RateSInterval to RateSIntervalCost The difference between this 2 is that RateSIntervalCost don't need IntervalStart
func (*RateSInterval) Clone ¶
func (rI *RateSInterval) Clone() *RateSInterval
Clone returns a copy of rI
func (*RateSInterval) CompressEquals ¶
func (rIv *RateSInterval) CompressEquals(rIv2 *RateSInterval) (eq bool)
CompressEquals compares two RateSIntervals for Compress function
func (*RateSInterval) Cost ¶
func (rIv *RateSInterval) Cost(rts map[string]*IntervalRate) (cost *decimal.Big)
func (*RateSInterval) Equals ¶
func (rIl *RateSInterval) Equals(nRil *RateSInterval, rIlRef, nRilRef map[string]*IntervalRate) (eq bool)
Equals compares two RateSIntervals
func (*RateSInterval) FieldAsInterface ¶
func (rI *RateSInterval) FieldAsInterface(fldPath []string) (any, error)
type RateSIntervalCost ¶
type RateSIntervalCost struct {
Increments []*RateSIncrementCost
CompressFactor int64
}
RateSIntervalCost is used in the RateProfileCost to reflect the RateSInterval used
func (*RateSIntervalCost) Equals ¶
func (rIC *RateSIntervalCost) Equals(nRIc *RateSIntervalCost, rIlRef, nRilRef map[string]*IntervalRate) (eq bool)
Equals returns the equality between two RateSIntervalCost
type ReSearchReplace ¶
ReSearchReplace id regexp Search/Replace, used for example for field formatting
func (ReSearchReplace) Clone ¶
func (rsr ReSearchReplace) Clone() (cln *ReSearchReplace)
Clone returns a deep copy of ReSearchReplace
func (*ReSearchReplace) Process ¶
func (rsr *ReSearchReplace) Process(source string) string
Process process the string with the regex
type RemoveRPrfRates ¶
type Resource ¶
type Resource struct {
Tenant string
ID string
Usages map[string]*ResourceUsage
TTLIdx []string // holds ordered list of ResourceIDs based on their TTL, empty if feature is disableda
}
Resource represents a resource in the system not thread safe, needs locking at process level
func (*Resource) CacheClone ¶
CacheClone returns a clone of Resource used by ltcache CacheCloner
func (*Resource) TotalUsage ¶
TotalUsage returns the sum of all usage units Exported to be used in FilterS
type ResourceProfile ¶
type ResourceProfile struct {
Tenant string
ID string // identifier of this resource
FilterIDs []string
UsageTTL time.Duration // auto-expire the usage after this duration
Limit float64 // limixt value
AllocationMessage string // message returned by the winning resource on allocation
Blocker bool // blocker flag to stop processing on filters matched
Stored bool
Weights DynamicWeights // Weight to sort the resources
ThresholdIDs []string // Thresholds to check after changing Limit
}
ResourceProfile represents the user configuration for the resource
func (*ResourceProfile) CacheClone ¶
func (rp *ResourceProfile) CacheClone() any
CacheClone returns a clone of ResourceProfile used by ltcache CacheCloner
func (*ResourceProfile) Clone ¶
func (rp *ResourceProfile) Clone() *ResourceProfile
Clone clones *ResourceProfile (lkID excluded)
func (*ResourceProfile) FieldAsInterface ¶
func (rp *ResourceProfile) FieldAsInterface(fldPath []string) (_ any, err error)
func (*ResourceProfile) FieldAsString ¶
func (rp *ResourceProfile) FieldAsString(fldPath []string) (_ string, err error)
func (*ResourceProfile) Merge ¶
func (rp *ResourceProfile) Merge(v2 any)
func (*ResourceProfile) Set ¶
func (rp *ResourceProfile) Set(path []string, val any, _ bool) (err error)
func (*ResourceProfile) String ¶
func (rp *ResourceProfile) String() string
func (*ResourceProfile) TenantID ¶
func (rp *ResourceProfile) TenantID() string
TenantID returns unique identifier of the ResourceProfile in a multi-tenant environment
type ResourceProfileWithAPIOpts ¶
type ResourceProfileWithAPIOpts struct {
*ResourceProfile
APIOpts map[string]any
}
ResourceProfileWithAPIOpts is used in replicatorV1 for dispatcher
type ResourceUsage ¶
type ResourceUsage struct {
Tenant string
ID string // Unique identifier of this ResourceUsage, Eg: FreeSWITCH UUID
ExpiryTime time.Time
Units float64 // Number of units used
}
ResourceUsage represents an usage counted
func (*ResourceUsage) Clone ¶
func (ru *ResourceUsage) Clone() (cln *ResourceUsage)
Clone duplicates ru
func (*ResourceUsage) IsActive ¶
func (ru *ResourceUsage) IsActive(atTime time.Time) bool
isActive checks ExpiryTime at some time
func (*ResourceUsage) TenantID ¶
func (ru *ResourceUsage) TenantID() string
TenantID returns the concatenated key between tenant and ID
type ResourceWithAPIOpts ¶
ResourceWithAPIOpts is used in replicatorV1 for dispatcher
type ResourceWithConfig ¶
type ResourceWithConfig struct {
*Resource
Config *ResourceProfile
}
func (*ResourceWithConfig) Available ¶
func (r *ResourceWithConfig) Available() float64
Available returns the available number of units Exported method to be used by filterS
type RoundConverter ¶
RoundConverter will round floats
type Route ¶
type Route struct {
ID string // RouteID
FilterIDs []string
AccountIDs []string
RateProfileIDs []string // used when computing price
ResourceIDs []string // queried in some strategies
StatIDs []string // queried in some strategies
Weights DynamicWeights
Blockers DynamicBlockers // if true, stops processing further routes
RouteParameters string
// contains filtered or unexported fields
}
Route defines a single route within a RouteProfile.
func (*Route) FieldAsInterface ¶
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*Route) FieldAsString ¶
FieldAsString implements the DataProvider interface, retrieving field value as string.
type RouteProfile ¶
type RouteProfile struct {
Tenant string
ID string // LCR Profile ID
FilterIDs []string
Weights DynamicWeights
Blockers DynamicBlockers
Sorting string // Sorting strategy
SortingParameters []string
Routes []*Route
}
RouteProfile represents the configuration of a Route profile.
func (*RouteProfile) CacheClone ¶
func (rp *RouteProfile) CacheClone() any
CacheClone returns a clone of RouteProfile used by ltcache CacheCloner
func (*RouteProfile) Clone ¶
func (rp *RouteProfile) Clone() *RouteProfile
Clone method for RouteProfile
func (*RouteProfile) Compile ¶
func (rp *RouteProfile) Compile() error
Compile is a wrapper for convenience setting up the RouteProfile.
func (*RouteProfile) FieldAsInterface ¶
func (rp *RouteProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*RouteProfile) FieldAsString ¶
func (rp *RouteProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*RouteProfile) Merge ¶
func (rp *RouteProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another RouteProfile.
func (*RouteProfile) Set ¶
func (rp *RouteProfile) Set(path []string, val any, newBranch bool) (err error)
Set implements the profile interface, setting values in RouteProfile based on path.
func (*RouteProfile) String ¶
func (rp *RouteProfile) String() string
String implements the DataProvider interface, returning the RouteProfile in JSON format.
func (*RouteProfile) TenantID ¶
func (rp *RouteProfile) TenantID() string
TenantID returns unique identifier of the LCRProfile in a multi-tenant environment.
type RouteProfileWithAPIOpts ¶
type RouteProfileWithAPIOpts struct {
*RouteProfile
APIOpts map[string]any
}
RouteProfileWithAPIOpts wraps RouteProfile with APIOpts.
type SIPURIMethodConverter ¶
type SIPURIMethodConverter struct{}
SIPURIMethodConverter will return the
type SafeMapStorage ¶
type SafeMapStorage struct {
MapStorage
sync.RWMutex
}
SafeMapStorage is a Mapstorage with mutex
func (*SafeMapStorage) Clone ¶
func (ms *SafeMapStorage) Clone() (msClone *SafeMapStorage)
func (*SafeMapStorage) ClonedMapStorage ¶
func (ms *SafeMapStorage) ClonedMapStorage() (msClone MapStorage)
func (*SafeMapStorage) FieldAsInterface ¶
func (ms *SafeMapStorage) FieldAsInterface(fldPath []string) (val any, err error)
FieldAsInterface returns the value from the path
func (*SafeMapStorage) FieldAsString ¶
func (ms *SafeMapStorage) FieldAsString(fldPath []string) (str string, err error)
FieldAsString returns the value from path as string
func (*SafeMapStorage) GetKeys ¶
func (ms *SafeMapStorage) GetKeys(nested bool, nestedLimit int, prefix string) (keys []string)
GetKeys returns all the keys from map
func (*SafeMapStorage) Remove ¶
func (ms *SafeMapStorage) Remove(fldPath []string) (err error)
Remove removes the item at path
func (*SafeMapStorage) Set ¶
func (ms *SafeMapStorage) Set(fldPath []string, val any) (err error)
Set sets the value at the given path
func (*SafeMapStorage) String ¶
func (ms *SafeMapStorage) String() string
String returns the map as json string
type ScheduledRanking ¶
type ScheduledTrend ¶
type SessionFilter ¶
type SessionIDsWithAPIOpts ¶
type SetIndexesArg ¶
type SetIndexesArg struct {
IdxItmType string
TntCtx string
Indexes map[string]StringSet
Tenant string
APIOpts map[string]any
}
SetIndexesArg the API arguments needed for seting an index
type SliceConverter ¶
type SliceConverter struct{}
SliceConverter converts the interface in the unix time
type StdLogger ¶
type StdLogger struct {
// contains filtered or unexported fields
}
func NewStdLogger ¶
func NewStdLoggerWithWriter ¶
func (*StdLogger) GetLogLevel ¶
GetLogLevel() returns the level logger number for the server
func (*StdLogger) SetLogLevel ¶
SetLogLevel changes the log level
type String2HexConverter ¶ added in v0.10.2
type String2HexConverter struct{}
String2HexConverter will transform the string to hex
type StringSet ¶
type StringSet map[string]struct{}
StringSet will manage data within a set
func JoinStringSet ¶
JoinStringSet intersect multiple StringSets in one
func NewStringSet ¶
NewStringSet returns a new StringSet
func (StringSet) AsOrderedSlice ¶ added in v0.10.1
AsOrderedSlice returns the keys as ordered string slice
func (StringSet) FieldAsInterface ¶
FieldAsInterface returns an empty structure if the path exists else ErrNotFound
func (StringSet) FieldAsString ¶
FieldAsString returns an empty structure as a json string if the path exists else ErrNotFound
type StringWithAPIOpts ¶
type StripConverter ¶
type StripConverter struct {
// contains filtered or unexported fields
}
StripConverter strips the prefix, the suffix or both from a string.
type SyncedChan ¶
type SyncedChan struct {
// contains filtered or unexported fields
}
func NewSyncedChan ¶
func NewSyncedChan() *SyncedChan
func (*SyncedChan) CloseOnce ¶
func (s *SyncedChan) CloseOnce()
func (*SyncedChan) Done ¶
func (s *SyncedChan) Done() <-chan struct{}
type SysLogger ¶
type SysLogger struct {
// contains filtered or unexported fields
}
func (*SysLogger) GetLogLevel ¶
GetLogLevel() returns the level logger number for the server
func (*SysLogger) SetLogLevel ¶
SetLogLevel changes the log level
type TPAPAction ¶
type TPAPDiktat ¶
type TPAccountBalance ¶
type TPActionProfile ¶
type TPActionProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
Weights string
Blockers string
Schedule string
Targets []*TPActionTarget
Actions []*TPAPAction
}
type TPActionTarget ¶
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
Weights string
Blockers string
Attributes []*TPAttribute
}
TPAttributeProfile is used in APIs to manage remotely offline AttributeProfile
type TPBalanceCostIncrement ¶
type TPBalanceCostIncrement struct {
FilterIDs []string
Increment string
FixedFee *float64
RecurrentFee *float64
}
func NewTPBalanceCostIncrement ¶
func NewTPBalanceCostIncrement(filtersStr, incrementStr, fixedFeeStr, recurrentFeeStr string) (costIncrement *TPBalanceCostIncrement, err error)
func (*TPBalanceCostIncrement) AsString ¶
func (costIncr *TPBalanceCostIncrement) AsString() (s string)
type TPBalanceUnitFactor ¶
func NewTPBalanceUnitFactor ¶
func NewTPBalanceUnitFactor(filtersStr, factorStr string) (unitFactor *TPBalanceUnitFactor, err error)
func (*TPBalanceUnitFactor) AsString ¶
func (unitFactor *TPBalanceUnitFactor) AsString() string
type TPChargerProfile ¶
type TPChargerProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
Weights string
Blockers string
RunID string
AttributeIDs []string
}
TPChargerProfile is used in APIs to manage remotely offline ChargerProfile
type TPFilter ¶
type TPFilter struct {
Type string // Filter type (*string, *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 ¶
TPFilterProfile is used in APIs to manage remotely offline FilterProfile
type TPIntervalRate ¶
type TPRankingProfile ¶
type TPRankingProfile struct {
TPid string
Tenant string
ID string
Schedule string
StatIDs []string
MetricIDs []string
Sorting string
SortingParameters []string
Stored bool
ThresholdIDs []string
}
TPRankingProfile is used in APIs to manage remotely offline RankingProfile
type TPRateProfile ¶
type TPResourceProfile ¶
type TPResourceProfile struct {
TPid string
Tenant string
ID string // Identifier of this limit
FilterIDs []string
UsageTTL string
Limit string // Limit value
AllocationMessage string
Blocker bool // blocker flag to stop processing on filters matched
Stored bool
Weights string // Weight to sort the ResourceLimits
ThresholdIDs []string // Thresholds to check after changing Limit
}
TPResourceProfile is used in APIs to manage remotely offline ResourceProfile
type TPRoute ¶
type TPRoute struct {
ID string // RouteID
FilterIDs []string
AccountIDs []string
RateProfileIDs []string // used when computing price
ResourceIDs []string // queried in some strategies
StatIDs []string // queried in some strategies
Weights string
Blockers string
RouteParameters string
}
TPRoute is used in TPRouteProfile
type TPRouteProfile ¶
type TPRouteProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
Weights string
Blockers string
Sorting string
SortingParameters []string
Routes []*TPRoute
}
TPRouteProfile is used in APIs to manage remotely offline RouteProfile
type TPStatProfile ¶
type TPStatProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
QueueLength int
TTL string
MinItems int
Weights string
Blockers string // blocker flag to stop processing on filters matched
Stored bool
ThresholdIDs []string
Metrics []*MetricWithFilters
}
TPStatProfile is used in APIs to manage remotely offline StatProfile
type TPThresholdProfile ¶
type TPThresholdProfile struct {
TPid string
Tenant string
ID string
FilterIDs []string
MaxHits int
MinHits int
MinSleep string
Blocker bool // blocker flag to stop processing on filters matched
Weights string // Weight to sort the thresholds
ActionProfileIDs []string
Async bool
}
TPThresholdProfile is used in APIs to manage remotely offline ThresholdProfile
type TPTrendsProfile ¶
type TPTrendsProfile struct {
TPid string
Tenant string
ID string
Schedule string
StatID string
Metrics []string
TTL string
QueueLength int
MinItems int
CorrelationType string
Tolerance float64
Stored bool
ThresholdIDs []string
}
TPTrendProfile is used in APIs to manage remotely offline TrendProfile
type TenantID ¶
func NewTenantID ¶
NewTenantID parses a string in the format of "tenant:ID" and returns a TenantID struct. If the separator is not found, the entire string is treated as the ID.
type TenantIDWithAPIOpts ¶
type TenantWithAPIOpts ¶
type TimeStringConverter ¶
type TimeStringConverter struct {
Layout string
}
type Trend ¶
type Trend struct {
Tenant string
ID string
RunTimes []time.Time
Metrics map[time.Time]map[string]*MetricWithTrend
CompressedMetrics []byte // if populated, Metrics and RunTimes will be emty
// contains filtered or unexported fields
}
Trend represents a collection of metrics with trend analysis.
func NewTrendFromProfile ¶
func NewTrendFromProfile(tP *TrendProfile) *Trend
NewTrendFromProfile creates an empty trend based on profile configuration.
func (*Trend) AsTrendSummary ¶
func (t *Trend) AsTrendSummary() (ts *TrendSummary)
AsTrendSummary creates a summary with the most recent trend data.
func (*Trend) CacheClone ¶
CacheClone returns a clone of Trend used by ltcache CacheCloner
func (*Trend) Config ¶
func (t *Trend) Config() *TrendProfile
Config returns the trend's profile configuration.
func (*Trend) GetTrendGrowth ¶
func (t *Trend) GetTrendGrowth(mID string, mVal float64, correlation string, roundDec int) (tG float64, err error)
GetTrendGrowth calculates percentage growth for a metric compared to previous values.
func (*Trend) IndexesAppendMetric ¶
func (t *Trend) IndexesAppendMetric(mWt *MetricWithTrend, rTime time.Time)
IndexesAppendMetric adds a single metric to internal indexes.
func (*Trend) SetConfig ¶
func (t *Trend) SetConfig(tp *TrendProfile)
SetConfig sets the trend's profile configuration.
func (*Trend) Uncompress ¶
Uncompress expands a compressed trend.
type TrendProfile ¶
type TrendProfile struct {
Tenant string
ID string
Schedule string // Cron expression scheduling gathering of the metrics
StatID string
Metrics []string
TTL time.Duration
QueueLength int
MinItems int // minimum number of items for building Trends
CorrelationType string // *last, *average
Tolerance float64 // allow this deviation margin for *constant trend
Stored bool // store the Trend in dataDB
ThresholdIDs []string
}
TrendProfile defines the configuration of the Trend.
func (*TrendProfile) CacheClone ¶
func (tP *TrendProfile) CacheClone() any
CacheClone returns a clone of TrendProfile used by ltcache CacheCloner
func (*TrendProfile) Clone ¶
func (tp *TrendProfile) Clone() (clnTp *TrendProfile)
Clone creates a deep copy of TrendProfile for thread-safe use.
func (*TrendProfile) FieldAsInterface ¶
func (tp *TrendProfile) FieldAsInterface(fldPath []string) (_ any, err error)
FieldAsInterface implements the DataProvider interface, retrieving field value as interface.
func (*TrendProfile) FieldAsString ¶
func (tp *TrendProfile) FieldAsString(fldPath []string) (_ string, err error)
FieldAsString implements the DataProvider interface, retrieving field value as string.
func (*TrendProfile) Merge ¶
func (tp *TrendProfile) Merge(v2 any)
Merge implements the profile interface, merging values from another TrendProfile.
func (*TrendProfile) Set ¶
func (tp *TrendProfile) Set(path []string, val any, _ bool) (err error)
Set implements the profile interface, setting values in TrendProfile based on path.
func (*TrendProfile) String ¶
func (tp *TrendProfile) String() string
String implements the DataProvider interface, returning the TrendProfile in JSON format.
func (*TrendProfile) TenantID ¶
func (tp *TrendProfile) TenantID() string
TenantID returns the concatenated tenant and ID.
type TrendProfileWithAPIOpts ¶
type TrendProfileWithAPIOpts struct {
*TrendProfile
APIOpts map[string]any
}
TrendProfileWithAPIOpts wraps TrendProfile with APIOpts.
type TrendSummary ¶
type TrendSummary struct {
Tenant string
ID string
Time time.Time
Metrics map[string]*MetricWithTrend
}
TrendSummary holds the most recent trend metrics.
type TrendWithAPIOpts ¶
TrendWithAPIOpts wraps Trend with APIOpts.
type UnitFactor ¶
UnitFactor is a multiplicator for the usage received
func (*UnitFactor) Equals ¶
func (uF *UnitFactor) Equals(nUf *UnitFactor) (eq bool)
Equals compares two UnitFactors
func (*UnitFactor) FieldAsInterface ¶
func (uF *UnitFactor) FieldAsInterface(fldPath []string) (_ any, err error)
func (*UnitFactor) FieldAsString ¶
func (uF *UnitFactor) FieldAsString(fldPath []string) (_ string, err error)
func (*UnitFactor) String ¶
func (uF *UnitFactor) String() string
type UnixTimeConverter ¶
type UnixTimeConverter struct{}
UnixTimeConverter converts the interface in the unix time
type XMLElement ¶
type XMLElement struct {
XMLName xml.Name
Value string `xml:",chardata"`
Attributes []*xml.Attr `xml:",attr"`
Elements []*XMLElement `xml:"omitempty"`
}
XMLElement is specially crafted to be automatically marshalled by encoding/xml
func NMAsXMLElements ¶
func NMAsXMLElements(nm *OrderedNavigableMap) (ents []*XMLElement, err error)
NMAsXMLElements returns the values as []*XMLElement which can be later marshaled considers each value returned by .Values() in the form of []*NMItem, otherwise errors
Source Files
¶
- account.go
- actions.go
- apitpdata.go
- attributes.go
- birpcint_client.go
- blockers.go
- cache_file_info.go
- cdr.go
- cgrevent.go
- cgrrecordwriter.go
- chargers.go
- consts.go
- coreutils.go
- dataconverter.go
- datanode.go
- dataprovider.go
- dateseries.go
- decimal.go
- dynamicfieldpath.go
- dynamicweight.go
- errors.go
- eventcharges.go
- file.go
- ips.go
- librates.go
- logger.go
- map.go
- mapstorage.go
- marshaler.go
- net.go
- objectdp.go
- orderedmap.go
- orderednavigablemap.go
- paginator.go
- pathitem.go
- pathitemlist.go
- rankings.go
- reflect.go
- researchreplace.go
- resources.go
- routes.go
- rsrfilters.go
- rsrparser.go
- safemapstorage.go
- slice.go
- stir_shaken.go
- stir_shaken_utils.go
- stringset.go
- struct.go
- syncedchan.go
- trends.go
- xmlelement.go