🗃️ Created static Repository interfaces

This commit is contained in:
Maxim Lebedev 2023-11-09 06:48:06 +06:00
parent 43e96e2095
commit f036ea127d
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package static
import (
"context"
"source.toby3d.me/toby3d/home/internal/domain"
)
type (
Repository interface {
Get(ctx context.Context, path string) (*domain.File, error)
Fetch(ctx context.Context, dir string) ([]*domain.File, int, error)
}
dummyRepository struct{}
)
func NewDummyRepository() dummyRepository {
return dummyRepository{}
}
func (dummyRepository) Get(ctx context.Context, path string) (*domain.File, error) { return nil, nil }
func (dummyRepository) Fetch(ctx context.Context, dir string) ([]*domain.File, int, error) {
return nil, 0, nil
}