Replace Cayley with SQLite3

This commit is contained in:
David Stotijn
2020-10-04 11:50:03 +02:00
parent d48f1f058d
commit ba7d88dfc5
22 changed files with 649 additions and 861 deletions

View File

@ -2,14 +2,15 @@ package reqlog
import (
"context"
"net/http"
"time"
"github.com/dstotijn/hetty/pkg/scope"
"github.com/google/uuid"
)
type Repository interface {
FindRequestLogs(ctx context.Context, opts FindRequestsOptions, scope *scope.Scope) ([]Request, error)
FindRequestLogByID(ctx context.Context, id uuid.UUID) (Request, error)
AddRequestLog(ctx context.Context, reqLog Request) error
AddResponseLog(ctx context.Context, resLog Response) error
FindRequestLogByID(ctx context.Context, id int64) (Request, error)
AddRequestLog(ctx context.Context, req http.Request, body []byte, timestamp time.Time) (*Request, error)
AddResponseLog(ctx context.Context, reqID int64, res http.Response, body []byte, timestamp time.Time) (*Response, error)
}