Versions in this module Expand all Collapse all v0 v0.0.8 Aug 19, 2025 v0.0.7 Aug 16, 2025 Changes in this version + var TableNameValid = regexp.MustCompilePOSIX("^[a-zA-Z_][a-zA-Z0-9_.]*$").MatchString + func CreateResponseTableQuery(tableName string) string + func CreateResponseTables(db *sql.DB, tableNames ...string) error + func ResponseTables(db *sql.DB) ([]string, error) + func WriterQuery(tableName string) string + type MultiDatabaseRepository struct + func NewMultiDatabaseRepository(dbs []*sql.DB) (*MultiDatabaseRepository, error) + func NewMultiDatabaseRepositoryWithTTL(ttl time.Duration, cleanupInterval time.Duration, dbs []*sql.DB) (*MultiDatabaseRepository, error) + func (r *MultiDatabaseRepository) Close() error + func (r *MultiDatabaseRepository) FindByURL(ctx context.Context, url string) (*Response, error) + func (r *MultiDatabaseRepository) Write(ctx context.Context, url string, resp *Response) error + type Repository interface + FindByURL func(ctx context.Context, url string) (*Response, error) + Write func(ctx context.Context, url string, resp *Response) error + func NewRepository(db *sql.DB, ttl time.Duration, cleanupInterval time.Duration, ...) (Repository, error) + type Response struct + Body io.ReadCloser + DatabaseID int + Header map[string][]string + RequestTime time.Time + ResponseTime time.Time + Status int + TableName string + func HttpToResponse(resp *http.Response) (*Response, error)