Index fetches the entities.Webhook for an entities.UserID
(ctx context.Context, userID entities.UserID, params repositories.IndexParams)
| 50 | |
| 51 | // Index fetches the entities.Webhook for an entities.UserID |
| 52 | func (service *PhoneAPIKeyService) Index(ctx context.Context, userID entities.UserID, params repositories.IndexParams) ([]*entities.PhoneAPIKey, error) { |
| 53 | ctx, span, ctxLogger := service.tracer.StartWithLogger(ctx, service.logger) |
| 54 | defer span.End() |
| 55 | |
| 56 | phoneAPIKeys, err := service.repository.Index(ctx, userID, params) |
| 57 | if err != nil { |
| 58 | msg := fmt.Sprintf("could not fetch phone API Keys with params [%+#v]", params) |
| 59 | return nil, service.tracer.WrapErrorSpan(span, stacktrace.Propagate(err, msg)) |
| 60 | } |
| 61 | |
| 62 | ctxLogger.Info(fmt.Sprintf("fetched [%d] phone API Keys with prams [%+#v]", len(phoneAPIKeys), params)) |
| 63 | return phoneAPIKeys, nil |
| 64 | } |
| 65 | |
| 66 | // Create a new entities.PhoneAPIKey |
| 67 | func (service *PhoneAPIKeyService) Create(ctx context.Context, authContext entities.AuthContext, name string) (*entities.PhoneAPIKey, error) { |
nothing calls this directly
no test coverage detected