storage

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FSStorageDriver    = "filesystem"
	S3StorageDriver    = "s3"
	GCSStorageDriver   = "gcs"
	AzureStorageDriver = "azure"
)

Variables

This section is empty.

Functions

func GetPrefix

func GetPrefix(config Config) string

func Init

func Init(ctx context.Context, config Config, prefix string) (*blob.Bucket, error)

Types

type AzureStorageConfig

type AzureStorageConfig struct {
	Container   string `yaml:"container"`
	AccountName string `yaml:"account-name"`
	AccountKey  string `yaml:"account-key"`
}

type Config

type Config struct {
	Driver     string             `yaml:"driver"`
	Prefix     string             `yaml:"prefix"`
	S3         S3StorageConfig    `yaml:"s3"`
	Filesystem FSStorageConfig    `yaml:"filesystem"`
	GCS        GCSStorageConfig   `yaml:"gcs"`
	Azure      AzureStorageConfig `yaml:"azure"`
}

type FSStorageConfig

type FSStorageConfig struct {
	Directory string `yaml:"directory"`
}

type GCSStorageConfig

type GCSStorageConfig struct {
	Bucket  string `yaml:"bucket"`
	Keyfile string `yaml:"keyfile"`
}

type S3StorageConfig

type S3StorageConfig struct {
	Endpoint        string `yaml:"endpoint"`
	Bucket          string `yaml:"bucket"`
	AccessKeyID     string `yaml:"access-key-id"`
	SecretAccessKey string `yaml:"secret-access-key"`
	SessionToken    string `yaml:"session-token"`
	Region          string `yaml:"region"`
	DisableSSL      bool   `yaml:"disable-ssl"`
}

Jump to

Keyboard shortcuts

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