apier

package
v0.9.1-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2014 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK = "OK"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountActionTiming

type AccountActionTiming struct {
	Id              string    // The id to reference this particular ActionTiming
	ActionTimingsId string    // The id of the ActionTimings profile attached to the account
	ActionsId       string    // The id of actions which will be executed
	NextExecTime    time.Time // Next execution time
}

type ApiActionTiming

type ApiActionTiming struct {
	ActionsId string  // Actions id
	Years     string  // semicolon separated list of years this timing is valid on, *any or empty supported
	Months    string  // semicolon separated list of months this timing is valid on, *any or empty supported
	MonthDays string  // semicolon separated list of month's days this timing is valid on, *any or empty supported
	WeekDays  string  // semicolon separated list of week day names this timing is valid on *any or empty supported
	Time      string  // String representing the time this timing starts on, *asap supported
	Weight    float64 // Binding's weight
}

type ApierV1

type ApierV1 struct {
	StorDb    engine.LoadStorage
	RatingDb  engine.RatingStorage
	AccountDb engine.AccountingStorage
	CdrDb     engine.CdrStorage
	Sched     *scheduler.Scheduler
	Config    *config.CGRConfig
}

func (*ApierV1) AddBalance

func (self *ApierV1) AddBalance(attr *AttrAddBalance, reply *string) error

func (*ApierV1) AddTriggeredAction

func (self *ApierV1) AddTriggeredAction(attr AttrAddActionTrigger, reply *string) error

func (*ApierV1) ExecuteAction

func (self *ApierV1) ExecuteAction(attr *AttrExecuteAction, reply *string) error

func (*ApierV1) ExportCdrsToFile

func (self *ApierV1) ExportCdrsToFile(attr utils.AttrExpFileCdrs, reply *utils.ExportedFileCdrs) error

func (*ApierV1) GetAccountActionTimings

func (self *ApierV1) GetAccountActionTimings(attrs AttrAcntAction, reply *[]*AccountActionTiming) error

func (*ApierV1) GetAccountActionTriggers

func (self *ApierV1) GetAccountActionTriggers(attrs AttrAcntAction, reply *engine.ActionTriggerPriotityList) error

Returns a list of ActionTriggers on an account

func (*ApierV1) GetBalance

func (self *ApierV1) GetBalance(attr *AttrGetBalance, reply *float64) error

Get balance

func (*ApierV1) GetCacheStats

func (self *ApierV1) GetCacheStats(attrs utils.AttrCacheStats, reply *utils.CacheStats) error

func (*ApierV1) GetCachedItemAge

func (self *ApierV1) GetCachedItemAge(itemId string, reply *utils.CachedItemAge) error

func (*ApierV1) GetDestination

func (self *ApierV1) GetDestination(dstId string, reply *engine.Destination) error

func (*ApierV1) GetRatingPlan

func (self *ApierV1) GetRatingPlan(rplnId string, reply *engine.RatingPlan) error

func (*ApierV1) GetTPAccountActionLoadIds

func (self *ApierV1) GetTPAccountActionLoadIds(attrs AttrGetTPAccountActionIds, reply *[]string) error

Queries AccountActions identities on specific tariff plan.

func (*ApierV1) GetTPAccountActions

func (self *ApierV1) GetTPAccountActions(attrs utils.TPAccountActions, reply *[]*utils.TPAccountActions) error

Queries specific AccountActions profile on tariff plan

func (*ApierV1) GetTPActionIds

func (self *ApierV1) GetTPActionIds(attrs AttrGetTPActionIds, reply *[]string) error

Queries Actions identities on specific tariff plan.

func (*ApierV1) GetTPActionTimingIds

func (self *ApierV1) GetTPActionTimingIds(attrs AttrGetTPActionTimingIds, reply *[]string) error

Queries ActionTimings identities on specific tariff plan.

func (*ApierV1) GetTPActionTimings

func (self *ApierV1) GetTPActionTimings(attrs AttrGetTPActionTimings, reply *utils.TPActionTimings) error

Queries specific ActionTimings profile on tariff plan

func (*ApierV1) GetTPActionTriggerIds

func (self *ApierV1) GetTPActionTriggerIds(attrs AttrGetTPActionTriggerIds, reply *[]string) error

Queries ActionTriggers identities on specific tariff plan.

func (*ApierV1) GetTPActionTriggers

func (self *ApierV1) GetTPActionTriggers(attrs AttrGetTPActionTriggers, reply *utils.TPActionTriggers) error

Queries specific ActionTriggers profile on tariff plan

func (*ApierV1) GetTPActions

func (self *ApierV1) GetTPActions(attrs AttrGetTPActions, reply *utils.TPActions) error

Queries specific Actions profile on tariff plan

func (*ApierV1) GetTPDestination

