gcp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtClient

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

ExtClient client拡張オブジェクト

func (*ExtClient) Close

func (e *ExtClient) Close() error

Close 切断処理

func (*ExtClient) NewBucket

func (e *ExtClient) NewBucket(bucketName string)

NewBucket 新しいBucketオブジェクトを作成する

func (*ExtClient) ReadAndSave

func (e *ExtClient) ReadAndSave(readFileName, saveFileName string, perm os.FileMode) (err error)

ReadAndSave バケットからファイルを読み込み、保存する

func (*ExtClient) Write

func (e *ExtClient) Write(path string, p []byte) (fileName string, err error)

Write バケットにファイルを書き込む

type Storage

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

Storage Storage操作オブジェクト

func NewStorage

func NewStorage(bucketName, keyFilePath string) *Storage

NewStorage バケット名を持つStorageオブジェクトを返す

func (*Storage) NewClient

func (s *Storage) NewClient(ctx context.Context) (*ExtClient, error)

NewClient Storageを返す及び、認証処理(keyFilePathが空なら認証処理は行わない) clientのCloseを忘れないこと

func (*Storage) ReadOnce

func (s *Storage) ReadOnce(path, outputPath string) error

ReadOnce セッションを保持しない、一度きりの読み込み処理

func (*Storage) WriteOnce

func (s *Storage) WriteOnce(path, hex string) (string, error)

WriteOnce セッションを保持しない、一度きりの書き込み処理

Jump to

Keyboard shortcuts

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