Files
hetty/pkg/reqlog/repo.go

17 lines
528 B
Go
Raw Normal View History

2020-09-26 23:36:48 +02:00
package reqlog
import (
"context"
2020-10-04 11:50:03 +02:00
"net/http"
"time"
2020-09-26 23:36:48 +02:00
2020-10-01 21:46:35 +02:00
"github.com/dstotijn/hetty/pkg/scope"
2020-09-26 23:36:48 +02:00
)
type Repository interface {
2020-10-01 21:46:35 +02:00
FindRequestLogs(ctx context.Context, opts FindRequestsOptions, scope *scope.Scope) ([]Request, error)
2020-10-04 11:50:03 +02:00
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)
2020-09-26 23:36:48 +02:00
}