Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c Client) CacheKey(object blobstorage.UploadableObject) string
- func (c Client) Copy(ctx context.Context, src, dst blobstorage.UploadableObject) error
- func (c Client) DeleteFile(ctx context.Context, object blobstorage.UploadableObject) error
- func (c Client) FileExists(ctx context.Context, object blobstorage.UploadableObject) (bool, error)
- func (c Client) FindFilesWithName(ctx context.Context, bucketName, prefix, filename string) ([]string, error)
- func (c Client) GetChecksum(ctx context.Context, object blobstorage.UploadableObject) (string, error)
- func (c Client) GetPublicURL(object blobstorage.UploadableObject) string
- func (c Client) GetSignedURL(ctx context.Context, object blobstorage.UploadableObject, ...) (string, error)
- func (c Client) InitResumableUpload(ctx context.Context, object blobstorage.UploadableObject) (*blobstorage.ResumableUploadResponse, error)
- func (c Client) ReadFile(ctx context.Context, object blobstorage.UploadableObject) (io.ReadCloser, error)
- func (c Client) SanitizeFilename(filename string, timestamp int64) string
- func (c Client) UploadFile(ctx context.Context, object blobstorage.UploadableObject, fileReader io.Reader) (string, error)
- type Config
- type DefaultPublicUploadable
Constants ¶
View Source
const (
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
Variables ¶
View Source
var DefaultExpireDuration = 120 * time.Minute
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) CacheKey ¶
func (c Client) CacheKey(object blobstorage.UploadableObject) string
func (Client) Copy ¶
func (c Client) Copy(ctx context.Context, src, dst blobstorage.UploadableObject) error
func (Client) DeleteFile ¶
func (c Client) DeleteFile(ctx context.Context, object blobstorage.UploadableObject) error
func (Client) FileExists ¶
func (c Client) FileExists(ctx context.Context, object blobstorage.UploadableObject) (bool, error)
func (Client) FindFilesWithName ¶
func (Client) GetChecksum ¶
func (c Client) GetChecksum(ctx context.Context, object blobstorage.UploadableObject) (string, error)
func (Client) GetPublicURL ¶
func (c Client) GetPublicURL(object blobstorage.UploadableObject) string
func (Client) GetSignedURL ¶
func (c Client) GetSignedURL(ctx context.Context, object blobstorage.UploadableObject, options ...blobstorage.Option) (string, error)
func (Client) InitResumableUpload ¶
func (c Client) InitResumableUpload(ctx context.Context, object blobstorage.UploadableObject) (*blobstorage.ResumableUploadResponse, error)
func (Client) ReadFile ¶
func (c Client) ReadFile(ctx context.Context, object blobstorage.UploadableObject) (io.ReadCloser, error)
func (Client) SanitizeFilename ¶
func (Client) UploadFile ¶
func (c Client) UploadFile(ctx context.Context, object blobstorage.UploadableObject, fileReader io.Reader) (string, error)
type DefaultPublicUploadable ¶
type DefaultPublicUploadable struct {
Path string
}
func PublicUploadable ¶
func PublicUploadable(fileLocation string) DefaultPublicUploadable
func (DefaultPublicUploadable) GetBucketName ¶
func (p DefaultPublicUploadable) GetBucketName() string
func (DefaultPublicUploadable) GetFileLocation ¶
func (p DefaultPublicUploadable) GetFileLocation() string
func (DefaultPublicUploadable) GetTimestamp ¶
func (p DefaultPublicUploadable) GetTimestamp() int64
Click to show internal directories.
Click to hide internal directories.