Versions in this module Expand all Collapse all v1 v1.0.0 Dec 26, 2025 Changes in this version + var GCSCopyObject = ae.GetCustomErr("ERR_OS_GCS_1005", "error while copying object in gcs bucket", false) + var GCSDeleteObject = ae.GetCustomErr("ERR_OS_GCS_1004", "error while deleting object from gcs bucket", false) + var GCSGetObject = ae.GetCustomErr("ERR_OS_GCS_1002", "error while getting object from gcs bucket", false) + var GCSGetObjects = ae.GetCustomErr("ERR_OS_GCS_1001", "error while getting objects from gcs bucket", false) + var GCSPutObject = ae.GetCustomErr("ERR_OS_GCS_1003", "error while putting object to gcs bucket", false) + var GoogleCSBackendClient = ae.GetCustomErr("ERR_OS_GCS_1000", "failed to initialise the gcs client", false) + var S3BackendClient = ae.GetCustomErr("ERR_OS_S3_2000", "failed to initialise the s3 client", false) + var S3CopyObject = ae.GetCustomErr("ERR_OS_S3_2005", "error while copying object in s3 bucket", false) + var S3DeleteObject = ae.GetCustomErr("ERR_OS_S3_2004", "error while deleting object from s3 bucket", false) + var S3GetObject = ae.GetCustomErr("ERR_OS_S3_2002", "error while getting object from s3 bucket", false) + var S3GetObjects = ae.GetCustomErr("ERR_OS_S3_2001", "error while getting objects from s3 bucket", false) + var S3PutObject = ae.GetCustomErr("ERR_OS_S3_2003", "error while putting object to s3 bucket", false) + type GoogleCSBackend struct + Client IGCSClient + Prefix string + func NewGoogleCSBackend(ctx context.Context, bucket string, prefix string) (*GoogleCSBackend, *ae.AppError) + func (b GoogleCSBackend) CopyObject(ctx context.Context, srcPath, dstPath string) *ae.AppError + func (b GoogleCSBackend) DeleteObject(ctx context.Context, path string) *ae.AppError + func (b GoogleCSBackend) GetObject(ctx context.Context, path string) (Object, *ae.AppError) + func (b GoogleCSBackend) GetObjects(ctx context.Context, prefix string) ([]Object, *ae.AppError) + func (b GoogleCSBackend) PutObject(ctx context.Context, path string, content []byte) *ae.AppError + type IGCSClient interface + Object func(name string) *storage.ObjectHandle + Objects func(ctx context.Context, q *storage.Query) *storage.ObjectIterator + type IS3Client interface + CopyObjectWithContext func(ctx aws.Context, input *s3.CopyObjectInput, opts ...request.Option) (*s3.CopyObjectOutput, error) + DeleteObjectWithContext func(ctx aws.Context, input *s3.DeleteObjectInput, opts ...request.Option) (*s3.DeleteObjectOutput, error) + GetObjectWithContext func(ctx aws.Context, input *s3.GetObjectInput, opts ...request.Option) (*s3.GetObjectOutput, error) + ListObjectsWithContext func(ctx aws.Context, input *s3.ListObjectsInput, opts ...request.Option) (*s3.ListObjectsOutput, error) + type IS3Uploader interface + UploadWithContext func(ctx aws.Context, input *s3manager.UploadInput, ...) (*s3manager.UploadOutput, error) + type IStorageBackend interface + CopyObject func(ctx context.Context, srcPath, dstPath string) *ae.AppError + DeleteObject func(ctx context.Context, path string) *ae.AppError + GetObject func(ctx context.Context, path string) (Object, *ae.AppError) + GetObjects func(ctx context.Context, prefix string) ([]Object, *ae.AppError) + PutObject func(ctx context.Context, path string, content []byte) *ae.AppError + type Metadata struct + Name string + Version string + type Object struct + Content []byte + LastModified time.Time + Meta Metadata + Path string + type S3Backend struct + Bucket string + Client IS3Client + Downloader *s3manager.Downloader + Prefix string + Uploader IS3Uploader + func NewS3Backend(bucket string, prefix string, region string, disableSSL bool) (*S3Backend, *ae.AppError) + func NewS3BackendWithCredentials(bucket string, prefix string, region string, disableSSL bool, ...) (*S3Backend, *ae.AppError) + func NewS3BackendWithEndpoint(bucket string, prefix string, region string, endpoint string, disableSSL bool, ...) (*S3Backend, *ae.AppError) + func (b *S3Backend) CopyObject(ctx context.Context, srcPath, dstPath string) *ae.AppError + func (b *S3Backend) DeleteObject(ctx context.Context, path string) *ae.AppError + func (b *S3Backend) GetObject(ctx context.Context, path string) (Object, *ae.AppError) + func (b *S3Backend) GetObjects(ctx context.Context, prefix string) ([]Object, *ae.AppError) + func (b *S3Backend) PutObject(ctx context.Context, path string, content []byte) *ae.AppError