storage

package
v0.0.0-...-e78ef58 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("not found")
	ErrNotDirectory = errors.New("location is not a directory")
)

Functions

This section is empty.

Types

type Local

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

func NewLocal

func NewLocal(cfg config.ConfigProvider) (s *Local)

func (*Local) Check

func (s *Local) Check() (err error)

func (*Local) Delete

func (s *Local) Delete(id string) (err error)

func (*Local) Get

func (s *Local) Get(id string) (r io.ReadCloser, size int64, err error)

func (*Local) Store

func (s *Local) Store(
	id string,
	msgs []*discordgo.Message,
	includeMetadata,
	includeFiles bool,
	excludeDuplicates bool,
	cStatus chan<- *models.AttMetadata,
) (err error)

type StorageProvider

type StorageProvider interface {
	Check() (err error)
	Store(
		id string,
		msgs []*discordgo.Message,
		includeMetadata,
		includeFiles bool,
		excludeDuplicates bool,
		cStatus chan<- *models.AttMetadata,
	) (err error)
	Get(id string) (r io.ReadCloser, size int64, err error)
	Delete(id string) (err error)
}

Jump to

Keyboard shortcuts

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