-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add objwrapper pkg #82
Conversation
9f88fd4
to
1799576
Compare
objwrapper/alioss.py
Outdated
|
||
def read_obj_raw(self, real_obj_id): | ||
data = self.read_object_content(real_obj_id) | ||
return data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
作为一个底层通用的库,只需要提供一个 read_obj(self, key) 的方法就行了。
objwrapper/alioss.py
Outdated
def get_name(self): | ||
return 'OSS storage backend' | ||
|
||
def list_objs(self, repo_id=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
作为一个通用的库,不应该有 seafile 特定的信息。这里 repo_id 应该改为 prefix。
objwrapper/s3.py
Outdated
yield obj | ||
|
||
|
||
def obj_exists(self, s3_path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的参数都改为 key 吧。
objwrapper/s3.py
Outdated
bucket = self.bucket | ||
self.client.delete_object(Bucket=bucket, Key=s3_path) | ||
|
||
def stat_raw(self, s3_path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stat_raw 改为 stat_obj。
No description provided.