Documentation ¶
Index ¶
- Constants
- func Logger(ctx context.Context) *zap.Logger
- func NewLocalFilesArchive() (a *localFilesArchive)
- func NewNopFilesArchive() (a *nopFilesArchive)
- type ArchivedFile
- type FileArchive
- type FileInfo
- type FileMeta
- type OpenedFile
- type S3FileArchive
- func (a *S3FileArchive) Archive(ctx context.Context, contentType string, meta map[string]string, ...) (*ArchivedFile, error)
- func (a *S3FileArchive) DeleteByURL(ctx context.Context, url string) (err error)
- func (a *S3FileArchive) Info(ctx context.Context, key string) (info *FileInfo, err error)
- func (a *S3FileArchive) OpenByURL(ctx context.Context, url string) (of *OpenedFile, err error)
- func (a *S3FileArchive) Opened(ctx context.Context, url string, opened *OpenedFile) (reopened *OpenedFile, err error)
- func (a *S3FileArchive) String() string
Constants ¶
View Source
const (
NoPrefix = ""
)
View Source
const (
Path = ".fs"
)
Variables ¶
This section is empty.
Functions ¶
func NewLocalFilesArchive ¶
func NewLocalFilesArchive() (a *localFilesArchive)
func NewNopFilesArchive ¶
func NewNopFilesArchive() (a *nopFilesArchive)
Types ¶
type ArchivedFile ¶
type FileArchive ¶
type FileArchive interface { Archive(ctx context.Context, contentType string, meta map[string]string, read io.Reader) (*ArchivedFile, error) OpenByURL(ctx context.Context, url string) (f *OpenedFile, err error) DeleteByURL(ctx context.Context, url string) (err error) Opened(ctx context.Context, url string, opened *OpenedFile) (reopened *OpenedFile, err error) Info(ctx context.Context, key string) (info *FileInfo, err error) String() string }
func NewPrioritizedFilesArchive ¶
func NewPrioritizedFilesArchive(reading []FileArchive, writing []FileArchive) (a FileArchive)
type OpenedFile ¶
type OpenedFile struct { FileInfo Body io.ReadCloser }
type S3FileArchive ¶
type S3FileArchive struct {
// contains filtered or unexported fields
}
func NewS3FileArchive ¶
func (*S3FileArchive) Archive ¶
func (a *S3FileArchive) Archive(ctx context.Context, contentType string, meta map[string]string, reader io.Reader) (*ArchivedFile, error)
func (*S3FileArchive) DeleteByURL ¶
func (a *S3FileArchive) DeleteByURL(ctx context.Context, url string) (err error)
func (*S3FileArchive) OpenByURL ¶
func (a *S3FileArchive) OpenByURL(ctx context.Context, url string) (of *OpenedFile, err error)
func (*S3FileArchive) Opened ¶
func (a *S3FileArchive) Opened(ctx context.Context, url string, opened *OpenedFile) (reopened *OpenedFile, err error)
func (*S3FileArchive) String ¶
func (a *S3FileArchive) String() string
Click to show internal directories.
Click to hide internal directories.