storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfig = errors.New("invalid configuration")

Functions

This section is empty.

Types

type Config

type Config struct {
	Spec Spec `json:"spec"`
}

type Spec

type Spec struct {
	BucketName         string       `json:"bucketName"`
	AuthenticationType string       `json:"authenticationType"`
	Protocols          []string     `json:"protocols"`
	SecretS3           *s3.SecretS3 `json:"secretS3,omitempty"`
}

type Storage

type Storage interface {
	Delete(ctx context.Context, key string) error
	GetURL(ctx context.Context, key string) (string, error)
	Put(ctx context.Context, key string, data io.Reader, size int64) error
	Stat(ctx context.Context, key string) (bool, error)
}

func New

func New(config Config, ssl bool) (Storage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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