func (self *ApierV1) GetTPDestination(attrs AttrGetTPDestination, reply *utils.TPDestination) error

Queries a specific destination

func (*ApierV1) GetTPDestinationIds

func (self *ApierV1) GetTPDestinationIds(attrs AttrGetTPDestinationIds, reply *[]string) error

Queries destination identities on specific tariff plan.

func (*ApierV1) GetTPDestinationRate

func (self *ApierV1) GetTPDestinationRate(attrs AttrGetTPDestinationRate, reply *utils.TPDestinationRate) error

Queries specific DestinationRate profile on tariff plan

func (*ApierV1) GetTPDestinationRateIds

func (self *ApierV1) GetTPDestinationRateIds(attrs AttrGetTPRateIds, reply *[]string) error

Queries DestinationRate identities on specific tariff plan.

func (*ApierV1) GetTPIds

func (self *ApierV1) GetTPIds(attrs AttrGetTPIds, reply *[]string) error

Queries tarrif plan identities gathered from all tables.

func (*ApierV1) GetTPRate

func (self *ApierV1) GetTPRate(attrs AttrGetTPRate, reply *utils.TPRate) error

Queries specific Rate on tariff plan

func (*ApierV1) GetTPRateIds

func (self *ApierV1) GetTPRateIds(attrs AttrGetTPRateIds, reply *[]string) error

Queries rate identities on specific tariff plan.

func (*ApierV1) GetTPRatingPlan

func (self *ApierV1) GetTPRatingPlan(attrs AttrGetTPRatingPlan, reply *utils.TPRatingPlan) error

Queries specific RatingPlan profile on tariff plan

func (*ApierV1) GetTPRatingPlanIds

func (self *ApierV1) GetTPRatingPlanIds(attrs AttrGetTPRatingPlanIds, reply *[]string) error

Queries RatingPlan identities on specific tariff plan.

func (*ApierV1) GetTPRatingProfileLoadIds

func (self *ApierV1) GetTPRatingProfileLoadIds(attrs utils.AttrTPRatingProfileIds, reply *[]string) error

Queries RatingProfile identities on specific tariff plan.

func (*ApierV1) GetTPRatingProfiles

func (self *ApierV1) GetTPRatingProfiles(attrs utils.TPRatingProfile, reply *[]*utils.TPRatingProfile) error

Queries specific RatingProfile on tariff plan

func (*ApierV1) GetTPTiming

func (self *ApierV1) GetTPTiming(attrs AttrGetTPTiming, reply *utils.ApierTPTiming) error

Queries specific Timing on Tariff plan

func (*ApierV1) GetTPTimingIds

func (self *ApierV1) GetTPTimingIds(attrs AttrGetTPTimingIds, reply *[]string) error

Queries timing identities on specific tariff plan.

func (*ApierV1) LoadAccountActions

func (self *ApierV1) LoadAccountActions(attrs utils.TPAccountActions, reply *string) error

Process dependencies and load a specific AccountActions profile from storDb into dataDb.

func (*ApierV1) LoadRatingPlan

func (self *ApierV1) LoadRatingPlan(attrs AttrLoadRatingPlan, reply *string) error

Process dependencies and load a specific rating plan from storDb into dataDb.

func (*ApierV1) LoadRatingProfile

func (self *ApierV1) LoadRatingProfile(attrs utils.TPRatingProfile, reply *string) error

Process dependencies and load a specific rating profile from storDb into dataDb.

func (*ApierV1) LoadTariffPlanFromFolder

func (self *ApierV1) LoadTariffPlanFromFolder(attrs AttrLoadTPFromFolder, reply *string) error

func (*ApierV1) ReloadCache

func (self *ApierV1) ReloadCache(attrs utils.ApiReloadCache, reply *string) error

func (*ApierV1) ReloadScheduler

func (self *ApierV1) ReloadScheduler(input string, reply *string) error

func (*ApierV1) RemAccountActionTriggers

func (self *ApierV1) RemAccountActionTriggers(attrs AttrRemAcntActionTriggers, reply *string) error

Returns a list of ActionTriggers on an account

func (*ApierV1) RemActionTiming

func (self *ApierV1) RemActionTiming(attrs AttrRemActionTiming, reply *string) error

Removes an ActionTimings or parts of it depending on filters being set

func (*ApierV1) RemTPAccountActions

func (self *ApierV1) RemTPAccountActions(attrs utils.TPAccountActions, reply *string) error

Removes specific AccountActions on Tariff plan

func (*ApierV1) RemTPActionTimings

func (self *ApierV1) RemTPActionTimings(attrs AttrGetTPActionTimings, reply *string) error

Removes specific ActionTimings on Tariff plan

func (*ApierV1) RemTPActionTriggers

