-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(asset): remove legacy GCS repository implementation
- Deleted the old GCS repository code to streamline asset management. - Updated the new repository implementation to align with the latest domain structure. - Ensured compatibility with the new repository interface for improved modularity and maintainability.
- Loading branch information
1 parent
6dbcc3a
commit 7bacd36
Showing
3 changed files
with
33 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package repository | ||
|
||
import ( | ||
"context" | ||
"io" | ||
|
||
"github.com/reearth/reearthx/asset/domain" | ||
) | ||
|
||
type Reader interface { | ||
Read(ctx context.Context, id domain.ID) (*domain.Asset, error) | ||
List(ctx context.Context) ([]*domain.Asset, error) | ||
} | ||
|
||
type Writer interface { | ||
Create(ctx context.Context, asset *domain.Asset) error | ||
Update(ctx context.Context, asset *domain.Asset) error | ||
Delete(ctx context.Context, id domain.ID) error | ||
} | ||
|
||
type FileOperator interface { | ||
Upload(ctx context.Context, id domain.ID, content io.Reader) error | ||
Download(ctx context.Context, id domain.ID) (io.ReadCloser, error) | ||
GetUploadURL(ctx context.Context, id domain.ID) (string, error) | ||
} | ||
|
||
type Repository interface { | ||
Reader | ||
Writer | ||
FileOperator | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters