Skip to content
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

Merged
merged 13 commits into from
Oct 26, 2024
Merged

Add objwrapper pkg #82

merged 13 commits into from
Oct 26, 2024

Conversation

feiniks
Copy link
Contributor

@feiniks feiniks commented Oct 23, 2024

No description provided.

@feiniks feiniks force-pushed the wrapper branch 2 times, most recently from 9f88fd4 to 1799576 Compare October 25, 2024 07:47

def read_obj_raw(self, real_obj_id):
data = self.read_object_content(real_obj_id)
return data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作为一个底层通用的库,只需要提供一个 read_obj(self, key) 的方法就行了。

def get_name(self):
return 'OSS storage backend'

def list_objs(self, repo_id=None):
Copy link
Member

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):
Copy link
Member

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stat_raw 改为 stat_obj。

@killing killing merged commit adca480 into master Oct 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants