Documentation
¶
Index ¶
- func CreatePath(ctx context.Context, storageRoot, docUUID string) error
- func GetFile(ctx context.Context, storageRoot, docUUID string, imageInfo ImageInfo) (string, string, error)
- func HashFile(ctx context.Context, filename string) (string, error)
- func ReplaceUrls(ctx context.Context, content string, imageUrls []ImageInfo) string
- func StorageGetFiles(ctx context.Context, storage NotesStorage, db db.NotesDatabase, note db.Note) error
- type ImageInfo
- type NotesStorage
- type OrignalImage
- type S3MinioStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceUrls ¶
func StorageGetFiles ¶
func StorageGetFiles(ctx context.Context, storage NotesStorage, db db.NotesDatabase, note db.Note) error
Types ¶
type ImageInfo ¶
type ImageInfo struct { Original OrignalImage Replacement string }
type NotesStorage ¶
type NotesStorage interface { GetFiles(ctx context.Context, docUUID string, imageUrls []ImageInfo) ([]ImageInfo, error) Cleanup(ctx context.Context, docUUID string) error GetObject(ctx context.Context, filename string, expiration int) (string, error) }
var Storage NotesStorage
type OrignalImage ¶
type S3MinioStorage ¶
type S3MinioStorage struct { BucketName string AppRoot string StorageRoot string Client *minio.Client }
func NewS3MinioStorage ¶
func NewS3MinioStorage(ctx context.Context) (*S3MinioStorage, error)
func (*S3MinioStorage) Cleanup ¶
func (s *S3MinioStorage) Cleanup(ctx context.Context, docUUID string) error
Click to show internal directories.
Click to hide internal directories.