func (self *ApierV1) RemTPActionTriggers(attrs AttrGetTPActionTriggers, reply *string) error

Removes specific ActionTriggers on Tariff plan

func (*ApierV1) RemTPActions

func (self *ApierV1) RemTPActions(attrs AttrGetTPActions, reply *string) error

Removes specific Actions on Tariff plan

func (*ApierV1) RemTPDestination

func (self *ApierV1) RemTPDestination(attrs AttrGetTPDestination, reply *string) error

func (*ApierV1) RemTPDestinationRate

func (self *ApierV1) RemTPDestinationRate(attrs AttrGetTPDestinationRate, reply *string) error

Removes specific DestinationRate on Tariff plan

func (*ApierV1) RemTPRate

func (self *ApierV1) RemTPRate(attrs AttrGetTPRate, reply *string) error

Removes specific Rate on Tariff plan

func (*ApierV1) RemTPRatingPlan

func (self *ApierV1) RemTPRatingPlan(attrs AttrGetTPRatingPlan, reply *string) error

Removes specific RatingPlan on Tariff plan

func (*ApierV1) RemTPRatingProfile

func (self *ApierV1) RemTPRatingProfile(attrs utils.TPRatingProfile, reply *string) error

Removes specific RatingProfile on Tariff plan

func (*ApierV1) RemTPTiming

func (self *ApierV1) RemTPTiming(attrs AttrGetTPTiming, reply *string) error

Removes specific Timing on Tariff plan

func (*ApierV1) SetAccount

func (self *ApierV1) SetAccount(attr AttrSetAccount, reply *string) error

Ads a new account into dataDb. If already defined, returns success.

func (*ApierV1) SetActionTimings

func (self *ApierV1) SetActionTimings(attrs AttrSetActionTimings, reply *string) error

func (*ApierV1) SetActions

func (self *ApierV1) SetActions(attrs AttrSetActions, reply *string) error

func (*ApierV1) SetRatingProfile

func (self *ApierV1) SetRatingProfile(attrs AttrSetRatingProfile, reply *string) error

Sets a specific rating profile working with data directly in the RatingDb without involving storDb

func (*ApierV1) SetTPAccountActions

func (self *ApierV1) SetTPAccountActions(attrs utils.TPAccountActions, reply *string) error

Creates a new AccountActions profile within a tariff plan

func (*ApierV1) SetTPActionTimings

func (self *ApierV1) SetTPActionTimings(attrs utils.TPActionTimings, reply *string) error

Creates a new ActionTimings profile within a tariff plan

func (*ApierV1) SetTPActionTriggers

func (self *ApierV1) SetTPActionTriggers(attrs utils.TPActionTriggers, reply *string) error

Creates a new ActionTriggers profile within a tariff plan

func (*ApierV1) SetTPActions

func (self *ApierV1) SetTPActions(attrs utils.TPActions, reply *string) error

Creates a new Actions profile within a tariff plan

func (*ApierV1) SetTPDestination

func (self *ApierV1) SetTPDestination(attrs utils.TPDestination, reply *string) error

Creates a new destination within a tariff plan

func (*ApierV1) SetTPDestinationRate

func (self *ApierV1) SetTPDestinationRate(attrs utils.TPDestinationRate, reply *string) error

Creates a new DestinationRate profile within a tariff plan

func (*ApierV1) SetTPRate

func (self *ApierV1) SetTPRate(attrs utils.TPRate, reply *string) error

Creates a new rate within a tariff plan

func (*ApierV1) SetTPRatingPlan

func (self *ApierV1) SetTPRatingPlan(attrs utils.TPRatingPlan, reply *string) error

Creates a new DestinationRateTiming profile within a tariff plan

func (*ApierV1) SetTPRatingProfile

func (self *ApierV1) SetTPRatingProfile(attrs utils.TPRatingProfile, reply *string) error

Creates a new RatingProfile within a tariff plan

func (*ApierV1) SetTPTiming

func (self *ApierV1) SetTPTiming(attrs utils.ApierTPTiming, reply *string) error

Creates a new timing within a tariff plan

type AttrAcntAction

type AttrAcntAction struct {
	Tenant    string
	Account   string
	Direction string
}

type AttrAddActionTrigger

type AttrAddActionTrigger struct {
	Tenant         string
	Account        string
	Direction      string
	BalanceId      string
	ThresholdType  string
	ThresholdValue float64
	DestinationId  string
	Weight         float64
	ActionsId      string
}

type AttrAddBalance

type AttrAddBalance struct {
	Tenant    string
	Account   string
	BalanceId string
	Direction string
	Value     float64
	Weight    float64
	Overwrite bool // When true it will reset if the balance is already there
}

type AttrExecuteAction

type AttrExecuteAction struct {
	Direction string
	Tenant    string
	Account   string
	ActionsId string
}

