v1.19.1
srijan-27
released this
09 Sep 12:20
·
501 commits
to development
since this release
Release v1.19.1
🛠 Enhancements
-
Support for S3 operations
FileStore can now be initialised as S3 with theAddFileStore
method.
Since, S3 is an external datasource, it can be imported by:
go get gofr.dev/pkg/gofr/datasource/file/s3
Example:
app.AddFileStore(s3.New(&s3.Config{EndPoint: "http://localhost:4566", BucketName: "gofr-bucket-2", Region: "us-east-1", AccessKeyID: "test", SecretAccessKey: "test"}))
Supported functionalities are:
Create(name string) (File, error) Mkdir(name string, perm os.FileMode) error MkdirAll(path string, perm os.FileMode) error Open(name string) (File, error) OpenFile(name string, flag int, perm os.FileMode) (File, error) Remove(name string) error RemoveAll(path string) error Rename(oldname, newname string) error ReadDir(dir string) ([]FileInfo, error) Stat(name string) (FileInfo, error) Getwd() (string, error)
🐞 Fixes
- Resolved SQL mocks
Previously the mock was not able to mock Query, QueryRow, Select, Dialect, HealthCheck methods. Hence, replaced mock-gen generated SQL mocks with go-mock-sql package in the mock container.