Versions in this module Expand all Collapse all v0 v0.1.0 May 3, 2023 Changes in this version + const GSAnonHost + const GSCookieHost + var ErrNotFoundTest = fmt.Errorf("not found error which should only be used in tests") + var PreconditionFailedObjectAlreadyExists = fmt.Errorf("object already exists") + func IsNotExist(err error) bool + func LogClose(c io.Closer) + func ReadContent(ctx context.Context, logger *logrus.Entry, opener Opener, path string) ([]byte, error) + func WriteContent(ctx context.Context, logger *logrus.Entry, opener Opener, path string, ...) error + type Attributes struct + ContentEncoding string + Metadata map[string]string + Size int64 + type ObjectAttributes struct + IsDir bool + Name string + ObjName string + type ObjectAttrsToUpdate struct + ContentEncoding *string + Metadata map[string]string + type ObjectIterator interface + Next func(ctx context.Context) (attr ObjectAttributes, err error) + type Opener interface + Attributes func(ctx context.Context, path string) (Attributes, error) + Iterator func(ctx context.Context, prefix, delimiter string) (ObjectIterator, error) + RangeReader func(ctx context.Context, path string, offset, length int64) (io.ReadCloser, error) + Reader func(ctx context.Context, path string) (ReadCloser, error) + SignedURL func(ctx context.Context, path string, opts SignedURLOptions) (string, error) + UpdateAtributes func(context.Context, string, ObjectAttrsToUpdate) (*Attributes, error) + Writer func(ctx context.Context, path string, opts ...WriterOptions) (WriteCloser, error) + func NewGCSOpener(gcsClient *storage.Client) Opener + func NewOpener(ctx context.Context, gcsCredentialsFile, s3CredentialsFile string) (Opener, error) + type ReadCloser = io.ReadCloser + type SignedURLOptions struct + UseGSCookieAuth bool + type WriteCloser = io.WriteCloser + type WriterOptions struct + BufferSize *int64 + CacheControl *string + ContentEncoding *string + ContentType *string + Metadata map[string]string + PreconditionDoesNotExist *bool + func (wo WriterOptions) Apply(opts *WriterOptions)