|
11 | 11 | _ ProjectReporter = (*noopProjectReporter)(nil) |
12 | 12 | _ CarrierReporter = (*noopCarrierReporter)(nil) |
13 | 13 | _ CountryReporter = (*noopCountryReporter)(nil) |
| 14 | + _ PhoneReporter = (*noopPhoneReporter)(nil) |
14 | 15 | _ CallReporter = (*noopCallReporter)(nil) |
15 | 16 | ) |
16 | 17 |
|
@@ -74,10 +75,26 @@ func NewNoopCountryReporter() CountryReporter { |
74 | 75 | func (r *noopCountryReporter) RegisterFunc(f func(ts time.Time, tx CountryTx) bool) {} |
75 | 76 | func (r *noopCountryReporter) Tx(f func(CountryTx)) {} |
76 | 77 | func (r *noopCountryReporter) TxAt(ts time.Time, f func(CountryTx)) {} |
77 | | -func (r *noopCountryReporter) WithCall(id string) CallReporter { |
| 78 | +func (r *noopCountryReporter) WithPhone(number string) PhoneReporter { |
| 79 | + return &noopPhoneReporter{} |
| 80 | +} |
| 81 | +func (r *noopCountryReporter) WithDeferredPhone() (PhoneReporter, KeyResolver) { |
| 82 | + return &noopPhoneReporter{}, noopKeyResolver{} |
| 83 | +} |
| 84 | + |
| 85 | +type noopPhoneReporter struct{} |
| 86 | + |
| 87 | +func NewNoopPhoneReporter() PhoneReporter { |
| 88 | + return &noopPhoneReporter{} |
| 89 | +} |
| 90 | + |
| 91 | +func (r *noopPhoneReporter) RegisterFunc(f func(ts time.Time, tx PhoneTx) bool) {} |
| 92 | +func (r *noopPhoneReporter) Tx(f func(PhoneTx)) {} |
| 93 | +func (r *noopPhoneReporter) TxAt(ts time.Time, f func(PhoneTx)) {} |
| 94 | +func (r *noopPhoneReporter) WithCall(id string) CallReporter { |
78 | 95 | return &noopCallReporter{} |
79 | 96 | } |
80 | | -func (r *noopCountryReporter) WithDeferredCall() (CallReporter, KeyResolver) { |
| 97 | +func (r *noopPhoneReporter) WithDeferredCall() (CallReporter, KeyResolver) { |
81 | 98 | return &noopCallReporter{}, noopKeyResolver{} |
82 | 99 | } |
83 | 100 |
|
|
0 commit comments