Documentation
¶
Index ¶
- type GCloudFileStore
- func (g *GCloudFileStore) DeleteObject(ctx context.Context, key string) error
- func (g *GCloudFileStore) DownloadBytes(ctx context.Context, key string) ([]byte, error)
- func (g *GCloudFileStore) GetPath(key string) string
- func (g *GCloudFileStore) PresignedGetUrl(key string, opts ...filestoreoptions.PresignOption) (string, error)
- func (g *GCloudFileStore) PresignedPutUrl(key string, opts ...filestoreoptions.PresignOption) (string, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCloudFileStore ¶
type GCloudFileStore struct {
Client *storage.Client
BucketName string
ServiceAccount string
DefaultObjectCacheDuration *time.Duration
DefaultPresignExpirationDuration time.Duration
}
func New ¶
func New(bucketName string, opts ...Option) *GCloudFileStore
func (*GCloudFileStore) DeleteObject ¶ added in v1.1.61
func (g *GCloudFileStore) DeleteObject(ctx context.Context, key string) error
func (*GCloudFileStore) DownloadBytes ¶ added in v1.1.73
func (*GCloudFileStore) GetPath ¶ added in v1.1.73
func (g *GCloudFileStore) GetPath(key string) string
func (*GCloudFileStore) PresignedGetUrl ¶
func (g *GCloudFileStore) PresignedGetUrl(key string, opts ...filestoreoptions.PresignOption) (string, error)
func (*GCloudFileStore) PresignedPutUrl ¶
func (g *GCloudFileStore) PresignedPutUrl( key string, opts ...filestoreoptions.PresignOption, ) (string, error)
type Option ¶ added in v1.1.68
type Option func(*GCloudFileStore)
func WithServiceAccount ¶ added in v1.1.68
Click to show internal directories.
Click to hide internal directories.