Documentation
¶
Index ¶
- Variables
- func BucketExists(ctx context.Context, bh *gcs.BucketHandle) bool
- func Client(ctx context.Context, options ...option.ClientOption) (*gcs.Client, error)
- func CloudStorageEvent(c *gin.Context)
- func CreateBucket(ctx context.Context, bucket string) (*gcs.BucketHandle, error)
- func DeleteBucket(ctx context.Context, bucket string) error
- func DeleteObject(ctx context.Context, bh *gcs.BucketHandle, path string) error
- func ListAllBuckets(ctx context.Context) []string
- func Must[T any](r T, err error) T
- type Bucket
- type Location
- type Metadata
- type ReadResult
- type WriteResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ObjectCreateError = errs.NotCreatedError.NewSubtype("Object Write Error")
View Source
var ObjectWriteError = errs.NotWrittenError.NewSubtype("Object Write Error")
Functions ¶
func BucketExists ¶
func BucketExists(ctx context.Context, bh *gcs.BucketHandle) bool
func CloudStorageEvent ¶
func CreateBucket ¶
func DeleteObject ¶
func ListAllBuckets ¶
Types ¶
type Bucket ¶
func BucketWithObjects ¶
type Metadata ¶
type Metadata struct { Path string `json:"path"` Size int64 `json:"size"` ContentType string `json:"content_type"` CreatedAt timestamp.Timestamp `json:"created_at"` LastUpdatedAt timestamp.Timestamp `json:"last_updated_at"` }
func AttrToObject ¶
func AttrToObject(attrs *gcs.ObjectAttrs) Metadata
type ReadResult ¶
func ReadObject ¶
type WriteResult ¶
func WriteObject ¶
Click to show internal directories.
Click to hide internal directories.