feat: add image management functionality
- Implemented image folder repository with CRUD operations. - Added image reference repository for managing image references to articles. - Created image repository for handling image assets, including listing, inserting, updating, and deleting images. - Introduced image usage repository to track storage usage and quotas for tenants. - Added SQL queries for image assets, folders, references, and usage. - Developed image handler for HTTP endpoints to manage images and folders. - Created database migration scripts for image-related tables and structures.
This commit is contained in:
@@ -17,6 +17,7 @@ type Client interface {
|
||||
Validate() error
|
||||
PutBytes(ctx context.Context, objectKey string, content []byte, contentType string) error
|
||||
GetBytes(ctx context.Context, objectKey string) ([]byte, error)
|
||||
Exists(ctx context.Context, objectKey string) (bool, error)
|
||||
Delete(ctx context.Context, objectKey string) error
|
||||
PublicURL(objectKey string) (string, error)
|
||||
}
|
||||
@@ -54,6 +55,10 @@ func (c disabledClient) GetBytes(context.Context, string) ([]byte, error) {
|
||||
return nil, c.Validate()
|
||||
}
|
||||
|
||||
func (c disabledClient) Exists(context.Context, string) (bool, error) {
|
||||
return false, c.Validate()
|
||||
}
|
||||
|
||||
func (c disabledClient) Delete(context.Context, string) error {
|
||||
return c.Validate()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user