feat: driver manage
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user