From 024195a704feab51d6163b1c2cf4e57d0dde93cf Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Fri, 9 Mar 2012 17:36:48 +0200 Subject: [PATCH] structures definitions --- docs/intro.rst | 7 ++++++- docs/tutorial.rst | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/intro.rst b/docs/intro.rst index 0d5b39ba6..0e3aa24f2 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -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 -------- diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 338f57266..2d2475647 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -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 -----------