🗃️ Created static Repository interfaces
This commit is contained in:
parent
43e96e2095
commit
f036ea127d
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue