structures definitions

This commit is contained in:
Radu Ioan Fericean
2012-03-09 17:36:48 +02:00
parent a5c34fcd80
commit 024195a704
2 changed files with 46 additions and 2 deletions

View File

@@ -2,8 +2,13 @@ Introduction
============
CGRates is a very fast and easy scalable rating enginge targeted especialli for telecom providers.
It is written in go (http://golang.net) and accesible from any language via JSON RPC.
It is written in go (http://golang.net) and accesible from any language via JSON RPC. The code is well documented (go doc compliant api docs) and heavily tested.
Supported databases: kyoto_ cabinet, redis_, mongodb_.
.. _kyoto: http://fallabs.com/kyotocabinet
.. _redis: http://redis.io
.. _mongodb: http://www.mongodb.org
Features
--------

View File

@@ -1,7 +1,46 @@
Tutorial
========
The general usage of the cgrates involves creating a CallDescriptor stucture sending it to the balancer via JSON RPC and getting a response from the balancer inf form of a CallCost structure or a numeric value for requested information.
.. image:: ` images/general.png
CallDescriptor struct
- TOR int
- CstmId, Subject, DestinationPrefix string
- TimeStart, TimeEnd time.Time
- Amount float64
TOR
Type Of Record, used to differentiate between various type of records
CstmId
Customer Identification used for multi tennant databases
Subject
Subject for this query
DestinationPrefix
Destination prefix to be matched
TimeStart, TimeEnd
The start end end of the call in question
Amount
The amount requested in various api calss (e.g. DebitSMS amount)
CallCost struct
- TOR int
- CstmId, Subject, DestinationPrefix string
- Cost, ConnectFee float64
- Timespans []*TimeSpan
TOR
Type Of Record, used to differentiate between various type of records (for query identification and confirmation)
CstmId
Customer Identification used for multi tennant databases (for query identification and confirmation)
Subject
Subject for this query (for query identification and confirmation)
DestinationPrefix
Destination prefix to be matched (for query identification and confirmation)
Cost
The requested cost
ConnectFee
The requested connection cost
Timespans
The timespans in wicht the initial TimeStart-TimeEnd was split in for cost determination with all pricingg and cost information attached.
.. image:: images/general.png
Instalation
-----------