home/internal/resource/repository.go

16 lines
358 B
Go

package resource
import (
"context"
"source.toby3d.me/toby3d/home/internal/domain"
)
type Repository interface {
// Get returns Resource on path if exists.
Get(ctx context.Context, path string) (*domain.Resource, error)
// Fetch returns all resources from dir recursevly.
Fetch(ctx context.Context, pattern string) (domain.Resources, int, error)
}