2024-07-19 08:03:35 +00:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2024-07-22 09:11:48 +00:00
|
|
|
"git.anthrove.art/Anthrove/otter-space-sdk/v2/pkg/models"
|
2024-07-19 08:03:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Source interface {
|
|
|
|
|
|
|
|
// CreateSource adds a new source to the database.
|
|
|
|
CreateSource(ctx context.Context, anthroveSource *models.Source) error
|
|
|
|
|
|
|
|
// GetAllSources retrieves all sources.
|
|
|
|
GetAllSources(ctx context.Context) ([]models.Source, error)
|
|
|
|
|
|
|
|
// GetSourceByDomain retrieves a source by its URL.
|
|
|
|
GetSourceByDomain(ctx context.Context, sourceDomain models.AnthroveSourceDomain) (*models.Source, error)
|
|
|
|
}
|