store

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "publish.store"

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Region      string      `yaml:"region"`
	Bucket      string      `yaml:"bucket"`
	Credentials Credentials `yaml:"credentials"`
}

type Credentials

type Credentials struct {
	AccessKey string `yaml:"accessKey"`
	SecretKey string `yaml:"secretKey"`
}

type File added in v0.0.2

type File struct {
	Name   string
	Size   int
	Reader *bufio.Reader
}

func (File) ContentType added in v0.0.2

func (f File) ContentType() string

type Store

type Store interface {
	app.Component

	Put(ctx context.Context, file File) error
	Get(ctx context.Context, key string) (io.ReadCloser, error)
	DeletePath(ctx context.Context, path string) error
}

func New

func New() Store

Jump to

Keyboard shortcuts

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