storage

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStorage

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

LocalStorage ローカルストレージ

func NewLocalStorage

func NewLocalStorage(dir string) (*LocalStorage, error)

NewLocalStorage LocalStorageを生成する。指定したディレクトリはすでに存在している必要がある。

func (*LocalStorage) Delete

func (ls *LocalStorage) Delete(filename string) error

Delete ファイルを削除する

func (*LocalStorage) Open

func (ls *LocalStorage) Open(filename string) (io.ReadCloser, error)

Open ファイルを取得する

func (*LocalStorage) Save

func (ls *LocalStorage) Save(filename string, src io.Reader) error

Save ファイルを保存する

type S3Storage

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

S3Storage AmazonS3ストレージ

func NewS3Storage

func NewS3Storage(bucket, accessKey, accessSecret, region, endpoint string) (*S3Storage, error)

NewS3Storage S3Storageを生成する。指定したBucketはすでに存在している必要がある。

func (*S3Storage) Delete

func (s3s *S3Storage) Delete(filename string) error

Delete ファイルを削除する

func (*S3Storage) Open

func (s3s *S3Storage) Open(filename string) (io.ReadCloser, error)

Open ファイルを開く

func (*S3Storage) Save

func (s3s *S3Storage) Save(filename string, src io.Reader) error

Save ファイルをアップロードする

type SwiftStorage

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

SwiftStorage OpenStack Swiftストレージ

func NewSwiftStorage

func NewSwiftStorage(container, userName, apiKey, tenant, tenantID, authURL string) (*SwiftStorage, error)

NewSwiftStorage 引数の情報でOpenStack Swiftストレージを生成する

func (*SwiftStorage) Delete

func (ss *SwiftStorage) Delete(filename string) error

Delete ファイルを削除する

func (*SwiftStorage) Open

func (ss *SwiftStorage) Open(filename string) (io.ReadCloser, error)

Open ファイルを取得する

func (*SwiftStorage) Save

func (ss *SwiftStorage) Save(filename string, src io.Reader) error

Save ファイルを保存する

Jump to

Keyboard shortcuts

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