feat: extract get function
This commit is contained in:
@ -27,13 +27,25 @@ type Items struct {
|
||||
}
|
||||
|
||||
type IRootFolderPath interface {
|
||||
GetRootFolder() string
|
||||
GetRootFolderPath() string
|
||||
}
|
||||
|
||||
type IRootFolderId interface {
|
||||
GetRootFolderId() string
|
||||
}
|
||||
|
||||
type RootFolderPath struct {
|
||||
RootFolder string `json:"root_folder" help:"root folder path" default:"/"`
|
||||
}
|
||||
|
||||
func (r RootFolderPath) GetRootFolder() string {
|
||||
type RootFolderId struct {
|
||||
RootFolder string `json:"root_folder" help:"root folder id"`
|
||||
}
|
||||
|
||||
func (r RootFolderPath) GetRootFolderPath() string {
|
||||
return r.RootFolder
|
||||
}
|
||||
|
||||
func (r RootFolderId) GetRootFolderId() string {
|
||||
return r.RootFolder
|
||||
}
|
||||
|
@ -28,9 +28,9 @@ type Other interface {
|
||||
}
|
||||
|
||||
type Reader interface {
|
||||
Get(ctx context.Context, path string) (FileInfo, error)
|
||||
List(ctx context.Context, path string) ([]FileInfo, error)
|
||||
Link(ctx context.Context, path string, args LinkArgs) (*Link, error)
|
||||
//Get(ctx context.Context, path string) (FileInfo, error) // maybe not need
|
||||
}
|
||||
|
||||
type Writer interface {
|
||||
|
Reference in New Issue
Block a user