SoXX
5784b469b9
All checks were successful
Gitea Build Check / Build (push) Successful in 11m36s
Signed-off-by: SoXX <soxx@fenpa.ws>
20 lines
512 B
Go
20 lines
512 B
Go
package database
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
|
)
|
|
|
|
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)
|
|
}
|