Documentation
¶
Index ¶
- type DeleteOptions
- type LocalStorage
- func (s *LocalStorage) Delete(path string, options ...DeleteOptions) error
- func (s *LocalStorage) FileExists(path string) bool
- func (s *LocalStorage) GetFileSize(path string) (int64, error)
- func (s *LocalStorage) Read(ctx context.Context, path string) ([]byte, error)
- func (s *LocalStorage) Write(ctx context.Context, file []byte, path string) (string, error)
- type LocalStorageOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteOptions ¶ added in v1.8.0
type LocalStorage ¶
type LocalStorage struct {
BasePath string
}
func Init ¶ added in v1.8.0
func Init(options ...LocalStorageOptions) (*LocalStorage, error)
func (*LocalStorage) Delete ¶ added in v1.8.0
func (s *LocalStorage) Delete(path string, options ...DeleteOptions) error
DeleteFile removes a file from storage
func (*LocalStorage) FileExists ¶ added in v1.8.0
func (s *LocalStorage) FileExists(path string) bool
FileExists checks if a file exists
func (*LocalStorage) GetFileSize ¶ added in v1.8.0
func (s *LocalStorage) GetFileSize(path string) (int64, error)
GetFileSize returns the size of a file
type LocalStorageOptions ¶ added in v1.8.0
type LocalStorageOptions struct {
BasePath string
}
Click to show internal directories.
Click to hide internal directories.