gcs

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gcs

type Gcs struct {
	// contains filtered or unexported fields
}

func NewGcs

func NewGcs(ctx context.Context) (*Gcs, error)

func (*Gcs) Buckets

func (s *Gcs) Buckets(ctx context.Context, projectID string) ([]string, error)

バケット一覧

func (*Gcs) Close

func (s *Gcs) Close() error

func (*Gcs) CreateBucket

func (s *Gcs) CreateBucket(ctx context.Context, projectID, name string) error

バケット作成 if not exists

func (*Gcs) Delete

func (s *Gcs) Delete(ctx context.Context, bucket, name string) error

オブジェクト削除 if exists

func (*Gcs) DeleteBucket

func (s *Gcs) DeleteBucket(ctx context.Context, name string) error

バケット削除 if exists

func (*Gcs) Exists

func (s *Gcs) Exists(ctx context.Context, bucket, name string) (bool, error)

オブジェクト存在確認

func (*Gcs) ExistsBucket

func (s *Gcs) ExistsBucket(ctx context.Context, projectID, name string) (bool, error)

バケット存在確認

func (*Gcs) List

func (s *Gcs) List(ctx context.Context, bucket, prefix string) ([]string, error)

オブジェクト一覧

func (*Gcs) Read

func (s *Gcs) Read(ctx context.Context, bucket, name string) ([]byte, error)

オブジェクト読み込み

func (*Gcs) Write

func (s *Gcs) Write(ctx context.Context, bucket, name, contentType string, bytes []byte) error

オブジェクト書き込み create or replace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL