feat: driver manage

This commit is contained in:
Noah Hsu
2022-06-07 18:13:55 +08:00
parent 84eb978731
commit 0d93a6aa41
10 changed files with 153 additions and 11 deletions

View File

@ -6,9 +6,18 @@ import (
)
type Driver interface {
Other
Reader
Writer
Other
}
type Other interface {
Config() Config
Init(ctx context.Context, account model.Account) error
Update(ctx context.Context, account model.Account) error
Drop(ctx context.Context) error
// GetAccount transform additional field to string and assign to account's addition
GetAccount() model.Account
}
type Reader interface {
@ -25,12 +34,3 @@ type Writer interface {
Remove(ctx context.Context, path string) error
Put(ctx context.Context, stream FileStream, parentPath string) error
}
type Other interface {
Init(ctx context.Context, account model.Account) error
Update(ctx context.Context, account model.Account) error
Drop(ctx context.Context) error
// GetAccount transform additional field to string and assign to account's addition
GetAccount() model.Account
Config() Config
}