2020-09-26 23:36:48 +02:00
|
|
|
package reqlog
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-01-21 11:45:54 +01:00
|
|
|
|
2025-02-05 21:54:59 +01:00
|
|
|
httppb "github.com/dstotijn/hetty/pkg/http"
|
2020-09-26 23:36:48 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type Repository interface {
|
2025-02-05 21:54:59 +01:00
|
|
|
FindRequestLogs(ctx context.Context, projectID string, filterFn func(*HttpRequestLog) (bool, error)) ([]*HttpRequestLog, error)
|
|
|
|
FindRequestLogByID(ctx context.Context, projectID, id string) (*HttpRequestLog, error)
|
|
|
|
StoreRequestLog(ctx context.Context, reqLog *HttpRequestLog) error
|
|
|
|
StoreResponseLog(ctx context.Context, projectID, reqLogID string, resLog *httppb.Response) error
|
|
|
|
ClearRequestLogs(ctx context.Context, projectID string) error
|
2020-09-26 23:36:48 +02:00
|
|
|
}
|