build fix again

This commit is contained in:
Radu Ioan Fericean
2015-12-08 15:53:59 +02:00
parent ceb8e493de
commit ac3d735b66

View File

@@ -792,6 +792,18 @@ type AttrDerivedChargers struct {
Direction, Tenant, Category, Account, Subject, Destination string
}
func NewTAFromAccountKey(accountKey string) (*TenantAccount, error) {
accountSplt := strings.Split(accountKey, CONCATENATED_KEY_SEP)
if len(accountSplt) != 2 {
return nil, fmt.Errorf("Unsupported format for TenantAccount: %s", accountKey)
}
return &TenantAccount{accountSplt[0], accountSplt[1]}, nil
}
type TenantAccount struct {
Tenant, Account string
}
func NewDTCSFromRPKey(rpKey string) (*DirectionTenantCategorySubject, error) {
rpSplt := strings.Split(rpKey, CONCATENATED_KEY_SEP)
if len(rpSplt) != 4 {