-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstore.go
37 lines (28 loc) · 856 Bytes
/
store.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package store
import (
"context"
"github.com/takutakahashi/billcap-schema/pkg/schema"
)
type Store interface {
Load(ctx context.Context, data schema.RawData) error
LoadTransformed(ctx context.Context, data schema.TransformedData) error
Transform(ctx context.Context) ([]schema.TransformedData, error)
Migrate(ctx context.Context) error
Backup(ctx context.Context) error
}
type NullStore struct{}
func (s *NullStore) Load(ctx context.Context, data schema.RawData) error {
return nil
}
func (s *NullStore) LoadTransformed(ctx context.Context, data schema.TransformedData) error {
return nil
}
func (s *NullStore) Transform(ctx context.Context) ([]schema.TransformedData, error) {
return nil, nil
}
func (s *NullStore) Migrate(ctx context.Context) error {
return nil
}
func (s *NullStore) Backup(ctx context.Context) error {
return nil
}