storage

package
v1.10.39 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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