type AttrGetBalance

type AttrGetBalance struct {
	Tenant    string
	Account   string
	BalanceId string
	Direction string
}

type AttrGetTPAccountActionIds

type AttrGetTPAccountActionIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPAccountActions

type AttrGetTPAccountActions struct {
	TPid   string // Tariff plan id
	LoadId string // AccountActions id

}

type AttrGetTPActionIds

type AttrGetTPActionIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPActionTimingIds

type AttrGetTPActionTimingIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPActionTimings

type AttrGetTPActionTimings struct {
	TPid            string // Tariff plan id
	ActionTimingsId string // ActionTimings id
}

type AttrGetTPActionTriggerIds

type AttrGetTPActionTriggerIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPActionTriggers

type AttrGetTPActionTriggers struct {
	TPid             string // Tariff plan id
	ActionTriggersId string // ActionTrigger id
}

type AttrGetTPActions

type AttrGetTPActions struct {
	TPid      string // Tariff plan id
	ActionsId string // Actions id
}

type AttrGetTPDestination

type AttrGetTPDestination struct {
	TPid          string // Tariff plan id
	DestinationId string // Destination id
}

type AttrGetTPDestinationIds

type AttrGetTPDestinationIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPDestinationRate

type AttrGetTPDestinationRate struct {
	TPid              string // Tariff plan id
	DestinationRateId string // Rate id
}

type AttrGetTPIds

type AttrGetTPIds struct {
}

type AttrGetTPRate

type AttrGetTPRate struct {
	TPid   string // Tariff plan id
	RateId string // Rate id
}

type AttrGetTPRateIds

type AttrGetTPRateIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPRatingPlan

type AttrGetTPRatingPlan struct {
	TPid         string // Tariff plan id
	RatingPlanId string // Rate id
}

type AttrGetTPRatingPlanIds

type AttrGetTPRatingPlanIds struct {
	TPid string // Tariff plan id
}

type AttrGetTPRatingProfile

type AttrGetTPRatingProfile struct {
	TPid   string // Tariff plan id
	LoadId string // RatingProfile id
}

type AttrGetTPTiming

type AttrGetTPTiming struct {
	TPid     string // Tariff plan id
	TimingId string // Timing id
}

type AttrGetTPTimingIds

type AttrGetTPTimingIds struct {
	TPid string // Tariff plan id
}

type AttrLoadRatingPlan

type AttrLoadRatingPlan struct {
	TPid         string
	RatingPlanId string
}

type AttrLoadTPFromFolder

type AttrLoadTPFromFolder struct {
	FolderPath string // Take files from folder absolute path
	DryRun     bool   // Do not write to database but parse only
	FlushDb    bool   // Flush previous data before loading new one
}

type AttrRemAcntActionTriggers

type AttrRemAcntActionTriggers struct {
	Tenant          string // Tenant he account belongs to
	Account         string // Account name
	Direction       string // Traffic direction
	ActionTriggerId string // Id filtering only specific id to remove
}

type AttrRemActionTiming

type AttrRemActionTiming struct {
	ActionTimingsId string // Id identifying the ActionTimings profile
	ActionTimingId  string // Internal CGR id identifying particular ActionTiming, *all for all user related ActionTimings to be canceled
	Tenant          string // Tenant he account belongs to
	Account         string // Account name
	Direction       string // Traffic direction
	ReloadScheduler bool   // If set it will reload the scheduler after adding
}

type AttrSetAccount

type AttrSetAccount struct {
	Tenant          string
	Direction       string
	Account         string
	Type            string // <*prepaid|*postpaid>
	ActionTimingsId string
}

type AttrSetActionTimings

type AttrSetActionTimings struct {
	ActionTimingsId string             // Profile id
	Overwrite       bool               // If previously defined, will be overwritten
	ActionTimings   []*ApiActionTiming // Set of actions this Actions profile will perform
	ReloadScheduler bool               // Enables automatic reload of the scheduler (eg: useful when adding a single action timing)
}

type AttrSetActions

type AttrSetActions struct {
	ActionsId string            // Actions id
	Overwrite bool              // If previously defined, will be overwritten
	Actions   []*utils.TPAction // Set of actions this Actions profile will perform
}

type AttrSetRatingProfile

type AttrSetRatingProfile struct {
	Tenant                string                      // Tenant's Id
	TOR                   string                      // TypeOfRecord
	Direction             string                      // Traffic direction, OUT is the only one supported for now
	Subject               string                      // Rating subject, usually the same as account
	Overwrite             bool                        // Overwrite if exists
	RatingPlanActivations []*utils.TPRatingActivation // Activate rate profiles at specific time
}

type AttrTPDestinationRateIds

type AttrTPDestinationRateIds struct {
	TPid string // Tariff plan id
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL