Replace GraphQL server with Connect RPC

This commit is contained in:
David Stotijn
2025-02-05 21:54:59 +01:00
parent 52c83a1989
commit 6889c9c183
53 changed files with 5875 additions and 11685 deletions

View File

@ -3,15 +3,13 @@ package reqlog
import (
"context"
"github.com/oklog/ulid"
"github.com/dstotijn/hetty/pkg/scope"
httppb "github.com/dstotijn/hetty/pkg/http"
)
type Repository interface {
FindRequestLogs(ctx context.Context, filter FindRequestsFilter, scope *scope.Scope) ([]RequestLog, error)
FindRequestLogByID(ctx context.Context, projectID, id ulid.ULID) (RequestLog, error)
StoreRequestLog(ctx context.Context, reqLog RequestLog) error
StoreResponseLog(ctx context.Context, projectID, reqLogID ulid.ULID, resLog ResponseLog) error
ClearRequestLogs(ctx context.Context, projectID ulid.ULID) error
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
}